You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-08-13 20:05:19 +02:00
Преобразование OPI -> OInt (workflow)
This commit is contained in:
committed by
Vitaly the Alpaca (bot)
parent
ea130571fd
commit
fd38dec991
4
.github/workflows/oint_test_Bitrix24.yml
vendored
4
.github/workflows/oint_test_Bitrix24.yml
vendored
@@ -115,6 +115,10 @@ jobs:
|
||||
if: ${{ cancelled() }} == false
|
||||
run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os "Б24_РаботаСЧатами"
|
||||
|
||||
- name: Работа с уведомлениями
|
||||
if: ${{ cancelled() }} == false
|
||||
run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os "Б24_РаботаСУведомлениями"
|
||||
|
||||
- name: Записать логи
|
||||
if: ${{ cancelled() }} == false
|
||||
uses: actions/cache/save@v3
|
||||
|
4
.github/workflows/oint_test_full.yml
vendored
4
.github/workflows/oint_test_full.yml
vendored
@@ -1076,6 +1076,10 @@ jobs:
|
||||
if: ${{ cancelled() }} == false
|
||||
run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os "Б24_РаботаСЧатами"
|
||||
|
||||
- name: Работа с уведомлениями
|
||||
if: ${{ cancelled() }} == false
|
||||
run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os "Б24_РаботаСУведомлениями"
|
||||
|
||||
- name: Записать логи
|
||||
if: ${{ cancelled() }} == false
|
||||
uses: actions/cache/save@v3
|
||||
|
4
.github/workflows/oint_test_full_en.yml
vendored
4
.github/workflows/oint_test_full_en.yml
vendored
@@ -1076,6 +1076,10 @@ jobs:
|
||||
if: ${{ cancelled() }} == false
|
||||
run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./src/en/OInt/tests/Modules/internal/OPI_Tests.os "B24_ChatManagment"
|
||||
|
||||
- name: Notifications managment
|
||||
if: ${{ cancelled() }} == false
|
||||
run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./src/en/OInt/tests/Modules/internal/OPI_Tests.os "B24_NotificationsManagment"
|
||||
|
||||
- name: Записать логи
|
||||
if: ${{ cancelled() }} == false
|
||||
uses: actions/cache/save@v3
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -2605,6 +2605,31 @@ Function LeaveChat(Val URL, Val ChatID, Val Token = "") Export
|
||||
|
||||
EndFunction
|
||||
|
||||
// Get users
|
||||
// Get users information for dialog
|
||||
//
|
||||
// Note
|
||||
// Method at API documentation: [im.user.list.get ](@dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=93&LESSON_ID=11493)
|
||||
//
|
||||
// Parameters:
|
||||
// URL - String - URL of webhook or a Bitrix24 domain, when token used - url
|
||||
// UserIDs - Array of String, Number - Usesr ID or array of users IDs - users
|
||||
// Token - String - Access token, when app auth method used - token
|
||||
//
|
||||
// Returns:
|
||||
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
|
||||
Function GetUsers(Val URL, Val UserIDs, Val Token = "") Export
|
||||
|
||||
Parameters = NormalizeAuth(URL, Token, "im.user.list.get");
|
||||
|
||||
OPI_Tools.AddField("ID", UserIDs, "Array", Parameters);
|
||||
|
||||
Response = OPI_Tools.Post(URL, Parameters);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Add users to chat
|
||||
// Adds users to the chat by ID array
|
||||
//
|
||||
@@ -2932,6 +2957,53 @@ Function SendWritingNotification(Val URL, Val ChatID, Val Token = "") Export
|
||||
|
||||
EndFunction
|
||||
|
||||
// Get user status
|
||||
// Gets the status (online) of the current user
|
||||
//
|
||||
// Note
|
||||
// Method at API documentation: [im.user.status.get](@dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=93&LESSON_ID=11497)
|
||||
//
|
||||
// Parameters:
|
||||
// URL - String - URL of webhook or a Bitrix24 domain, when token used - url
|
||||
// Token - String - Access token, when app auth method used - token
|
||||
//
|
||||
// Returns:
|
||||
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
|
||||
Function GetUserStatus(Val URL, Val Token = "") Export
|
||||
|
||||
Parameters = NormalizeAuth(URL, Token, "im.user.status.get");
|
||||
|
||||
Response = OPI_Tools.Post(URL, Parameters);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Set user status
|
||||
// Sets the status (online) of the current user
|
||||
//
|
||||
// Note
|
||||
// Method at API documentation: [im.user.status.set](@dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=93&LESSON_ID=11499)
|
||||
//
|
||||
// Parameters:
|
||||
// URL - String - URL of webhook or a Bitrix24 domain, when token used - url
|
||||
// Status - String, Number - Status value: online, dnd, away - status
|
||||
// Token - String - Access token, when app auth method used - token
|
||||
//
|
||||
// Returns:
|
||||
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
|
||||
Function SetUserStatus(Val URL, Val Status, Val Token = "") Export
|
||||
|
||||
Parameters = NormalizeAuth(URL, Token, "im.user.status.set");
|
||||
|
||||
OPI_Tools.AddField("STATUS", Status, "String", Parameters);
|
||||
|
||||
Response = OPI_Tools.Post(URL, Parameters);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Read all
|
||||
// Mark all message as readed
|
||||
//
|
||||
@@ -3251,6 +3323,107 @@ EndFunction
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region NotificationsManagment
|
||||
|
||||
// Create personal notification
|
||||
// Creates a personal notification to the user
|
||||
//
|
||||
// Note
|
||||
// Method at API documentation: [im.notify.personal.add](@dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=93&LESSON_ID=12129)
|
||||
//
|
||||
// Parameters:
|
||||
// URL - String - URL of webhook or a Bitrix24 domain, when token used - url
|
||||
// UserID - String, Number - User ID for sending the notification - user
|
||||
// Text - String - Notification text - text
|
||||
// Tag - String - Uniqueness Tag. Id already exist - another notif. will be deleted - tag
|
||||
// Attachments - Array of Structure - Array of attachments - blocks
|
||||
// Token - String - Access token, when app auth method used - token
|
||||
//
|
||||
// Returns:
|
||||
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
|
||||
Function CreatePersonalNotification(Val URL
|
||||
, Val UserID
|
||||
, Val Text
|
||||
, Val Tag
|
||||
, Val Attachments = ""
|
||||
, Val Token = "") Export
|
||||
|
||||
Parameters = NormalizeAuth(URL, Token, "im.notify.personal.add");
|
||||
|
||||
OPI_Tools.AddField("USER_ID", UserID, "String", Parameters);
|
||||
OPI_Tools.AddField("MESSAGE", Text , "String", Parameters);
|
||||
OPI_Tools.AddField("TAG" , Tag , "String", Parameters);
|
||||
OPI_Tools.AddField("ATTACH" , Attachments , "Array", Parameters);
|
||||
|
||||
Response = OPI_Tools.Post(URL, Parameters);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Create system notification
|
||||
// Creates a system notification to the user
|
||||
//
|
||||
// Note
|
||||
// Method at API documentation: [im.notify.system.add](@dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=93&LESSON_ID=12131)
|
||||
//
|
||||
// Parameters:
|
||||
// URL - String - URL of webhook or a Bitrix24 domain, when token used - url
|
||||
// UserID - String, Number - User ID for sending the notification - user
|
||||
// Text - String - Notification text - text
|
||||
// Tag - String - Uniqueness Tag. Id already exist - another notif. will be deleted - tag
|
||||
// Attachments - Array of Structure - Array of attachments - blocks
|
||||
// Token - String - Access token, when app auth method used - token
|
||||
//
|
||||
// Returns:
|
||||
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
|
||||
Function CreateSystemNotification(Val URL
|
||||
, Val UserID
|
||||
, Val Text
|
||||
, Val Tag
|
||||
, Val Attachments = ""
|
||||
, Val Token = "") Export
|
||||
|
||||
Parameters = NormalizeAuth(URL, Token, "im.notify.system.add");
|
||||
|
||||
OPI_Tools.AddField("USER_ID", UserID, "String", Parameters);
|
||||
OPI_Tools.AddField("MESSAGE", Text , "String", Parameters);
|
||||
OPI_Tools.AddField("TAG" , Tag , "String", Parameters);
|
||||
OPI_Tools.AddField("ATTACH" , Attachments , "Array", Parameters);
|
||||
|
||||
Response = OPI_Tools.Post(URL, Parameters);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Delete notification
|
||||
// Delete notification by ID
|
||||
//
|
||||
// Note
|
||||
// Method at API documentation: [im.notify.delete](@dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=93&LESSON_ID=12133)
|
||||
//
|
||||
// Parameters:
|
||||
// URL - String - URL of webhook or a Bitrix24 domain, when token used - url
|
||||
// NotificationID - String, Number - Notification ID - notif
|
||||
// Token - String - Access token, when app auth method used - token
|
||||
//
|
||||
// Returns:
|
||||
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
|
||||
Function DeleteNotification(Val URL, Val NotificationID, Val Token = "") Export
|
||||
|
||||
Parameters = NormalizeAuth(URL, Token, "im.notify.delete");
|
||||
|
||||
OPI_Tools.AddField("ID", NotificationID, "String", Parameters);
|
||||
|
||||
Response = OPI_Tools.Post(URL, Parameters);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region Private
|
||||
|
@@ -1,21 +1,21 @@
|
||||
<package-def>
|
||||
<module name="OPI_Cryptography" file="tools/Modules/internal/Modules/OPI_Cryptography.os"/>
|
||||
<module name="OPI_Tools" file="tools/Modules/internal/Modules/OPI_Tools.os"/>
|
||||
<module name="OPI_GoogleDrive" file="core/Modules/OPI_GoogleDrive.os"/>
|
||||
<module name="OPI_Twitter" file="core/Modules/OPI_Twitter.os"/>
|
||||
<module name="OPI_YandexID" file="core/Modules/OPI_YandexID.os"/>
|
||||
<module name="OPI_Dropbox" file="core/Modules/OPI_Dropbox.os"/>
|
||||
<module name="OPI_GoogleWorkspace" file="core/Modules/OPI_GoogleWorkspace.os"/>
|
||||
<module name="OPI_Bitrix24" file="core/Modules/OPI_Bitrix24.os"/>
|
||||
<module name="OPI_Viber" file="core/Modules/OPI_Viber.os"/>
|
||||
<module name="OPI_GoogleCalendar" file="core/Modules/OPI_GoogleCalendar.os"/>
|
||||
<module name="OPI_Telegram" file="core/Modules/OPI_Telegram.os"/>
|
||||
<module name="OPI_Airtable" file="core/Modules/OPI_Airtable.os"/>
|
||||
<module name="OPI_Slack" file="core/Modules/OPI_Slack.os"/>
|
||||
<module name="OPI_Notion" file="core/Modules/OPI_Notion.os"/>
|
||||
<module name="OPI_GoogleSheets" file="core/Modules/OPI_GoogleSheets.os"/>
|
||||
<module name="OPI_YandexDisk" file="core/Modules/OPI_YandexDisk.os"/>
|
||||
<module name="OPI_GoogleDrive" file="core/Modules/OPI_GoogleDrive.os"/>
|
||||
<module name="OPI_TypeConversion" file="tools/Modules/OPI_TypeConversion.os"/>
|
||||
<module name="OPI_Viber" file="core/Modules/OPI_Viber.os"/>
|
||||
<module name="OPI_GoogleSheets" file="core/Modules/OPI_GoogleSheets.os"/>
|
||||
<module name="OPI_Cryptography" file="tools/Modules/internal/Modules/OPI_Cryptography.os"/>
|
||||
<module name="OPI_Notion" file="core/Modules/OPI_Notion.os"/>
|
||||
<module name="OPI_VK" file="core/Modules/OPI_VK.os"/>
|
||||
<module name="OPI_Dropbox" file="core/Modules/OPI_Dropbox.os"/>
|
||||
<module name="OPI_YandexID" file="core/Modules/OPI_YandexID.os"/>
|
||||
<module name="OPI_Airtable" file="core/Modules/OPI_Airtable.os"/>
|
||||
<module name="OPI_Twitter" file="core/Modules/OPI_Twitter.os"/>
|
||||
<module name="OPI_Slack" file="core/Modules/OPI_Slack.os"/>
|
||||
<module name="OPI_GoogleCalendar" file="core/Modules/OPI_GoogleCalendar.os"/>
|
||||
<module name="OPI_Bitrix24" file="core/Modules/OPI_Bitrix24.os"/>
|
||||
<module name="OPI_Telegram" file="core/Modules/OPI_Telegram.os"/>
|
||||
<module name="OPI_YandexDisk" file="core/Modules/OPI_YandexDisk.os"/>
|
||||
<module name="OPI_TestDataRetrieval" file="tools/Modules/OPI_TestDataRetrieval.os"/>
|
||||
</package-def>
|
||||
|
@@ -3107,6 +3107,9 @@ Procedure B24_ChatManagment() Export
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Picture2" , TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Document" , TestParameters);
|
||||
|
||||
Bitrix24_GetUserStatus(TestParameters);
|
||||
Bitrix24_SetUserStatus(TestParameters);
|
||||
Bitrix24_GetUsers(TestParameters);
|
||||
Bitrix24_CreateChat(TestParameters);
|
||||
Bitrix24_GetChatUsers(TestParameters);
|
||||
Bitrix24_DeleteUserFromChat(TestParameters);
|
||||
@@ -3134,6 +3137,22 @@ Procedure B24_ChatManagment() Export
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure B24_NotificationsManagment() Export
|
||||
|
||||
TestParameters = New Structure;
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Bitrix24_URL" , TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Bitrix24_Domain", TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Bitrix24_Token" , TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Picture" , TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Picture2" , TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Document" , TestParameters);
|
||||
|
||||
Bitrix24_CreatePersonalNotification(TestParameters);
|
||||
Bitrix24_CreateSystemNotification(TestParameters);
|
||||
Bitrix24_DeleteNotification(TestParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
@@ -3678,6 +3697,10 @@ EndProcedure
|
||||
|
||||
Procedure Check_BitrixTrue(Val Result)
|
||||
OPI_TestDataRetrieval.ExpectsThat(Result["result"]).ИмеетТип("Boolean").Равно(True);
|
||||
EndProcedure
|
||||
|
||||
Procedure Check_BitrixBool(Val Result)
|
||||
OPI_TestDataRetrieval.ExpectsThat(Result["result"]).ИмеетТип("Boolean");
|
||||
EndProcedure
|
||||
|
||||
Procedure Check_BitrixString(Val Result)
|
||||
@@ -9326,6 +9349,191 @@ Procedure Bitrix24_SendFile(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure Bitrix24_GetUsers(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["Bitrix24_URL"];
|
||||
ArrayOfUsers = New Array;
|
||||
|
||||
ArrayOfUsers.Add(1);
|
||||
ArrayOfUsers.Add(10);
|
||||
|
||||
Result = OPI_Bitrix24.GetUsers(URL, ArrayOfUsers);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetUsers (wh)", "Bitrix24");
|
||||
|
||||
Check_BitrixMap(Result); // SKIP
|
||||
|
||||
URL = FunctionParameters["Bitrix24_Domain"];
|
||||
Token = FunctionParameters["Bitrix24_Token"];
|
||||
UserIDs = 10;
|
||||
|
||||
Result = OPI_Bitrix24.GetUsers(URL, UserIDs, Token);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetUsers", "Bitrix24");
|
||||
|
||||
Check_BitrixMap(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure Bitrix24_GetUserStatus(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["Bitrix24_URL"];
|
||||
|
||||
Result = OPI_Bitrix24.GetUserStatus(URL);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetUserStatus (wh)", "Bitrix24");
|
||||
|
||||
Check_BitrixString(Result); // SKIP
|
||||
|
||||
URL = FunctionParameters["Bitrix24_Domain"];
|
||||
Token = FunctionParameters["Bitrix24_Token"];
|
||||
|
||||
Result = OPI_Bitrix24.GetUserStatus(URL, Token);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetUserStatus", "Bitrix24");
|
||||
|
||||
Check_BitrixString(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure Bitrix24_SetUserStatus(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["Bitrix24_URL"];
|
||||
Status = "dnd";
|
||||
|
||||
Result = OPI_Bitrix24.SetUserStatus(URL, Status);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "SetUserStatus (wh)", "Bitrix24");
|
||||
|
||||
Check_BitrixTrue(Result); // SKIP
|
||||
|
||||
URL = FunctionParameters["Bitrix24_Domain"];
|
||||
Token = FunctionParameters["Bitrix24_Token"];
|
||||
Status = "away";
|
||||
|
||||
Result = OPI_Bitrix24.SetUserStatus(URL, Status, Token);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "SetUserStatus", "Bitrix24");
|
||||
|
||||
Check_BitrixTrue(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure Bitrix24_CreatePersonalNotification(FunctionParameters)
|
||||
|
||||
UserID = 1;
|
||||
|
||||
URL = FunctionParameters["Bitrix24_URL"];
|
||||
Text = "Message text";
|
||||
Image = "https://raw.githubusercontent.com/Bayselonarrend/OpenIntegrations/main/service/test_data/picture.jpg";
|
||||
File = "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/document.docx";
|
||||
|
||||
Attachments = New Array;
|
||||
Attachments.Add(OPI_Bitrix24.GetPictureBlock("Image1", Image));
|
||||
Attachments.Add(OPI_Bitrix24.GetFileBlock("File1.docx", File));
|
||||
|
||||
Result = OPI_Bitrix24.CreatePersonalNotification(URL, UserID, Text, ,Attachments);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreatePersonalNotification)", "Bitrix24");
|
||||
|
||||
Check_BitrixNumber(Result); // SKIP
|
||||
|
||||
MessageID = Result["result"]; // SKIP
|
||||
OPI_TestDataRetrieval.WriteParameter("Bitrix24_PersoalHookNotifyID", MessageID); // SKIP
|
||||
FunctionParameters.Insert("Bitrix24_PersoalHookNotifyID", MessageID); // SKIP
|
||||
|
||||
URL = FunctionParameters["Bitrix24_Domain"];
|
||||
Token = FunctionParameters["Bitrix24_Token"];
|
||||
Tag = "New";
|
||||
UserID = 10;
|
||||
|
||||
Result = OPI_Bitrix24.CreatePersonalNotification(URL, UserID, Text, Tag, , Token);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreatePersonalNotification", "Bitrix24");
|
||||
|
||||
Check_BitrixNumber(Result);
|
||||
|
||||
MessageID = Result["result"];
|
||||
OPI_TestDataRetrieval.WriteParameter("Bitrix24_PersoalNotifyID", MessageID);
|
||||
FunctionParameters.Insert("Bitrix24_PersoalNotifyID", MessageID);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure Bitrix24_CreateSystemNotification(FunctionParameters)
|
||||
|
||||
UserID = 1;
|
||||
|
||||
URL = FunctionParameters["Bitrix24_URL"];
|
||||
Text = "Message text";
|
||||
Image = "https://raw.githubusercontent.com/Bayselonarrend/OpenIntegrations/main/service/test_data/picture.jpg";
|
||||
File = "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/document.docx";
|
||||
|
||||
Attachments = New Array;
|
||||
Attachments.Add(OPI_Bitrix24.GetPictureBlock("Image1", Image));
|
||||
Attachments.Add(OPI_Bitrix24.GetFileBlock("File1.docx", File));
|
||||
|
||||
Result = OPI_Bitrix24.CreateSystemNotification(URL, UserID, Text, ,Attachments);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreateSystemNotification (wh)", "Bitrix24");
|
||||
|
||||
Check_BitrixNumber(Result); // SKIP
|
||||
|
||||
MessageID = Result["result"]; // SKIP
|
||||
OPI_TestDataRetrieval.WriteParameter("Bitrix24_SystemHookNotifyID", MessageID); // SKIP
|
||||
FunctionParameters.Insert("Bitrix24_SystemHookNotifyID", MessageID); // SKIP
|
||||
|
||||
URL = FunctionParameters["Bitrix24_Domain"];
|
||||
Token = FunctionParameters["Bitrix24_Token"];
|
||||
Tag = "New";
|
||||
UserID = 10;
|
||||
|
||||
Result = OPI_Bitrix24.CreateSystemNotification(URL, UserID, Text, Tag, , Token);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreateSystemNotification", "Bitrix24");
|
||||
|
||||
Check_BitrixNumber(Result);
|
||||
|
||||
MessageID = Result["result"];
|
||||
OPI_TestDataRetrieval.WriteParameter("Bitrix24_SystemNotifyID", MessageID);
|
||||
FunctionParameters.Insert("Bitrix24_SystemNotifyID", MessageID);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure Bitrix24_DeleteNotification(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["Bitrix24_URL"];
|
||||
NotificationID = FunctionParameters["Bitrix24_PersoalHookNotifyID"];
|
||||
|
||||
Result = OPI_Bitrix24.DeleteNotification(URL, NotificationID);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DeleteNotification", "Bitrix24");
|
||||
|
||||
Check_BitrixTrue(Result); // SKIP
|
||||
|
||||
URL = FunctionParameters["Bitrix24_Domain"];
|
||||
Token = FunctionParameters["Bitrix24_Token"];
|
||||
NotificationID = FunctionParameters["Bitrix24_PersoalNotifyID"];
|
||||
|
||||
Result = OPI_Bitrix24.DeleteNotification(URL, NotificationID, Token);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DeleteNotification (app)", "Bitrix24");
|
||||
|
||||
Check_BitrixBool(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region YandexDisk
|
||||
|
@@ -230,6 +230,7 @@ Function GetTestTable() Export
|
||||
NewTest(TestTable, "B24_Kanban" , "Kanban" , Bitrix);
|
||||
NewTest(TestTable, "B24_Timekeeping" , "Timekeeping" , Bitrix);
|
||||
NewTest(TestTable, "B24_ChatManagment" , "Chats works" , Bitrix);
|
||||
NewTest(TestTable, "B24_NotificationsManagment" , "Notifications managment" , Bitrix);
|
||||
|
||||
Return TestTable;
|
||||
|
||||
|
@@ -2605,6 +2605,31 @@ Function LeaveChat(Val URL, Val ChatID, Val Token = "") Export
|
||||
|
||||
EndFunction
|
||||
|
||||
// Get users
|
||||
// Get users information for dialog
|
||||
//
|
||||
// Note
|
||||
// Method at API documentation: [im.user.list.get ](@dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=93&LESSON_ID=11493)
|
||||
//
|
||||
// Parameters:
|
||||
// URL - String - URL of webhook or a Bitrix24 domain, when token used - url
|
||||
// UserIDs - Array of String, Number - Usesr ID or array of users IDs - users
|
||||
// Token - String - Access token, when app auth method used - token
|
||||
//
|
||||
// Returns:
|
||||
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
|
||||
Function GetUsers(Val URL, Val UserIDs, Val Token = "") Export
|
||||
|
||||
Parameters = NormalizeAuth(URL, Token, "im.user.list.get");
|
||||
|
||||
OPI_Tools.AddField("ID", UserIDs, "Array", Parameters);
|
||||
|
||||
Response = OPI_Tools.Post(URL, Parameters);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Add users to chat
|
||||
// Adds users to the chat by ID array
|
||||
//
|
||||
@@ -2932,6 +2957,53 @@ Function SendWritingNotification(Val URL, Val ChatID, Val Token = "") Export
|
||||
|
||||
EndFunction
|
||||
|
||||
// Get user status
|
||||
// Gets the status (online) of the current user
|
||||
//
|
||||
// Note
|
||||
// Method at API documentation: [im.user.status.get](@dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=93&LESSON_ID=11497)
|
||||
//
|
||||
// Parameters:
|
||||
// URL - String - URL of webhook or a Bitrix24 domain, when token used - url
|
||||
// Token - String - Access token, when app auth method used - token
|
||||
//
|
||||
// Returns:
|
||||
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
|
||||
Function GetUserStatus(Val URL, Val Token = "") Export
|
||||
|
||||
Parameters = NormalizeAuth(URL, Token, "im.user.status.get");
|
||||
|
||||
Response = OPI_Tools.Post(URL, Parameters);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Set user status
|
||||
// Sets the status (online) of the current user
|
||||
//
|
||||
// Note
|
||||
// Method at API documentation: [im.user.status.set](@dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=93&LESSON_ID=11499)
|
||||
//
|
||||
// Parameters:
|
||||
// URL - String - URL of webhook or a Bitrix24 domain, when token used - url
|
||||
// Status - String, Number - Status value: online, dnd, away - status
|
||||
// Token - String - Access token, when app auth method used - token
|
||||
//
|
||||
// Returns:
|
||||
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
|
||||
Function SetUserStatus(Val URL, Val Status, Val Token = "") Export
|
||||
|
||||
Parameters = NormalizeAuth(URL, Token, "im.user.status.set");
|
||||
|
||||
OPI_Tools.AddField("STATUS", Status, "String", Parameters);
|
||||
|
||||
Response = OPI_Tools.Post(URL, Parameters);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Read all
|
||||
// Mark all message as readed
|
||||
//
|
||||
@@ -3251,6 +3323,107 @@ EndFunction
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region NotificationsManagment
|
||||
|
||||
// Create personal notification
|
||||
// Creates a personal notification to the user
|
||||
//
|
||||
// Note
|
||||
// Method at API documentation: [im.notify.personal.add](@dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=93&LESSON_ID=12129)
|
||||
//
|
||||
// Parameters:
|
||||
// URL - String - URL of webhook or a Bitrix24 domain, when token used - url
|
||||
// UserID - String, Number - User ID for sending the notification - user
|
||||
// Text - String - Notification text - text
|
||||
// Tag - String - Uniqueness Tag. Id already exist - another notif. will be deleted - tag
|
||||
// Attachments - Array of Structure - Array of attachments - blocks
|
||||
// Token - String - Access token, when app auth method used - token
|
||||
//
|
||||
// Returns:
|
||||
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
|
||||
Function CreatePersonalNotification(Val URL
|
||||
, Val UserID
|
||||
, Val Text
|
||||
, Val Tag
|
||||
, Val Attachments = ""
|
||||
, Val Token = "") Export
|
||||
|
||||
Parameters = NormalizeAuth(URL, Token, "im.notify.personal.add");
|
||||
|
||||
OPI_Tools.AddField("USER_ID", UserID, "String", Parameters);
|
||||
OPI_Tools.AddField("MESSAGE", Text , "String", Parameters);
|
||||
OPI_Tools.AddField("TAG" , Tag , "String", Parameters);
|
||||
OPI_Tools.AddField("ATTACH" , Attachments , "Array", Parameters);
|
||||
|
||||
Response = OPI_Tools.Post(URL, Parameters);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Create system notification
|
||||
// Creates a system notification to the user
|
||||
//
|
||||
// Note
|
||||
// Method at API documentation: [im.notify.system.add](@dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=93&LESSON_ID=12131)
|
||||
//
|
||||
// Parameters:
|
||||
// URL - String - URL of webhook or a Bitrix24 domain, when token used - url
|
||||
// UserID - String, Number - User ID for sending the notification - user
|
||||
// Text - String - Notification text - text
|
||||
// Tag - String - Uniqueness Tag. Id already exist - another notif. will be deleted - tag
|
||||
// Attachments - Array of Structure - Array of attachments - blocks
|
||||
// Token - String - Access token, when app auth method used - token
|
||||
//
|
||||
// Returns:
|
||||
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
|
||||
Function CreateSystemNotification(Val URL
|
||||
, Val UserID
|
||||
, Val Text
|
||||
, Val Tag
|
||||
, Val Attachments = ""
|
||||
, Val Token = "") Export
|
||||
|
||||
Parameters = NormalizeAuth(URL, Token, "im.notify.system.add");
|
||||
|
||||
OPI_Tools.AddField("USER_ID", UserID, "String", Parameters);
|
||||
OPI_Tools.AddField("MESSAGE", Text , "String", Parameters);
|
||||
OPI_Tools.AddField("TAG" , Tag , "String", Parameters);
|
||||
OPI_Tools.AddField("ATTACH" , Attachments , "Array", Parameters);
|
||||
|
||||
Response = OPI_Tools.Post(URL, Parameters);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Delete notification
|
||||
// Delete notification by ID
|
||||
//
|
||||
// Note
|
||||
// Method at API documentation: [im.notify.delete](@dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=93&LESSON_ID=12133)
|
||||
//
|
||||
// Parameters:
|
||||
// URL - String - URL of webhook or a Bitrix24 domain, when token used - url
|
||||
// NotificationID - String, Number - Notification ID - notif
|
||||
// Token - String - Access token, when app auth method used - token
|
||||
//
|
||||
// Returns:
|
||||
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
|
||||
Function DeleteNotification(Val URL, Val NotificationID, Val Token = "") Export
|
||||
|
||||
Parameters = NormalizeAuth(URL, Token, "im.notify.delete");
|
||||
|
||||
OPI_Tools.AddField("ID", NotificationID, "String", Parameters);
|
||||
|
||||
Response = OPI_Tools.Post(URL, Parameters);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region Private
|
||||
|
@@ -230,6 +230,7 @@ Function GetTestTable() Export
|
||||
NewTest(TestTable, "B24_Kanban" , "Kanban" , Bitrix);
|
||||
NewTest(TestTable, "B24_Timekeeping" , "Timekeeping" , Bitrix);
|
||||
NewTest(TestTable, "B24_ChatManagment" , "Chats works" , Bitrix);
|
||||
NewTest(TestTable, "B24_NotificationsManagment" , "Notifications managment" , Bitrix);
|
||||
|
||||
Return TestTable;
|
||||
|
||||
|
@@ -3107,6 +3107,9 @@ Procedure B24_ChatManagment() Export
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Picture2" , TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Document" , TestParameters);
|
||||
|
||||
Bitrix24_GetUserStatus(TestParameters);
|
||||
Bitrix24_SetUserStatus(TestParameters);
|
||||
Bitrix24_GetUsers(TestParameters);
|
||||
Bitrix24_CreateChat(TestParameters);
|
||||
Bitrix24_GetChatUsers(TestParameters);
|
||||
Bitrix24_DeleteUserFromChat(TestParameters);
|
||||
@@ -3134,6 +3137,22 @@ Procedure B24_ChatManagment() Export
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure B24_NotificationsManagment() Export
|
||||
|
||||
TestParameters = New Structure;
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Bitrix24_URL" , TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Bitrix24_Domain", TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Bitrix24_Token" , TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Picture" , TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Picture2" , TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Document" , TestParameters);
|
||||
|
||||
Bitrix24_CreatePersonalNotification(TestParameters);
|
||||
Bitrix24_CreateSystemNotification(TestParameters);
|
||||
Bitrix24_DeleteNotification(TestParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
@@ -3678,6 +3697,10 @@ EndProcedure
|
||||
|
||||
Procedure Check_BitrixTrue(Val Result)
|
||||
OPI_TestDataRetrieval.ExpectsThat(Result["result"]).ИмеетТип("Boolean").Равно(True);
|
||||
EndProcedure
|
||||
|
||||
Procedure Check_BitrixBool(Val Result)
|
||||
OPI_TestDataRetrieval.ExpectsThat(Result["result"]).ИмеетТип("Boolean");
|
||||
EndProcedure
|
||||
|
||||
Procedure Check_BitrixString(Val Result)
|
||||
@@ -9326,6 +9349,191 @@ Procedure Bitrix24_SendFile(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure Bitrix24_GetUsers(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["Bitrix24_URL"];
|
||||
ArrayOfUsers = New Array;
|
||||
|
||||
ArrayOfUsers.Add(1);
|
||||
ArrayOfUsers.Add(10);
|
||||
|
||||
Result = OPI_Bitrix24.GetUsers(URL, ArrayOfUsers);
|
||||
|
||||
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "GetUsers (wh)", "Bitrix24");
|
||||
|
||||
Check_BitrixMap(Result); // SKIP
|
||||
|
||||
URL = FunctionParameters["Bitrix24_Domain"];
|
||||
Token = FunctionParameters["Bitrix24_Token"];
|
||||
UserIDs = 10;
|
||||
|
||||
Result = OPI_Bitrix24.GetUsers(URL, UserIDs, Token);
|
||||
|
||||
// END
|
||||
|
||||
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "GetUsers", "Bitrix24");
|
||||
|
||||
Check_BitrixMap(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure Bitrix24_GetUserStatus(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["Bitrix24_URL"];
|
||||
|
||||
Result = OPI_Bitrix24.GetUserStatus(URL);
|
||||
|
||||
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "GetUserStatus (wh)", "Bitrix24");
|
||||
|
||||
Check_BitrixString(Result); // SKIP
|
||||
|
||||
URL = FunctionParameters["Bitrix24_Domain"];
|
||||
Token = FunctionParameters["Bitrix24_Token"];
|
||||
|
||||
Result = OPI_Bitrix24.GetUserStatus(URL, Token);
|
||||
|
||||
// END
|
||||
|
||||
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "GetUserStatus", "Bitrix24");
|
||||
|
||||
Check_BitrixString(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure Bitrix24_SetUserStatus(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["Bitrix24_URL"];
|
||||
Status = "dnd";
|
||||
|
||||
Result = OPI_Bitrix24.SetUserStatus(URL, Status);
|
||||
|
||||
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "SetUserStatus (wh)", "Bitrix24");
|
||||
|
||||
Check_BitrixTrue(Result); // SKIP
|
||||
|
||||
URL = FunctionParameters["Bitrix24_Domain"];
|
||||
Token = FunctionParameters["Bitrix24_Token"];
|
||||
Status = "away";
|
||||
|
||||
Result = OPI_Bitrix24.SetUserStatus(URL, Status, Token);
|
||||
|
||||
// END
|
||||
|
||||
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "SetUserStatus", "Bitrix24");
|
||||
|
||||
Check_BitrixTrue(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure Bitrix24_CreatePersonalNotification(FunctionParameters)
|
||||
|
||||
UserID = 1;
|
||||
|
||||
URL = FunctionParameters["Bitrix24_URL"];
|
||||
Text = "Message text";
|
||||
Image = "https://raw.githubusercontent.com/Bayselonarrend/OpenIntegrations/main/service/test_data/picture.jpg";
|
||||
File = "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/document.docx";
|
||||
|
||||
Attachments = New Array;
|
||||
Attachments.Add(OPI_Bitrix24.GetPictureBlock("Image1", Image));
|
||||
Attachments.Add(OPI_Bitrix24.GetFileBlock("File1.docx", File));
|
||||
|
||||
Result = OPI_Bitrix24.CreatePersonalNotification(URL, UserID, Text, ,Attachments);
|
||||
|
||||
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "CreatePersonalNotification)", "Bitrix24");
|
||||
|
||||
Check_BitrixNumber(Result); // SKIP
|
||||
|
||||
MessageID = Result["result"]; // SKIP
|
||||
OPI_TestDataRetrieval.WriteParameter("Bitrix24_PersoalHookNotifyID", MessageID); // SKIP
|
||||
FunctionParameters.Insert("Bitrix24_PersoalHookNotifyID", MessageID); // SKIP
|
||||
|
||||
URL = FunctionParameters["Bitrix24_Domain"];
|
||||
Token = FunctionParameters["Bitrix24_Token"];
|
||||
Tag = "New";
|
||||
UserID = 10;
|
||||
|
||||
Result = OPI_Bitrix24.CreatePersonalNotification(URL, UserID, Text, Tag, , Token);
|
||||
|
||||
// END
|
||||
|
||||
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "CreatePersonalNotification", "Bitrix24");
|
||||
|
||||
Check_BitrixNumber(Result);
|
||||
|
||||
MessageID = Result["result"];
|
||||
OPI_TestDataRetrieval.WriteParameter("Bitrix24_PersoalNotifyID", MessageID);
|
||||
FunctionParameters.Insert("Bitrix24_PersoalNotifyID", MessageID);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure Bitrix24_CreateSystemNotification(FunctionParameters)
|
||||
|
||||
UserID = 1;
|
||||
|
||||
URL = FunctionParameters["Bitrix24_URL"];
|
||||
Text = "Message text";
|
||||
Image = "https://raw.githubusercontent.com/Bayselonarrend/OpenIntegrations/main/service/test_data/picture.jpg";
|
||||
File = "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/document.docx";
|
||||
|
||||
Attachments = New Array;
|
||||
Attachments.Add(OPI_Bitrix24.GetPictureBlock("Image1", Image));
|
||||
Attachments.Add(OPI_Bitrix24.GetFileBlock("File1.docx", File));
|
||||
|
||||
Result = OPI_Bitrix24.CreateSystemNotification(URL, UserID, Text, ,Attachments);
|
||||
|
||||
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "CreateSystemNotification (wh)", "Bitrix24");
|
||||
|
||||
Check_BitrixNumber(Result); // SKIP
|
||||
|
||||
MessageID = Result["result"]; // SKIP
|
||||
OPI_TestDataRetrieval.WriteParameter("Bitrix24_SystemHookNotifyID", MessageID); // SKIP
|
||||
FunctionParameters.Insert("Bitrix24_SystemHookNotifyID", MessageID); // SKIP
|
||||
|
||||
URL = FunctionParameters["Bitrix24_Domain"];
|
||||
Token = FunctionParameters["Bitrix24_Token"];
|
||||
Tag = "New";
|
||||
UserID = 10;
|
||||
|
||||
Result = OPI_Bitrix24.CreateSystemNotification(URL, UserID, Text, Tag, , Token);
|
||||
|
||||
// END
|
||||
|
||||
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "CreateSystemNotification", "Bitrix24");
|
||||
|
||||
Check_BitrixNumber(Result);
|
||||
|
||||
MessageID = Result["result"];
|
||||
OPI_TestDataRetrieval.WriteParameter("Bitrix24_SystemNotifyID", MessageID);
|
||||
FunctionParameters.Insert("Bitrix24_SystemNotifyID", MessageID);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure Bitrix24_DeleteNotification(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["Bitrix24_URL"];
|
||||
NotificationID = FunctionParameters["Bitrix24_PersoalHookNotifyID"];
|
||||
|
||||
Result = OPI_Bitrix24.DeleteNotification(URL, NotificationID);
|
||||
|
||||
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "DeleteNotification", "Bitrix24");
|
||||
|
||||
Check_BitrixTrue(Result); // SKIP
|
||||
|
||||
URL = FunctionParameters["Bitrix24_Domain"];
|
||||
Token = FunctionParameters["Bitrix24_Token"];
|
||||
NotificationID = FunctionParameters["Bitrix24_PersoalNotifyID"];
|
||||
|
||||
Result = OPI_Bitrix24.DeleteNotification(URL, NotificationID, Token);
|
||||
|
||||
// END
|
||||
|
||||
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "DeleteNotification (app)", "Bitrix24");
|
||||
|
||||
Check_BitrixBool(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region YandexDisk
|
||||
|
@@ -3534,6 +3534,37 @@
|
||||
NewLine.Область = "Chats and dialogs managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "GetUsers";
|
||||
NewLine.МетодПоиска = "GETUSERS";
|
||||
NewLine.Параметр = "--url";
|
||||
NewLine.Описание = "URL of webhook or a Bitrix24 domain, when token used";
|
||||
NewLine.Область = "Chats and dialogs managment";
|
||||
NewLine.ОписаниеМетода = "Get users information for dialog";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "GetUsers";
|
||||
NewLine.МетодПоиска = "GETUSERS";
|
||||
NewLine.Параметр = "--users";
|
||||
NewLine.Описание = "Usesr ID or array of users IDs";
|
||||
NewLine.Область = "Chats and dialogs managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "GetUsers";
|
||||
NewLine.МетодПоиска = "GETUSERS";
|
||||
NewLine.Параметр = "--token";
|
||||
NewLine.Описание = "Access token, when app auth method used (optional, def. val. - Empty value)";
|
||||
NewLine.Область = "Chats and dialogs managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
@@ -3996,6 +4027,58 @@
|
||||
NewLine.Область = "Chats and dialogs managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "GetUserStatus";
|
||||
NewLine.МетодПоиска = "GETUSERSTATUS";
|
||||
NewLine.Параметр = "--url";
|
||||
NewLine.Описание = "URL of webhook or a Bitrix24 domain, when token used";
|
||||
NewLine.Область = "Chats and dialogs managment";
|
||||
NewLine.ОписаниеМетода = "Gets the status (online) of the current user";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "GetUserStatus";
|
||||
NewLine.МетодПоиска = "GETUSERSTATUS";
|
||||
NewLine.Параметр = "--token";
|
||||
NewLine.Описание = "Access token, when app auth method used (optional, def. val. - Empty value)";
|
||||
NewLine.Область = "Chats and dialogs managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "SetUserStatus";
|
||||
NewLine.МетодПоиска = "SETUSERSTATUS";
|
||||
NewLine.Параметр = "--url";
|
||||
NewLine.Описание = "URL of webhook or a Bitrix24 domain, when token used";
|
||||
NewLine.Область = "Chats and dialogs managment";
|
||||
NewLine.ОписаниеМетода = "Sets the status (online) of the current user";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "SetUserStatus";
|
||||
NewLine.МетодПоиска = "SETUSERSTATUS";
|
||||
NewLine.Параметр = "--status";
|
||||
NewLine.Описание = "Status value: online, dnd, away";
|
||||
NewLine.Область = "Chats and dialogs managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "SetUserStatus";
|
||||
NewLine.МетодПоиска = "SETUSERSTATUS";
|
||||
NewLine.Параметр = "--token";
|
||||
NewLine.Описание = "Access token, when app auth method used (optional, def. val. - Empty value)";
|
||||
NewLine.Область = "Chats and dialogs managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
@@ -4397,6 +4480,159 @@
|
||||
NewLine.Описание = "File URL";
|
||||
NewLine.Область = "Message management";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "CreatePersonalNotification";
|
||||
NewLine.МетодПоиска = "CREATEPERSONALNOTIFICATION";
|
||||
NewLine.Параметр = "--url";
|
||||
NewLine.Описание = "URL of webhook or a Bitrix24 domain, when token used";
|
||||
NewLine.Область = "Notifications managment";
|
||||
NewLine.ОписаниеМетода = "Creates a personal notification to the user";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "CreatePersonalNotification";
|
||||
NewLine.МетодПоиска = "CREATEPERSONALNOTIFICATION";
|
||||
NewLine.Параметр = "--user";
|
||||
NewLine.Описание = "User ID for sending the notification";
|
||||
NewLine.Область = "Notifications managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "CreatePersonalNotification";
|
||||
NewLine.МетодПоиска = "CREATEPERSONALNOTIFICATION";
|
||||
NewLine.Параметр = "--text";
|
||||
NewLine.Описание = "Notification text";
|
||||
NewLine.Область = "Notifications managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "CreatePersonalNotification";
|
||||
NewLine.МетодПоиска = "CREATEPERSONALNOTIFICATION";
|
||||
NewLine.Параметр = "--another notif. will be deleted";
|
||||
NewLine.Описание = "tag";
|
||||
NewLine.Область = "Notifications managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "CreatePersonalNotification";
|
||||
NewLine.МетодПоиска = "CREATEPERSONALNOTIFICATION";
|
||||
NewLine.Параметр = "--blocks";
|
||||
NewLine.Описание = "Array of attachments (optional, def. val. - Empty value)";
|
||||
NewLine.Область = "Notifications managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "CreatePersonalNotification";
|
||||
NewLine.МетодПоиска = "CREATEPERSONALNOTIFICATION";
|
||||
NewLine.Параметр = "--token";
|
||||
NewLine.Описание = "Access token, when app auth method used (optional, def. val. - Empty value)";
|
||||
NewLine.Область = "Notifications managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "CreateSystemNotification";
|
||||
NewLine.МетодПоиска = "CREATESYSTEMNOTIFICATION";
|
||||
NewLine.Параметр = "--url";
|
||||
NewLine.Описание = "URL of webhook or a Bitrix24 domain, when token used";
|
||||
NewLine.Область = "Notifications managment";
|
||||
NewLine.ОписаниеМетода = "Creates a system notification to the user";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "CreateSystemNotification";
|
||||
NewLine.МетодПоиска = "CREATESYSTEMNOTIFICATION";
|
||||
NewLine.Параметр = "--user";
|
||||
NewLine.Описание = "User ID for sending the notification";
|
||||
NewLine.Область = "Notifications managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "CreateSystemNotification";
|
||||
NewLine.МетодПоиска = "CREATESYSTEMNOTIFICATION";
|
||||
NewLine.Параметр = "--text";
|
||||
NewLine.Описание = "Notification text";
|
||||
NewLine.Область = "Notifications managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "CreateSystemNotification";
|
||||
NewLine.МетодПоиска = "CREATESYSTEMNOTIFICATION";
|
||||
NewLine.Параметр = "--another notif. will be deleted";
|
||||
NewLine.Описание = "tag";
|
||||
NewLine.Область = "Notifications managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "CreateSystemNotification";
|
||||
NewLine.МетодПоиска = "CREATESYSTEMNOTIFICATION";
|
||||
NewLine.Параметр = "--blocks";
|
||||
NewLine.Описание = "Array of attachments (optional, def. val. - Empty value)";
|
||||
NewLine.Область = "Notifications managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "CreateSystemNotification";
|
||||
NewLine.МетодПоиска = "CREATESYSTEMNOTIFICATION";
|
||||
NewLine.Параметр = "--token";
|
||||
NewLine.Описание = "Access token, when app auth method used (optional, def. val. - Empty value)";
|
||||
NewLine.Область = "Notifications managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "DeleteNotification";
|
||||
NewLine.МетодПоиска = "DELETENOTIFICATION";
|
||||
NewLine.Параметр = "--url";
|
||||
NewLine.Описание = "URL of webhook or a Bitrix24 domain, when token used";
|
||||
NewLine.Область = "Notifications managment";
|
||||
NewLine.ОписаниеМетода = "Delete notification by ID";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "DeleteNotification";
|
||||
NewLine.МетодПоиска = "DELETENOTIFICATION";
|
||||
NewLine.Параметр = "--notif";
|
||||
NewLine.Описание = "Notification ID";
|
||||
NewLine.Область = "Notifications managment";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "bitrix24";
|
||||
NewLine.Модуль = "OPI_Bitrix24";
|
||||
NewLine.Метод = "DeleteNotification";
|
||||
NewLine.МетодПоиска = "DELETENOTIFICATION";
|
||||
NewLine.Параметр = "--token";
|
||||
NewLine.Описание = "Access token, when app auth method used (optional, def. val. - Empty value)";
|
||||
NewLine.Область = "Notifications managment";
|
||||
|
||||
Return CompositionTable;
|
||||
EndFunction
|
||||
|
||||
|
@@ -6,21 +6,21 @@
|
||||
|
||||
Функция ПолучитьСоответствиеКомандМодулей() Экспорт
|
||||
СоответствиеКомандМодулей = Новый Соответствие();
|
||||
СоответствиеКомандМодулей.Вставить("vk", "OPI_VK");
|
||||
СоответствиеКомандМодулей.Вставить("gsheets", "OPI_GoogleSheets");
|
||||
СоответствиеКомандМодулей.Вставить("notion", "OPI_Notion");
|
||||
СоответствиеКомандМодулей.Вставить("yadisk", "OPI_YandexDisk");
|
||||
СоответствиеКомандМодулей.Вставить("gcalendar", "OPI_GoogleCalendar");
|
||||
СоответствиеКомандМодулей.Вставить("google", "OPI_GoogleWorkspace");
|
||||
СоответствиеКомандМодулей.Вставить("yandex", "OPI_YandexID");
|
||||
СоответствиеКомандМодулей.Вставить("twitter", "OPI_Twitter");
|
||||
СоответствиеКомандМодулей.Вставить("slack", "OPI_Slack");
|
||||
СоответствиеКомандМодулей.Вставить("viber", "OPI_Viber");
|
||||
СоответствиеКомандМодулей.Вставить("airtable", "OPI_Airtable");
|
||||
СоответствиеКомандМодулей.Вставить("gdrive", "OPI_GoogleDrive");
|
||||
СоответствиеКомандМодулей.Вставить("telegram", "OPI_Telegram");
|
||||
СоответствиеКомандМодулей.Вставить("viber", "OPI_Viber");
|
||||
СоответствиеКомандМодулей.Вставить("vk", "OPI_VK");
|
||||
СоответствиеКомандМодулей.Вставить("yadisk", "OPI_YandexDisk");
|
||||
СоответствиеКомандМодулей.Вставить("notion", "OPI_Notion");
|
||||
СоответствиеКомандМодулей.Вставить("twitter", "OPI_Twitter");
|
||||
СоответствиеКомандМодулей.Вставить("gdrive", "OPI_GoogleDrive");
|
||||
СоответствиеКомандМодулей.Вставить("google", "OPI_GoogleWorkspace");
|
||||
СоответствиеКомандМодулей.Вставить("gsheets", "OPI_GoogleSheets");
|
||||
СоответствиеКомандМодулей.Вставить("gcalendar", "OPI_GoogleCalendar");
|
||||
СоответствиеКомандМодулей.Вставить("slack", "OPI_Slack");
|
||||
СоответствиеКомандМодулей.Вставить("bitrix24", "OPI_Bitrix24");
|
||||
СоответствиеКомандМодулей.Вставить("dropbox", "OPI_Dropbox");
|
||||
СоответствиеКомандМодулей.Вставить("airtable", "OPI_Airtable");
|
||||
СоответствиеКомандМодулей.Вставить("yandex", "OPI_YandexID");
|
||||
Возврат СоответствиеКомандМодулей;
|
||||
КонецФункции
|
||||
|
||||
|
@@ -1 +0,0 @@
|
||||
cmd /k oint.exe
|
@@ -1,21 +1,21 @@
|
||||
<package-def>
|
||||
<module name="OPI_Airtable" file="core/Modules/OPI_Airtable.os"/>
|
||||
<module name="OPI_Bitrix24" file="core/Modules/OPI_Bitrix24.os"/>
|
||||
<module name="OPI_Dropbox" file="core/Modules/OPI_Dropbox.os"/>
|
||||
<module name="OPI_GoogleCalendar" file="core/Modules/OPI_GoogleCalendar.os"/>
|
||||
<module name="OPI_GoogleDrive" file="core/Modules/OPI_GoogleDrive.os"/>
|
||||
<module name="OPI_GoogleSheets" file="core/Modules/OPI_GoogleSheets.os"/>
|
||||
<module name="OPI_GoogleWorkspace" file="core/Modules/OPI_GoogleWorkspace.os"/>
|
||||
<module name="OPI_Notion" file="core/Modules/OPI_Notion.os"/>
|
||||
<module name="OPI_Slack" file="core/Modules/OPI_Slack.os"/>
|
||||
<module name="OPI_Telegram" file="core/Modules/OPI_Telegram.os"/>
|
||||
<module name="OPI_Twitter" file="core/Modules/OPI_Twitter.os"/>
|
||||
<module name="OPI_Viber" file="core/Modules/OPI_Viber.os"/>
|
||||
<module name="OPI_VK" file="core/Modules/OPI_VK.os"/>
|
||||
<module name="OPI_YandexDisk" file="core/Modules/OPI_YandexDisk.os"/>
|
||||
<module name="OPI_YandexID" file="core/Modules/OPI_YandexID.os"/>
|
||||
<module name="OPI_Инструменты" file="tools/Modules/internal/Modules/OPI_Инструменты.os"/>
|
||||
<module name="OPI_Криптография" file="tools/Modules/internal/Modules/OPI_Криптография.os"/>
|
||||
<module name="OPI_ПолучениеДанныхТестов" file="tools/Modules/OPI_ПолучениеДанныхТестов.os"/>
|
||||
<module name="OPI_GoogleWorkspace" file="core/Modules/OPI_GoogleWorkspace.os"/>
|
||||
<module name="OPI_GoogleDrive" file="core/Modules/OPI_GoogleDrive.os"/>
|
||||
<module name="OPI_ПреобразованиеТипов" file="tools/Modules/OPI_ПреобразованиеТипов.os"/>
|
||||
<module name="OPI_Viber" file="core/Modules/OPI_Viber.os"/>
|
||||
<module name="OPI_GoogleSheets" file="core/Modules/OPI_GoogleSheets.os"/>
|
||||
<module name="OPI_Криптография" file="tools/Modules/internal/Modules/OPI_Криптография.os"/>
|
||||
<module name="OPI_Notion" file="core/Modules/OPI_Notion.os"/>
|
||||
<module name="OPI_VK" file="core/Modules/OPI_VK.os"/>
|
||||
<module name="OPI_Dropbox" file="core/Modules/OPI_Dropbox.os"/>
|
||||
<module name="OPI_YandexID" file="core/Modules/OPI_YandexID.os"/>
|
||||
<module name="OPI_Airtable" file="core/Modules/OPI_Airtable.os"/>
|
||||
<module name="OPI_Twitter" file="core/Modules/OPI_Twitter.os"/>
|
||||
<module name="OPI_Slack" file="core/Modules/OPI_Slack.os"/>
|
||||
<module name="OPI_GoogleCalendar" file="core/Modules/OPI_GoogleCalendar.os"/>
|
||||
<module name="OPI_Bitrix24" file="core/Modules/OPI_Bitrix24.os"/>
|
||||
<module name="OPI_Telegram" file="core/Modules/OPI_Telegram.os"/>
|
||||
<module name="OPI_YandexDisk" file="core/Modules/OPI_YandexDisk.os"/>
|
||||
<module name="OPI_ПолучениеДанныхТестов" file="tools/Modules/OPI_ПолучениеДанныхТестов.os"/>
|
||||
</package-def>
|
||||
|
@@ -3538,6 +3538,41 @@
|
||||
НоваяСтрока.Область = "Работа с чатами и диалогами";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "ПолучитьПользователей";
|
||||
НоваяСтрока.МетодПоиска = "ПОЛУЧИТЬПОЛЬЗОВАТЕЛЕЙ";
|
||||
НоваяСтрока.Параметр = "--url";
|
||||
НоваяСтрока.Описание = "URL внешнего вебхука или адрес Bitrix24 при использовании токена";
|
||||
НоваяСтрока.Область = "Работа с чатами и диалогами";
|
||||
НоваяСтрока.ОписаниеМетода = "Получает информацию о пользователях для диалога
|
||||
|
|
||||
| Пример указания параметра типа массив:
|
||||
| --param ""['Val1','Val2','Val3']""
|
||||
|";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "ПолучитьПользователей";
|
||||
НоваяСтрока.МетодПоиска = "ПОЛУЧИТЬПОЛЬЗОВАТЕЛЕЙ";
|
||||
НоваяСтрока.Параметр = "--users";
|
||||
НоваяСтрока.Описание = "ID пользователя или нескольких пользователей";
|
||||
НоваяСтрока.Область = "Работа с чатами и диалогами";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "ПолучитьПользователей";
|
||||
НоваяСтрока.МетодПоиска = "ПОЛУЧИТЬПОЛЬЗОВАТЕЛЕЙ";
|
||||
НоваяСтрока.Параметр = "--token";
|
||||
НоваяСтрока.Описание = "Токен авторизации, если используется не вебхук (необяз. по ум. - Пустое значение)";
|
||||
НоваяСтрока.Область = "Работа с чатами и диалогами";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
@@ -4004,6 +4039,58 @@
|
||||
НоваяСтрока.Область = "Работа с чатами и диалогами";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "ПолучитьСтатусПользователя";
|
||||
НоваяСтрока.МетодПоиска = "ПОЛУЧИТЬСТАТУСПОЛЬЗОВАТЕЛЯ";
|
||||
НоваяСтрока.Параметр = "--url";
|
||||
НоваяСтрока.Описание = "URL внешнего вебхука или адрес Bitrix24 при использовании токена";
|
||||
НоваяСтрока.Область = "Работа с чатами и диалогами";
|
||||
НоваяСтрока.ОписаниеМетода = "Получает статус (онлайн) текущего пользователя";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "ПолучитьСтатусПользователя";
|
||||
НоваяСтрока.МетодПоиска = "ПОЛУЧИТЬСТАТУСПОЛЬЗОВАТЕЛЯ";
|
||||
НоваяСтрока.Параметр = "--token";
|
||||
НоваяСтрока.Описание = "Токен авторизации, если используется не вебхук (необяз. по ум. - Пустое значение)";
|
||||
НоваяСтрока.Область = "Работа с чатами и диалогами";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "УстановитьСтатусПользователя";
|
||||
НоваяСтрока.МетодПоиска = "УСТАНОВИТЬСТАТУСПОЛЬЗОВАТЕЛЯ";
|
||||
НоваяСтрока.Параметр = "--url";
|
||||
НоваяСтрока.Описание = "URL внешнего вебхука или адрес Bitrix24 при использовании токена";
|
||||
НоваяСтрока.Область = "Работа с чатами и диалогами";
|
||||
НоваяСтрока.ОписаниеМетода = "Устанавливает статус (онлайн) текущего пользователя";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "УстановитьСтатусПользователя";
|
||||
НоваяСтрока.МетодПоиска = "УСТАНОВИТЬСТАТУСПОЛЬЗОВАТЕЛЯ";
|
||||
НоваяСтрока.Параметр = "--status";
|
||||
НоваяСтрока.Описание = "Статус пользователя: online, dnd, away";
|
||||
НоваяСтрока.Область = "Работа с чатами и диалогами";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "УстановитьСтатусПользователя";
|
||||
НоваяСтрока.МетодПоиска = "УСТАНОВИТЬСТАТУСПОЛЬЗОВАТЕЛЯ";
|
||||
НоваяСтрока.Параметр = "--token";
|
||||
НоваяСтрока.Описание = "Токен авторизации, если используется не вебхук (необяз. по ум. - Пустое значение)";
|
||||
НоваяСтрока.Область = "Работа с чатами и диалогами";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
@@ -4413,6 +4500,167 @@
|
||||
НоваяСтрока.Описание = "URL файла для отправки";
|
||||
НоваяСтрока.Область = "Работа с сообщениями";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "СоздатьПерсональноеУведомление";
|
||||
НоваяСтрока.МетодПоиска = "СОЗДАТЬПЕРСОНАЛЬНОЕУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--url";
|
||||
НоваяСтрока.Описание = "URL внешнего вебхука или адрес Bitrix24 при использовании токена";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
НоваяСтрока.ОписаниеМетода = "Создает персональное уведомление пользователю
|
||||
|
|
||||
| Пример указания параметра типа массив:
|
||||
| --param ""['Val1','Val2','Val3']""
|
||||
|";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "СоздатьПерсональноеУведомление";
|
||||
НоваяСтрока.МетодПоиска = "СОЗДАТЬПЕРСОНАЛЬНОЕУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--user";
|
||||
НоваяСтрока.Описание = "ID пользователя для отправки уведомления";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "СоздатьПерсональноеУведомление";
|
||||
НоваяСтрока.МетодПоиска = "СОЗДАТЬПЕРСОНАЛЬНОЕУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--text";
|
||||
НоваяСтрока.Описание = "Текст уведомления";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "СоздатьПерсональноеУведомление";
|
||||
НоваяСтрока.МетодПоиска = "СОЗДАТЬПЕРСОНАЛЬНОЕУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--другие увед. будут удалены";
|
||||
НоваяСтрока.Описание = "tag";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "СоздатьПерсональноеУведомление";
|
||||
НоваяСтрока.МетодПоиска = "СОЗДАТЬПЕРСОНАЛЬНОЕУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--blocks";
|
||||
НоваяСтрока.Описание = "Массив блоков вложений (необяз. по ум. - Пустое значение)";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "СоздатьПерсональноеУведомление";
|
||||
НоваяСтрока.МетодПоиска = "СОЗДАТЬПЕРСОНАЛЬНОЕУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--token";
|
||||
НоваяСтрока.Описание = "Токен авторизации, если используется не вебхук (необяз. по ум. - Пустое значение)";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "СоздатьСистемноеУведомление";
|
||||
НоваяСтрока.МетодПоиска = "СОЗДАТЬСИСТЕМНОЕУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--url";
|
||||
НоваяСтрока.Описание = "URL внешнего вебхука или адрес Bitrix24 при использовании токена";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
НоваяСтрока.ОписаниеМетода = "Создает системное уведомление пользователю
|
||||
|
|
||||
| Пример указания параметра типа массив:
|
||||
| --param ""['Val1','Val2','Val3']""
|
||||
|";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "СоздатьСистемноеУведомление";
|
||||
НоваяСтрока.МетодПоиска = "СОЗДАТЬСИСТЕМНОЕУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--user";
|
||||
НоваяСтрока.Описание = "ID пользователя для отправки уведомления";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "СоздатьСистемноеУведомление";
|
||||
НоваяСтрока.МетодПоиска = "СОЗДАТЬСИСТЕМНОЕУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--text";
|
||||
НоваяСтрока.Описание = "Текст уведомления";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "СоздатьСистемноеУведомление";
|
||||
НоваяСтрока.МетодПоиска = "СОЗДАТЬСИСТЕМНОЕУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--другие увед. будут удалены";
|
||||
НоваяСтрока.Описание = "tag";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "СоздатьСистемноеУведомление";
|
||||
НоваяСтрока.МетодПоиска = "СОЗДАТЬСИСТЕМНОЕУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--blocks";
|
||||
НоваяСтрока.Описание = "Массив блоков вложений (необяз. по ум. - Пустое значение)";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "СоздатьСистемноеУведомление";
|
||||
НоваяСтрока.МетодПоиска = "СОЗДАТЬСИСТЕМНОЕУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--token";
|
||||
НоваяСтрока.Описание = "Токен авторизации, если используется не вебхук (необяз. по ум. - Пустое значение)";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "УдалитьУведомление";
|
||||
НоваяСтрока.МетодПоиска = "УДАЛИТЬУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--url";
|
||||
НоваяСтрока.Описание = "URL внешнего вебхука или адрес Bitrix24 при использовании токена";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
НоваяСтрока.ОписаниеМетода = "Удаляет уведомление по ID";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "УдалитьУведомление";
|
||||
НоваяСтрока.МетодПоиска = "УДАЛИТЬУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--notif";
|
||||
НоваяСтрока.Описание = "ID уведомления для удаления";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "bitrix24";
|
||||
НоваяСтрока.Модуль = "OPI_Bitrix24";
|
||||
НоваяСтрока.Метод = "УдалитьУведомление";
|
||||
НоваяСтрока.МетодПоиска = "УДАЛИТЬУВЕДОМЛЕНИЕ";
|
||||
НоваяСтрока.Параметр = "--token";
|
||||
НоваяСтрока.Описание = "Токен авторизации, если используется не вебхук (необяз. по ум. - Пустое значение)";
|
||||
НоваяСтрока.Область = "Работа с уведомлениями";
|
||||
|
||||
Возврат ТаблицаСостава;
|
||||
КонецФункции
|
||||
|
||||
|
@@ -6,21 +6,21 @@
|
||||
|
||||
Функция ПолучитьСоответствиеКомандМодулей() Экспорт
|
||||
СоответствиеКомандМодулей = Новый Соответствие();
|
||||
СоответствиеКомандМодулей.Вставить("vk", "OPI_VK");
|
||||
СоответствиеКомандМодулей.Вставить("gsheets", "OPI_GoogleSheets");
|
||||
СоответствиеКомандМодулей.Вставить("notion", "OPI_Notion");
|
||||
СоответствиеКомандМодулей.Вставить("yadisk", "OPI_YandexDisk");
|
||||
СоответствиеКомандМодулей.Вставить("gcalendar", "OPI_GoogleCalendar");
|
||||
СоответствиеКомандМодулей.Вставить("google", "OPI_GoogleWorkspace");
|
||||
СоответствиеКомандМодулей.Вставить("yandex", "OPI_YandexID");
|
||||
СоответствиеКомандМодулей.Вставить("twitter", "OPI_Twitter");
|
||||
СоответствиеКомандМодулей.Вставить("slack", "OPI_Slack");
|
||||
СоответствиеКомандМодулей.Вставить("viber", "OPI_Viber");
|
||||
СоответствиеКомандМодулей.Вставить("airtable", "OPI_Airtable");
|
||||
СоответствиеКомандМодулей.Вставить("gdrive", "OPI_GoogleDrive");
|
||||
СоответствиеКомандМодулей.Вставить("telegram", "OPI_Telegram");
|
||||
СоответствиеКомандМодулей.Вставить("viber", "OPI_Viber");
|
||||
СоответствиеКомандМодулей.Вставить("vk", "OPI_VK");
|
||||
СоответствиеКомандМодулей.Вставить("yadisk", "OPI_YandexDisk");
|
||||
СоответствиеКомандМодулей.Вставить("notion", "OPI_Notion");
|
||||
СоответствиеКомандМодулей.Вставить("twitter", "OPI_Twitter");
|
||||
СоответствиеКомандМодулей.Вставить("gdrive", "OPI_GoogleDrive");
|
||||
СоответствиеКомандМодулей.Вставить("google", "OPI_GoogleWorkspace");
|
||||
СоответствиеКомандМодулей.Вставить("gsheets", "OPI_GoogleSheets");
|
||||
СоответствиеКомандМодулей.Вставить("gcalendar", "OPI_GoogleCalendar");
|
||||
СоответствиеКомандМодулей.Вставить("slack", "OPI_Slack");
|
||||
СоответствиеКомандМодулей.Вставить("bitrix24", "OPI_Bitrix24");
|
||||
СоответствиеКомандМодулей.Вставить("dropbox", "OPI_Dropbox");
|
||||
СоответствиеКомандМодулей.Вставить("airtable", "OPI_Airtable");
|
||||
СоответствиеКомандМодулей.Вставить("yandex", "OPI_YandexID");
|
||||
Возврат СоответствиеКомандМодулей;
|
||||
КонецФункции
|
||||
|
||||
|
Reference in New Issue
Block a user