From 8794182b229824ef3eec04b64978d753873dabe1 Mon Sep 17 00:00:00 2001 From: Anton Titovets Date: Fri, 11 Jul 2025 11:24:58 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=B5=D1=84=D0=B5=D0=BA=D1=82=D1=8B=20SQ?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/dictionaries/en.json | 3 ++- src/ru/OPI/src/CommonModules/OPI_CDEK/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_Dropbox/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_GreenAPI/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_Neocities/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_Ollama/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_OpenAI/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_Ozon/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_RCON/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_S3/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_Slack/Module.bsl | 10 +++++----- src/ru/OPI/src/CommonModules/OPI_TCP/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_Telegram/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_VK/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_VKTeams/Module.bsl | 6 +++--- src/ru/OPI/src/CommonModules/OPI_Viber/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_ЗапросыSQL/Module.bsl | 1 + .../OPI/src/CommonModules/OPI_Инструменты/Module.bsl | 1 + src/ru/OPI/src/CommonModules/OPI_Тесты/Module.bsl | 6 +++--- src/ru/OPI/src/CommonModules/OPI_ТестыCLI/Module.bsl | 5 +++-- 20 files changed, 31 insertions(+), 14 deletions(-) diff --git a/service/dictionaries/en.json b/service/dictionaries/en.json index f08f7c4298..6fb1d6662a 100644 --- a/service/dictionaries/en.json +++ b/service/dictionaries/en.json @@ -10070,5 +10070,6 @@ "Не рекомендуется использовать методы служебных модулей в других местах вашей конфигурации (если вы собираетесь обновляться до новых версий в дальнейшем). Для сохранения обратной совместимости, количество/назначение параметров и типы возвращаемых значений для методов работы с API не изменяются, но это не применимо к служебным модулям, которые могут изменяться как угодно для оптимизации и дополнения под новые нужды. Если вам необходим функционал из служебных модулей, рекомендуется скопировать его себе отдельно": "It is not recommended to use the methods of utility modules in other parts of your configuration (if you plan to update to new versions in the future). To maintain backward compatibility, the number/purpose of parameters and the return types for API interaction methods do not change, but this does not apply to utility modules, which can be modified in any way for optimization and adaptation to new requirements. If you need functionality from the utility modules, it is recommended to copy it separately", "Ввести домееное имя и URL обработчика перенаправлений. Тут нужно отметить, что данный механизм создания приложений - новый. Еще недавно приложения VK создавались иначе и иметь redirect_url для них было не нужно. На данный момент не совсем понятно, зачем он нужен нам для серверного приложения - просто такого понятия как серверное приложение у VK теперь нет. Теоретически, туда можно вписать что угодно - для работы с библиотекой в получении обратных данных нет необходимости. Однако, с течением времени, это может измениться": "Enter the domain name and the URL of the redirect handler. It's worth noting that this mechanism for creating VK applications is new. Until recently, VK applications were created differently, and having a redirect URL was unnecessary. At the moment, it's not entirely clear why it's needed for our server application - VK no longer distinguishes server applications as such. Theoretically, you can enter anything there - there is no need for receiving callback data to work with the library. However, this may change over time", "Перечень необходимых данных в виде структуры содержится в функции *ПолучитьСтандартныеПараметры()*. Вы можете указывать значения параметров прямо в ней или же передавать их структурой при вызове любых других методов библиотеки в качестве необязательного параметра *Параметры* (последний во всех методах билиотеки). В последнем случае стандартные параметры будут перезаписаны по ключам теми, которые переданы при вызове метода. Перезаписаны будут только совпадающие по ключам данные. Если какой то параметр есть в наборе стандартных, но не был передан при вызове метода, то он сохранит стандартное значение": "The list of necessary data in the form of a structure is contained in the function *GetStandardParameters()*. You can specify parameter values directly within it or pass them as a structure when calling any other library methods as an optional parameter *Parameters* (the last one in all library methods). In the latter case, the standard parameters will be overwritten by the ones passed during the method call. Only the data with matching keys will be overwritten. If a parameter exists in the standard set but was not passed during the method call, it will retain its default value", -"НормализоватьТаблицу": "NormalizeTable" +"НормализоватьТаблицу": "NormalizeTable", +"URLЗапроса":"RequestURL" } \ No newline at end of file diff --git a/src/ru/OPI/src/CommonModules/OPI_CDEK/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_CDEK/Module.bsl index 731ab0e0b5..f95779a224 100644 --- a/src/ru/OPI/src/CommonModules/OPI_CDEK/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_CDEK/Module.bsl @@ -34,6 +34,7 @@ // BSLLS:UsingServiceTag-off // BSLLS:LineLength-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-structure-top-region //@skip-check module-structure-method-in-regions diff --git a/src/ru/OPI/src/CommonModules/OPI_Dropbox/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_Dropbox/Module.bsl index 3c1ce68e51..29dbfa750a 100644 --- a/src/ru/OPI/src/CommonModules/OPI_Dropbox/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_Dropbox/Module.bsl @@ -30,6 +30,7 @@ // BSLLS:IncorrectLineBreak-off // BSLLS:UsingServiceTag-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-structure-top-region //@skip-check module-structure-method-in-regions diff --git a/src/ru/OPI/src/CommonModules/OPI_GreenAPI/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_GreenAPI/Module.bsl index 4330f43fef..b542fae816 100644 --- a/src/ru/OPI/src/CommonModules/OPI_GreenAPI/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_GreenAPI/Module.bsl @@ -34,6 +34,7 @@ // BSLLS:UsingServiceTag-off // BSLLS:LineLength-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-structure-top-region //@skip-check module-structure-method-in-regions diff --git a/src/ru/OPI/src/CommonModules/OPI_Neocities/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_Neocities/Module.bsl index fa3350d839..20ea361e32 100644 --- a/src/ru/OPI/src/CommonModules/OPI_Neocities/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_Neocities/Module.bsl @@ -34,6 +34,7 @@ // BSLLS:UsingServiceTag-off // BSLLS:LineLength-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-structure-top-region //@skip-check module-structure-method-in-regions diff --git a/src/ru/OPI/src/CommonModules/OPI_Ollama/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_Ollama/Module.bsl index 1a75e40667..8063f4f2d7 100644 --- a/src/ru/OPI/src/CommonModules/OPI_Ollama/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_Ollama/Module.bsl @@ -33,6 +33,7 @@ // BSLLS:UsingServiceTag-off // BSLLS:LineLength-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-structure-top-region //@skip-check module-structure-method-in-regions diff --git a/src/ru/OPI/src/CommonModules/OPI_OpenAI/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_OpenAI/Module.bsl index eb9e1a953f..0a77710280 100644 --- a/src/ru/OPI/src/CommonModules/OPI_OpenAI/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_OpenAI/Module.bsl @@ -33,6 +33,7 @@ // BSLLS:UsingServiceTag-off // BSLLS:LineLength-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-structure-top-region //@skip-check module-structure-method-in-regions diff --git a/src/ru/OPI/src/CommonModules/OPI_Ozon/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_Ozon/Module.bsl index 7e6ddbb523..a2b958059e 100644 --- a/src/ru/OPI/src/CommonModules/OPI_Ozon/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_Ozon/Module.bsl @@ -33,6 +33,7 @@ // BSLLS:UsingServiceTag-off // BSLLS:LineLength-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-structure-top-region //@skip-check module-structure-method-in-regions diff --git a/src/ru/OPI/src/CommonModules/OPI_RCON/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_RCON/Module.bsl index 3681020c5c..a4ba82e764 100644 --- a/src/ru/OPI/src/CommonModules/OPI_RCON/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_RCON/Module.bsl @@ -34,6 +34,7 @@ // BSLLS:UsingServiceTag-off // BSLLS:LineLength-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-structure-top-region //@skip-check module-structure-method-in-regions diff --git a/src/ru/OPI/src/CommonModules/OPI_S3/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_S3/Module.bsl index 45095b93bc..d65240d7a2 100644 --- a/src/ru/OPI/src/CommonModules/OPI_S3/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_S3/Module.bsl @@ -34,6 +34,7 @@ // BSLLS:UsingServiceTag-off // BSLLS:LineLength-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-structure-top-region //@skip-check module-structure-method-in-regions diff --git a/src/ru/OPI/src/CommonModules/OPI_Slack/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_Slack/Module.bsl index 3d21d29d96..dd0f1dfd43 100644 --- a/src/ru/OPI/src/CommonModules/OPI_Slack/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_Slack/Module.bsl @@ -873,17 +873,17 @@ // Соответствие Из КлючИЗначение - сериализованный JSON ответа от Slack Функция ДобавитьВнешнийФайл(Знач Токен, Знач URL, Знач Заголовок) Экспорт - Строка_ = "Строка"; - URL = "https://slack.com/api/files.remote.add"; - Заголовки = ПолучитьЗаголовокАвторизации(Токен); - UID = Строка(Новый УникальныйИдентификатор()); + Строка_ = "Строка"; + URLЗапроса = "https://slack.com/api/files.remote.add"; + Заголовки = ПолучитьЗаголовокАвторизации(Токен); + UID = Строка(Новый УникальныйИдентификатор()); Параметры = Новый Структура; OPI_Инструменты.ДобавитьПоле("external_url", URL , Строка_, Параметры); OPI_Инструменты.ДобавитьПоле("external_id" , UID , Строка_, Параметры); OPI_Инструменты.ДобавитьПоле("title" , Заголовок , Строка_, Параметры); - Ответ = OPI_ЗапросыHTTP.Get(URL, Параметры, Заголовки); + Ответ = OPI_ЗапросыHTTP.Get(URLЗапроса, Параметры, Заголовки); Возврат Ответ; diff --git a/src/ru/OPI/src/CommonModules/OPI_TCP/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_TCP/Module.bsl index 9c0cf9a81c..c914f63af9 100644 --- a/src/ru/OPI/src/CommonModules/OPI_TCP/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_TCP/Module.bsl @@ -34,6 +34,7 @@ // BSLLS:UsingServiceTag-off // BSLLS:LineLength-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-structure-top-region //@skip-check module-structure-method-in-regions diff --git a/src/ru/OPI/src/CommonModules/OPI_Telegram/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_Telegram/Module.bsl index e26364538e..599360f6a3 100644 --- a/src/ru/OPI/src/CommonModules/OPI_Telegram/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_Telegram/Module.bsl @@ -36,6 +36,7 @@ // BSLLS:NumberOfParams-off // BSLLS:LineLength-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-structure-top-region //@skip-check module-structure-method-in-regions diff --git a/src/ru/OPI/src/CommonModules/OPI_VK/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_VK/Module.bsl index 2cd5bb5d0d..6988ecde1f 100644 --- a/src/ru/OPI/src/CommonModules/OPI_VK/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_VK/Module.bsl @@ -36,6 +36,7 @@ // BSLLS:UsingServiceTag-off // BSLLS:UnusedLocalVariable-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check method-too-many-params //@skip-check wrong-string-literal-content diff --git a/src/ru/OPI/src/CommonModules/OPI_VKTeams/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_VKTeams/Module.bsl index 79b7edb757..7034ccf520 100644 --- a/src/ru/OPI/src/CommonModules/OPI_VKTeams/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_VKTeams/Module.bsl @@ -506,15 +506,15 @@ Строка_ = "Строка"; - URL = "/messages/answerCallbackQuery"; - Параметры = НормализоватьОснову(URL, Токен); + URLЗапроса = "/messages/answerCallbackQuery"; + Параметры = НормализоватьОснову(URL, Токен); OPI_Инструменты.ДобавитьПоле("queryId" , IDСобытия , Строка_ , Параметры); OPI_Инструменты.ДобавитьПоле("text" , Текст , Строка_ , Параметры); OPI_Инструменты.ДобавитьПоле("url" , URL , Строка_ , Параметры); OPI_Инструменты.ДобавитьПоле("showAlert", ЭтоПредупреждение , "Булево", Параметры); - Ответ = OPI_ЗапросыHTTP.Get(URL, Параметры); + Ответ = OPI_ЗапросыHTTP.Get(URLЗапроса, Параметры); Возврат Ответ; diff --git a/src/ru/OPI/src/CommonModules/OPI_Viber/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_Viber/Module.bsl index 45da68ad90..74609eb199 100644 --- a/src/ru/OPI/src/CommonModules/OPI_Viber/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_Viber/Module.bsl @@ -31,6 +31,7 @@ // BSLLS:IncorrectLineBreak-off // BSLLS:UsingServiceTag-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-structure-top-region //@skip-check module-structure-method-in-regions diff --git a/src/ru/OPI/src/CommonModules/OPI_ЗапросыSQL/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_ЗапросыSQL/Module.bsl index 999b7cebc6..a4e8da6fda 100644 --- a/src/ru/OPI/src/CommonModules/OPI_ЗапросыSQL/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_ЗапросыSQL/Module.bsl @@ -34,6 +34,7 @@ // BSLLS:AssignAliasFieldsInQuery-off // BSLLS:NumberOfParams-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-structure-top-region //@skip-check module-structure-method-in-regions diff --git a/src/ru/OPI/src/CommonModules/OPI_Инструменты/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_Инструменты/Module.bsl index 8e94948ba0..6889ed205d 100644 --- a/src/ru/OPI/src/CommonModules/OPI_Инструменты/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_Инструменты/Module.bsl @@ -31,6 +31,7 @@ // BSLLS:UsingServiceTag-off // BSLLS:NumberOfOptionalParams-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check module-unused-local-variable //@skip-check method-too-many-params diff --git a/src/ru/OPI/src/CommonModules/OPI_Тесты/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_Тесты/Module.bsl index a9cf5b6c45..6c2be0ca59 100644 --- a/src/ru/OPI/src/CommonModules/OPI_Тесты/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_Тесты/Module.bsl @@ -45,6 +45,7 @@ // BSLLS:NestedFunctionInParameters-off // BSLLS:MissingTemporaryFileDeletion-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check undefined-variable //@skip-check wrong-string-literal-content @@ -7761,7 +7762,6 @@ Свойства.Вставить("Имя" , "title"); Свойства.Вставить("Описание" , "rich_text"); Свойства.Вставить("Номер" , "number"); - Свойства.Вставить("Статус" , "status"); Свойства.Вставить("Дата создания", "date"); Свойства.Вставить("Картинка" , "files"); Свойства.Вставить("Активен" , "checkbox"); @@ -7852,7 +7852,6 @@ Свойства.Вставить("Имя" , "ООО Вектор"); Свойства.Вставить("Описание" , "Наш первый клиент"); Свойства.Вставить("Номер" , 1); - Свойства.Вставить("Статус" , "Обычный"); Свойства.Вставить("Дата создания", OPI_Инструменты.ПолучитьТекущуюДату()); Свойства.Вставить("Картинка" , Картинка); Свойства.Вставить("Активен" , Истина); @@ -13481,15 +13480,16 @@ МассивСтрокиКнопок.Добавить(OPI_VKTeams.СформироватьКнопкуДействия("Кнопка2", , "https://openintegrations.dev")); + // BSLLS:DuplicatedInsertionIntoCollection-off // SKIP Клавиатура.Добавить(МассивСтрокиКнопок); Клавиатура.Добавить(МассивСтрокиКнопок); + // BSLLS:DuplicatedInsertionIntoCollection-on // SKIP Результат = OPI_VKTeams.ОтправитьТекстовоеСообщение(Токен, IDЧата, Текст, IDЦитируемого, Клавиатура, Разметка); // END OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтправитьТекстовоеСообщение", "VkTeams"); - OPI_ПолучениеДанныхТестов.Проверка_ВКТСообщение(Результат); IDСообщения = Результат["msgId"]; diff --git a/src/ru/OPI/src/CommonModules/OPI_ТестыCLI/Module.bsl b/src/ru/OPI/src/CommonModules/OPI_ТестыCLI/Module.bsl index f091bc08df..85113ab646 100644 --- a/src/ru/OPI/src/CommonModules/OPI_ТестыCLI/Module.bsl +++ b/src/ru/OPI/src/CommonModules/OPI_ТестыCLI/Module.bsl @@ -45,6 +45,7 @@ // BSLLS:NestedFunctionInParameters-off // BSLLS:MissingTemporaryFileDeletion-off // BSLLS:UsingSynchronousCalls-off +// BSLLS:MagicNumber-off //@skip-check undefined-variable //@skip-check wrong-string-literal-content @@ -6953,7 +6954,6 @@ Свойства.Вставить("Имя" , "title"); Свойства.Вставить("Описание" , "rich_text"); Свойства.Вставить("Номер" , "number"); - Свойства.Вставить("Статус" , "status"); Свойства.Вставить("Дата создания", "date"); Свойства.Вставить("Картинка" , "files"); Свойства.Вставить("Активен" , "checkbox"); @@ -7057,7 +7057,6 @@ Свойства.Вставить("Имя" , "ООО Вектор"); Свойства.Вставить("Описание" , "Наш первый клиент"); Свойства.Вставить("Номер" , 1); - Свойства.Вставить("Статус" , "Обычный"); Свойства.Вставить("Дата создания", OPI_Инструменты.ПолучитьТекущуюДату()); Свойства.Вставить("Картинка" , Картинка); Свойства.Вставить("Активен" , Истина); @@ -9200,8 +9199,10 @@ Кнопка = OPI_ПолучениеДанныхТестов.ВыполнитьТестCLI("vkteams", "СформироватьКнопкуДействия", Опции); МассивСтрокиКнопок.Добавить(Кнопка); + // BSLLS:DuplicatedInsertionIntoCollection-off Клавиатура.Добавить(МассивСтрокиКнопок); Клавиатура.Добавить(МассивСтрокиКнопок); + // BSLLS:DuplicatedInsertionIntoCollection-on Опции = Новый Структура; Опции.Вставить("token" , Токен);