1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-08-13 20:05:19 +02:00

Дефекты SC

This commit is contained in:
Anton Titovets
2024-07-01 16:01:08 +03:00
parent 501f18e6dd
commit c9f55d54aa
14 changed files with 59 additions and 36 deletions

View File

@@ -27,6 +27,7 @@
// https://github.com/Bayselonarrend/OpenIntegrations // https://github.com/Bayselonarrend/OpenIntegrations
// BSLLS:IncorrectLineBreak-off // BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
//@skip-check module-structure-top-region //@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions //@skip-check module-structure-method-in-regions

View File

@@ -29,6 +29,8 @@
// BSLLS:Typo-off // BSLLS:Typo-off
// BSLLS:LatinAndCyrillicSymbolInWord-off // BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off // BSLLS:IncorrectLineBreak-off
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
//@skip-check module-structure-top-region //@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions //@skip-check module-structure-method-in-regions
@@ -83,12 +85,13 @@
Функция ПолучитьТокен(Знач ClientID, Знач ClientSecret, Знач Code) Экспорт Функция ПолучитьТокен(Знач ClientID, Знач ClientSecret, Знач Code) Экспорт
URL = "https://oauth.bitrix.info/oauth/token/"; URL = "https://oauth.bitrix.info/oauth/token/";
Строка_ = "Строка";
Параметры = Новый Структура; Параметры = Новый Структура;
OPI_Инструменты.ДобавитьПоле("grant_type" , "authorization_code", "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("grant_type" , "authorization_code", Строка_, Параметры);
OPI_Инструменты.ДобавитьПоле("client_id" , ClientID , "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("client_id" , ClientID , Строка_, Параметры);
OPI_Инструменты.ДобавитьПоле("client_secret", ClientSecret , "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("client_secret", ClientSecret , Строка_, Параметры);
OPI_Инструменты.ДобавитьПоле("code" , Code , "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("code" , Code , Строка_, Параметры);
Ответ = OPI_Инструменты.Get(URL, Параметры); Ответ = OPI_Инструменты.Get(URL, Параметры);
@@ -109,12 +112,13 @@
Функция ОбновитьТокен(Знач ClientID, Знач ClientSecret, Знач Refresh) Экспорт Функция ОбновитьТокен(Знач ClientID, Знач ClientSecret, Знач Refresh) Экспорт
URL = "https://oauth.bitrix.info/oauth/token/"; URL = "https://oauth.bitrix.info/oauth/token/";
Строка_ = "Строка";
Параметры = Новый Структура; Параметры = Новый Структура;
OPI_Инструменты.ДобавитьПоле("grant_type" , "refresh_token" , "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("grant_type" , "refresh_token" , Строка_, Параметры);
OPI_Инструменты.ДобавитьПоле("client_id" , ClientID , "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("client_id" , ClientID , Строка_, Параметры);
OPI_Инструменты.ДобавитьПоле("client_secret", ClientSecret , "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("client_secret", ClientSecret , Строка_, Параметры);
OPI_Инструменты.ДобавитьПоле("refresh_token", Refresh , "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("refresh_token", Refresh , Строка_, Параметры);
Ответ = OPI_Инструменты.Get(URL, Параметры); Ответ = OPI_Инструменты.Get(URL, Параметры);
@@ -168,11 +172,13 @@
ПривестиБулево(Важное); ПривестиБулево(Важное);
Строка_ = "Строка";
Параметры = НормализоватьАвторизацию(URL, Токен, "log.blogpost.add"); Параметры = НормализоватьАвторизацию(URL, Токен, "log.blogpost.add");
OPI_Инструменты.ДобавитьПоле("POST_MESSAGE", Текст , "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("POST_MESSAGE", Текст , Строка_, Параметры);
OPI_Инструменты.ДобавитьПоле("POST_TITLE" , Заголовок , "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("POST_TITLE" , Заголовок , Строка_, Параметры);
OPI_Инструменты.ДобавитьПоле("DEST" , Видимость , "Массив", Параметры); OPI_Инструменты.ДобавитьПоле("DEST" , Видимость , "Массив", Параметры);
OPI_Инструменты.ДобавитьПоле("IMPORTANT" , Важное , "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("IMPORTANT" , Важное , Строка_, Параметры);
Если ЗначениеЗаполнено(Файлы) Тогда Если ЗначениеЗаполнено(Файлы) Тогда
@@ -214,11 +220,13 @@
, Знач Заголовок = "" , Знач Заголовок = ""
, Знач Токен = "") Экспорт , Знач Токен = "") Экспорт
Строка_ = "Строка";
Параметры = НормализоватьАвторизацию(URL, Токен, "log.blogpost.update"); Параметры = НормализоватьАвторизацию(URL, Токен, "log.blogpost.update");
OPI_Инструменты.ДобавитьПоле("POST_MESSAGE", Текст , "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("POST_MESSAGE", Текст , Строка_, Параметры);
OPI_Инструменты.ДобавитьПоле("POST_TITLE" , Заголовок , "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("POST_TITLE" , Заголовок , Строка_, Параметры);
OPI_Инструменты.ДобавитьПоле("DEST" , Видимость , "Массив", Параметры); OPI_Инструменты.ДобавитьПоле("DEST" , Видимость , "Массив", Параметры);
OPI_Инструменты.ДобавитьПоле("POST_ID" , IDНовости , "Строка", Параметры); OPI_Инструменты.ДобавитьПоле("POST_ID" , IDНовости , Строка_, Параметры);
Если ЗначениеЗаполнено(Файлы) Тогда Если ЗначениеЗаполнено(Файлы) Тогда
@@ -1249,7 +1257,7 @@
#КонецОбласти #КонецОбласти
#Область СлужебныйПрограммныйИнтерфейс #Область СлужебныеПроцедурыИФункции
Функция НормализоватьАвторизацию(URL, Знач Токен, Знач Метод = "") Функция НормализоватьАвторизацию(URL, Знач Токен, Знач Метод = "")

View File

@@ -27,6 +27,7 @@
// https://github.com/Bayselonarrend/OpenIntegrations // https://github.com/Bayselonarrend/OpenIntegrations
// BSLLS:IncorrectLineBreak-off // BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
//@skip-check module-structure-top-region //@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions //@skip-check module-structure-method-in-regions

View File

@@ -28,6 +28,7 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off // BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off // BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
//@skip-check module-structure-top-region //@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions //@skip-check module-structure-method-in-regions

View File

@@ -28,6 +28,7 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off // BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off // BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
//@skip-check module-structure-top-region //@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions //@skip-check module-structure-method-in-regions

View File

@@ -28,6 +28,7 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off // BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off // BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
//@skip-check module-structure-top-region //@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions //@skip-check module-structure-method-in-regions

View File

@@ -28,6 +28,7 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off // BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off // BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
//@skip-check module-structure-top-region //@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions //@skip-check module-structure-method-in-regions

View File

@@ -28,6 +28,7 @@
// BSLLS:IncorrectLineBreak-off // BSLLS:IncorrectLineBreak-off
// BSLLS:Typo-off // BSLLS:Typo-off
// BSLLS:UsingServiceTag-off
//@skip-check module-structure-top-region //@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions //@skip-check module-structure-method-in-regions

View File

@@ -31,6 +31,7 @@
// BSLLS:IncorrectLineBreak-off // BSLLS:IncorrectLineBreak-off
// BSLLS:UnreachableCode-off // BSLLS:UnreachableCode-off
// BSLLS:CommentedCode-off // BSLLS:CommentedCode-off
// BSLLS:UsingServiceTag-off
//@skip-check module-structure-top-region //@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions //@skip-check module-structure-method-in-regions
@@ -257,11 +258,13 @@
OPI_ПреобразованиеТипов.ПолучитьСтроку(Токен); OPI_ПреобразованиеТипов.ПолучитьСтроку(Токен);
OPI_Инструменты.ЗаменитьСпецСимволы(Текст, Разметка); OPI_Инструменты.ЗаменитьСпецСимволы(Текст, Разметка);
Строка_ = "Строка";
Параметры = Новый Структура; Параметры = Новый Структура;
OPI_Инструменты.ДобавитьПоле("parse_mode" , Разметка , "Строка" , Параметры); OPI_Инструменты.ДобавитьПоле("parse_mode" , Разметка , Строка_ , Параметры);
OPI_Инструменты.ДобавитьПоле("text" , Текст , "Строка" , Параметры); OPI_Инструменты.ДобавитьПоле("text" , Текст , Строка_ , Параметры);
OPI_Инструменты.ДобавитьПоле("reply_markup" , Клавиатура , "СтрокаФайла", Параметры); OPI_Инструменты.ДобавитьПоле("reply_markup" , Клавиатура , "СтрокаФайла", Параметры);
OPI_Инструменты.ДобавитьПоле("reply_to_message_id", IDВходящего, "Строка" , Параметры); OPI_Инструменты.ДобавитьПоле("reply_to_message_id", IDВходящего, Строка_ , Параметры);
ДобавитьИдентификаторЧата(IDЧата, Параметры); ДобавитьИдентификаторЧата(IDЧата, Параметры);

View File

@@ -28,6 +28,7 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off // BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off // BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
//@skip-check module-structure-top-region //@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions //@skip-check module-structure-method-in-regions

View File

@@ -28,6 +28,7 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off // BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off // BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
//@skip-check module-structure-top-region //@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions //@skip-check module-structure-method-in-regions

View File

@@ -27,6 +27,7 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off // BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off // BSLLS:IncorrectLineBreak-off
// BSLLS:UnusedLocalVariable-off // BSLLS:UnusedLocalVariable-off
// BSLLS:UsingServiceTag-off
//@skip-check module-structure-top-region //@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions //@skip-check module-structure-method-in-regions

View File

@@ -27,6 +27,7 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off // BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off // BSLLS:IncorrectLineBreak-off
// BSLLS:UnusedLocalVariable-off // BSLLS:UnusedLocalVariable-off
// BSLLS:UsingServiceTag-off
//@skip-check module-structure-top-region //@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions //@skip-check module-structure-method-in-regions

View File

@@ -4705,7 +4705,6 @@
Параметры = ПолучитьПараметрыВК(); Параметры = ПолучитьПараметрыВК();
IDПоста = ПараметрыФункции["VK_PostID"]; IDПоста = ПараметрыФункции["VK_PostID"];
Результат = OPI_VK.ПоставитьЛайк(IDПоста, , Параметры); Результат = OPI_VK.ПоставитьЛайк(IDПоста, , Параметры);
// END // END
@@ -5990,7 +5989,6 @@
Процедура Bitrix24_ПолучитьТокен(ПараметрыФункции) Процедура Bitrix24_ПолучитьТокен(ПараметрыФункции)
ClientID = ПараметрыФункции["Bitrix24_ClientID"]; ClientID = ПараметрыФункции["Bitrix24_ClientID"];
ClientSecret = ПараметрыФункции["Bitrix24_ClientSecret"]; ClientSecret = ПараметрыФункции["Bitrix24_ClientSecret"];
Code = ПараметрыФункции["Bitrix24_Code"]; Code = ПараметрыФункции["Bitrix24_Code"];
@@ -6010,7 +6008,6 @@
Процедура Bitrix24_ОбновитьТокен(ПараметрыФункции) Процедура Bitrix24_ОбновитьТокен(ПараметрыФункции)
ClientID = ПараметрыФункции["Bitrix24_ClientID"]; ClientID = ПараметрыФункции["Bitrix24_ClientID"];
ClientSecret = ПараметрыФункции["Bitrix24_ClientSecret"]; ClientSecret = ПараметрыФункции["Bitrix24_ClientSecret"];
Refresh = ПараметрыФункции["Bitrix24_Refresh"]; Refresh = ПараметрыФункции["Bitrix24_Refresh"];
@@ -6411,6 +6408,8 @@
Результат = OPI_Bitrix24.ОтклонитьЗадачу(URL, IDЗадачи); Результат = OPI_Bitrix24.ОтклонитьЗадачу(URL, IDЗадачи);
Проверка_Соответствие(Результат); // SKIP
// !OInt OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтклонитьЗадачу (хук)", "Bitrix24"); // !OInt OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтклонитьЗадачу (хук)", "Bitrix24");
URL = ПараметрыФункции["Bitrix24_Domain"]; URL = ПараметрыФункции["Bitrix24_Domain"];
@@ -6421,6 +6420,8 @@
// END // END
Проверка_Соответствие(Результат);
// !OInt OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтклонитьЗадачу", "Bitrix24"); // !OInt OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтклонитьЗадачу", "Bitrix24");
КонецПроцедуры КонецПроцедуры