1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-08-10 22:41:43 +02:00

Merge remote-tracking branch 'origin/main'

This commit is contained in:
Anton Titovets
2025-07-11 11:25:42 +03:00
124 changed files with 355 additions and 343 deletions

View File

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

View File

@@ -33,6 +33,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region CommonMethods

View File

@@ -29,13 +29,12 @@
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region AccountAndAuthorization

View File

@@ -31,13 +31,12 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region CalendarMetadataManagement

View File

@@ -31,13 +31,12 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region FileAndDirectoryManagement

View File

@@ -31,13 +31,12 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region SpreadsheetsManagement

View File

@@ -30,13 +30,12 @@
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
// Generate code retrieval link

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region Account

View File

@@ -34,6 +34,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions

View File

@@ -33,6 +33,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region DataRetrieving

View File

@@ -31,14 +31,13 @@
// BSLLS:IncorrectLineBreak-off
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check method-too-many-params
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region PageManagement

View File

@@ -32,6 +32,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions

View File

@@ -32,6 +32,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
@@ -40,8 +41,6 @@
//@skip-check constructor-function-return-section
//@skip-check doc-comment-collection-item-type
#Region Public
#Region RequestsProcessing

View File

@@ -32,14 +32,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region AttributesAndFeatures

View File

@@ -34,6 +34,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
@@ -42,8 +43,6 @@
//@skip-check constructor-function-return-section
//@skip-check doc-comment-collection-item-type
#Region Public
#Region CommonMethods

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region CommandsExecution

View File

@@ -33,6 +33,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
@@ -40,8 +41,6 @@
//@skip-check method-too-many-params
//@skip-check constructor-function-return-section
#Region Public
#Region CommonMethods

View File

@@ -34,6 +34,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
@@ -41,8 +42,6 @@
//@skip-check method-too-many-params
//@skip-check constructor-function-return-section
#Region Public
#Region CommonMethods

View File

@@ -30,13 +30,12 @@
// BSLLS:IncorrectLineBreak-off
// BSLLS:Typo-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region ManagementAndSettings

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region ClientMethods

View File

@@ -35,13 +35,12 @@
// BSLLS:UsingServiceTag-off
// BSLLS:NumberOfParams-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region DataRetrievalAndSettings
@@ -236,7 +235,7 @@ Function ProcessTMAData(Val DataString, Val Token) Export
Hash = "";
BinaryKey = ПолучитьДвоичныеДанныеИзСтроки(KeyString);
Result = OPI_Cryptography.HMACSHA(BinaryKey, ПолучитьДвоичныеДанныеИзСтроки(Token), "SHA256");
Result = OPI_Cryptography.HMAC(BinaryKey, ПолучитьДвоичныеДанныеИзСтроки(Token), "SHA256");
TValue = New ValueTable;
TValue.Columns.Add("Key");

View File

@@ -35,14 +35,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check method-too-many-params
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region DataAndSettings

View File

@@ -35,6 +35,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:UnusedLocalVariable-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check method-too-many-params
//@skip-check wrong-string-literal-content
@@ -42,8 +43,6 @@
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region TokenRetrieval

View File

@@ -32,14 +32,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region CommonMethods

View File

@@ -30,13 +30,12 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region SettingsAndInformation

View File

@@ -32,14 +32,13 @@
// BSLLS:IncorrectLineBreak-off
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check method-too-many-params
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region FileAndFolderManagement

View File

@@ -29,13 +29,12 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
// Get confirmation code

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region CampaignsAndBusiness

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region TagsManagement

View File

@@ -44,6 +44,7 @@
// BSLLS:UnusedLocalMethod-off
// BSLLS:NestedFunctionInParameters-off
// BSLLS:MissingTemporaryFileDeletion-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check undefined-variable
//@skip-check wrong-string-literal-content

View File

@@ -44,6 +44,7 @@
// BSLLS:UnusedLocalMethod-off
// BSLLS:NestedFunctionInParameters-off
// BSLLS:MissingTemporaryFileDeletion-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check undefined-variable
//@skip-check wrong-string-literal-content

View File

@@ -34,6 +34,7 @@
// BSLLS:DuplicateStringLiteral-off
// BSLLS:MagicNumber-off
// BSLLS:UsingHardcodeNetworkAddress-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check use-non-recommended-method
//@skip-check module-structure-top-region

View File

@@ -30,6 +30,7 @@
// BSLLS:UnusedLocalVariable-off
// BSLLS:UsingServiceTag-off
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-unused-local-variable
//@skip-check method-too-many-params

View File

@@ -33,6 +33,7 @@
// BSLLS:QueryParseError-off
// BSLLS:AssignAliasFieldsInQuery-off
// BSLLS:NumberOfParams-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
@@ -165,69 +166,14 @@ Function EnsureTable(Val Module
If Not ValueIsFilled(TableColumns) Then
ResultStrucutre = CreateTable(Module, Table, ColoumnsStruct, Connection, Tls);
Else
FoundMapping = New Map;
FieldName = Module.GetFeatures()["ColumnField"];
Error = NormalizeTable(Module, Table, ColoumnsStruct, TableColumns, Connection, Tls);
DeleteCode = 0;
AddCode = 1;
IgnoreCode = 2;
For Each Coloumn In TableColumns Do
ColumnName = Coloumn[FieldName];
If Not ValueIsFilled(ColumnName) Then
Continue;
Else
FoundMapping.Insert(ColumnName, DeleteCode);
If Error <> Undefined Then
Return Error;
EndIf;
EndDo;
If FoundMapping.Count() = 0 Then
ResponseMapping = New Map;
ResponseMapping.Insert("result", "false");
ResponseMapping.Insert("error" , "Unsupported table schema type");
Return ResponseMapping;
EndIf;
For Each RequiredColumn In ColoumnsStruct Do
ColumnName = RequiredColumn.Key;
Exist = FoundMapping.Get(ColumnName) <> Undefined;
Action = ?(Exist, IgnoreCode, AddCode);
FoundMapping.Insert(ColumnName, Action);
EndDo;
For Each SchemaPart In FoundMapping Do
ActionCode = SchemaPart.Value;
ColumnName = SchemaPart.Key;
If ActionCode = 0 Then
Result = DeleteTableColumn(Module, Table, ColumnName, Connection, Tls);
ElsIf ActionCode = 1 Then
DataType = ColoumnsStruct[ColumnName];
Result = AddTableColumn(Module, Table, ColumnName, DataType, Connection, Tls);
Else
Continue;
EndIf;
If Not Result["result"] Then
Raise Result["error"];
EndIf;
EndDo;
EndIf;
Completion = Module.ExecuteSQLQuery("COMMIT;", , , Connection);
@@ -1103,6 +1049,77 @@ Function AddRow(Val Module, Val Table, Val Record, Val Connection)
EndFunction
Function NormalizeTable(Val Module
, Val Table
, Val ColoumnsStruct
, TableColumns
, Val Connection
, Val Tls)
FoundMapping = New Map;
FieldName = Module.GetFeatures()["ColumnField"];
DeleteCode = 0;
AddCode = 1;
IgnoreCode = 2;
For Each Coloumn In TableColumns Do
ColumnName = Coloumn[FieldName];
If Not ValueIsFilled(ColumnName) Then
Continue;
Else
FoundMapping.Insert(ColumnName, DeleteCode);
EndIf;
EndDo;
If FoundMapping.Count() = 0 Then
ResponseMapping = New Map;
ResponseMapping.Insert("result", "false");
ResponseMapping.Insert("error" , "Unsupported table schema type");
Return ResponseMapping;
EndIf;
For Each RequiredColumn In ColoumnsStruct Do
ColumnName = RequiredColumn.Key;
Exist = FoundMapping.Get(ColumnName) <> Undefined;
Action = ?(Exist, IgnoreCode, AddCode);
FoundMapping.Insert(ColumnName, Action);
EndDo;
For Each SchemaPart In FoundMapping Do
ActionCode = SchemaPart.Value;
ColumnName = SchemaPart.Key;
If ActionCode = 0 Then
Result = DeleteTableColumn(Module, Table, ColumnName, Connection, Tls);
ElsIf ActionCode = 1 Then
DataType = ColoumnsStruct[ColumnName];
Result = AddTableColumn(Module, Table, ColumnName, DataType, Connection, Tls);
Else
Continue;
EndIf;
If Not Result["result"] Then
Raise Result["error"];
EndIf;
EndDo;
Return Undefined;
EndFunction
Function FormFilterText(Val Filters)
If Not ValueIsFilled(Filters) Then

View File

@@ -34,6 +34,7 @@
// BSLLS:DuplicateStringLiteral-off
// BSLLS:MagicNumber-off
// BSLLS:UsingHardcodeNetworkAddress-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check use-non-recommended-method
//@skip-check module-structure-top-region

View File

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

View File

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

View File

@@ -30,6 +30,7 @@
// BSLLS:UnusedLocalVariable-off
// BSLLS:UsingServiceTag-off
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-unused-local-variable
//@skip-check method-too-many-params

View File

@@ -34,6 +34,7 @@
// BSLLS:DuplicateStringLiteral-off
// BSLLS:MagicNumber-off
// BSLLS:UsingHardcodeNetworkAddress-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check use-non-recommended-method
//@skip-check module-structure-top-region

View File

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

View File

@@ -33,6 +33,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region CommonMethods

View File

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

View File

@@ -29,13 +29,12 @@
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region AccountAndAuthorization

View File

@@ -31,13 +31,12 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region CalendarMetadataManagement

View File

@@ -31,13 +31,12 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region FileAndDirectoryManagement

View File

@@ -31,13 +31,12 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region SpreadsheetsManagement

View File

@@ -30,13 +30,12 @@
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
// Generate code retrieval link

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region Account

View File

@@ -30,6 +30,7 @@
// BSLLS:UnusedLocalVariable-off
// BSLLS:UsingServiceTag-off
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-unused-local-variable
//@skip-check method-too-many-params

View File

@@ -34,6 +34,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions

View File

@@ -33,6 +33,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region DataRetrieving

View File

@@ -31,14 +31,13 @@
// BSLLS:IncorrectLineBreak-off
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check method-too-many-params
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region PageManagement

View File

@@ -32,6 +32,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions

View File

@@ -32,6 +32,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
@@ -40,8 +41,6 @@
//@skip-check constructor-function-return-section
//@skip-check doc-comment-collection-item-type
#Region Public
#Region RequestsProcessing

View File

@@ -32,14 +32,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region AttributesAndFeatures

View File

@@ -34,6 +34,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
@@ -42,8 +43,6 @@
//@skip-check constructor-function-return-section
//@skip-check doc-comment-collection-item-type
#Region Public
#Region CommonMethods

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region CommandsExecution

View File

@@ -33,6 +33,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
@@ -40,8 +41,6 @@
//@skip-check method-too-many-params
//@skip-check constructor-function-return-section
#Region Public
#Region CommonMethods

View File

@@ -33,6 +33,7 @@
// BSLLS:QueryParseError-off
// BSLLS:AssignAliasFieldsInQuery-off
// BSLLS:NumberOfParams-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
@@ -165,69 +166,14 @@ Function EnsureTable(Val Module
If Not ValueIsFilled(TableColumns) Then
ResultStrucutre = CreateTable(Module, Table, ColoumnsStruct, Connection, Tls);
Else
FoundMapping = New Map;
FieldName = Module.GetFeatures()["ColumnField"];
Error = NormalizeTable(Module, Table, ColoumnsStruct, TableColumns, Connection, Tls);
DeleteCode = 0;
AddCode = 1;
IgnoreCode = 2;
For Each Coloumn In TableColumns Do
ColumnName = Coloumn[FieldName];
If Not ValueIsFilled(ColumnName) Then
Continue;
Else
FoundMapping.Insert(ColumnName, DeleteCode);
If Error <> Undefined Then
Return Error;
EndIf;
EndDo;
If FoundMapping.Count() = 0 Then
ResponseMapping = New Map;
ResponseMapping.Insert("result", "false");
ResponseMapping.Insert("error" , "Unsupported table schema type");
Return ResponseMapping;
EndIf;
For Each RequiredColumn In ColoumnsStruct Do
ColumnName = RequiredColumn.Key;
Exists = FoundMapping.Get(ColumnName) <> Undefined;
Action = ?(Exists, IgnoreCode, AddCode);
FoundMapping.Insert(ColumnName, Action);
EndDo;
For Each SchemaPart In FoundMapping Do
ActionCode = SchemaPart.Value;
ColumnName = SchemaPart.Key;
If ActionCode = 0 Then
Result = DeleteTableColumn(Module, Table, ColumnName, Connection, Tls);
ElsIf ActionCode = 1 Then
DataType = ColoumnsStruct[ColumnName];
Result = AddTableColumn(Module, Table, ColumnName, DataType, Connection, Tls);
Else
Continue;
EndIf;
If Not Result["result"] Then
Raise Result["error"];
EndIf;
EndDo;
EndIf;
Completion = Module.ExecuteSQLQuery("COMMIT;", , , Connection);
@@ -1103,6 +1049,77 @@ Function AddRow(Val Module, Val Table, Val Record, Val Connection)
EndFunction
Function NormalizeTable(Val Module
, Val Table
, Val ColoumnsStruct
, TableColumns
, Val Connection
, Val Tls)
FoundMapping = New Map;
FieldName = Module.GetFeatures()["ColumnField"];
DeleteCode = 0;
AddCode = 1;
IgnoreCode = 2;
For Each Coloumn In TableColumns Do
ColumnName = Coloumn[FieldName];
If Not ValueIsFilled(ColumnName) Then
Continue;
Else
FoundMapping.Insert(ColumnName, DeleteCode);
EndIf;
EndDo;
If FoundMapping.Count() = 0 Then
ResponseMapping = New Map;
ResponseMapping.Insert("result", "false");
ResponseMapping.Insert("error" , "Unsupported table schema type");
Return ResponseMapping;
EndIf;
For Each RequiredColumn In ColoumnsStruct Do
ColumnName = RequiredColumn.Key;
Exists = FoundMapping.Get(ColumnName) <> Undefined;
Action = ?(Exists, IgnoreCode, AddCode);
FoundMapping.Insert(ColumnName, Action);
EndDo;
For Each SchemaPart In FoundMapping Do
ActionCode = SchemaPart.Value;
ColumnName = SchemaPart.Key;
If ActionCode = 0 Then
Result = DeleteTableColumn(Module, Table, ColumnName, Connection, Tls);
ElsIf ActionCode = 1 Then
DataType = ColoumnsStruct[ColumnName];
Result = AddTableColumn(Module, Table, ColumnName, DataType, Connection, Tls);
Else
Continue;
EndIf;
If Not Result["result"] Then
Raise Result["error"];
EndIf;
EndDo;
Return Undefined;
EndFunction
Function FormFilterText(Val Filters)
If Not ValueIsFilled(Filters) Then

View File

@@ -34,6 +34,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
@@ -41,8 +42,6 @@
//@skip-check method-too-many-params
//@skip-check constructor-function-return-section
#Region Public
#Region CommonMethods

View File

@@ -30,13 +30,12 @@
// BSLLS:IncorrectLineBreak-off
// BSLLS:Typo-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region ManagementAndSettings

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region ClientMethods

View File

@@ -35,13 +35,12 @@
// BSLLS:UsingServiceTag-off
// BSLLS:NumberOfParams-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region DataRetrievalAndSettings
@@ -236,7 +235,7 @@ Function ProcessTMAData(Val DataString, Val Token) Export
Hash = "";
BinaryKey = GetBinaryDataFromString(KeyString);
Result = OPI_Cryptography.HMACSHA(BinaryKey, GetBinaryDataFromString(Token), "SHA256");
Result = OPI_Cryptography.HMAC(BinaryKey, GetBinaryDataFromString(Token), "SHA256");
TValue = New ValueTable;
TValue.Columns.Add("Key");

View File

@@ -34,6 +34,7 @@
// BSLLS:DuplicateStringLiteral-off
// BSLLS:MagicNumber-off
// BSLLS:UsingHardcodeNetworkAddress-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check use-non-recommended-method
//@skip-check module-structure-top-region

View File

@@ -44,6 +44,7 @@
// BSLLS:UnusedLocalMethod-off
// BSLLS:NestedFunctionInParameters-off
// BSLLS:MissingTemporaryFileDeletion-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check undefined-variable
//@skip-check wrong-string-literal-content

View File

@@ -44,6 +44,7 @@
// BSLLS:UnusedLocalMethod-off
// BSLLS:NestedFunctionInParameters-off
// BSLLS:MissingTemporaryFileDeletion-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check undefined-variable
//@skip-check wrong-string-literal-content

View File

@@ -30,6 +30,7 @@
// BSLLS:UnusedLocalVariable-off
// BSLLS:UsingServiceTag-off
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-unused-local-variable
//@skip-check method-too-many-params

View File

@@ -35,14 +35,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check method-too-many-params
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region DataAndSettings

View File

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

View File

@@ -35,6 +35,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:UnusedLocalVariable-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check method-too-many-params
//@skip-check wrong-string-literal-content
@@ -42,8 +43,6 @@
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region TokenRetrieval

View File

@@ -32,14 +32,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region CommonMethods

View File

@@ -30,13 +30,12 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region SettingsAndInformation

View File

@@ -32,14 +32,13 @@
// BSLLS:IncorrectLineBreak-off
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check method-too-many-params
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
#Region FileAndFolderManagement

View File

@@ -29,13 +29,12 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Region Public
// Get confirmation code

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region CampaignsAndBusiness

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Region Public
#Region TagsManagement

View File

@@ -82,7 +82,7 @@ Function GetConnectionString() Export
|
|
| Utils = LoadScript(""C:/ProgramData/Jenkins/.jenkins/workspace/OpiSonar/src/en/cli/tools/Modules/Utils.os"", Context);
| Utils = LoadScript(""C:/ProgramData/Jenkins/.jenkins/workspace/OpiMain/src/en/cli/tools/Modules/Utils.os"", Context);
|" + Chars.LF;

View File

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

View File

@@ -33,6 +33,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Область ПрограммныйИнтерфейс
#Область ОбщиеМетоды

View File

@@ -29,13 +29,12 @@
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Область ПрограммныйИнтерфейс
#Область АккаунтИАвторизация

View File

@@ -31,13 +31,12 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Область ПрограммныйИнтерфейс
#Область РаботаСМетаданнымиКалендарей

View File

@@ -31,13 +31,12 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Область ПрограммныйИнтерфейс
#Область РаботаСФайламиИКаталогами

View File

@@ -31,13 +31,12 @@
// BSLLS:LatinAndCyrillicSymbolInWord-off
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Область ПрограммныйИнтерфейс
#Область РаботаСКнигами

View File

@@ -30,13 +30,12 @@
// BSLLS:IncorrectLineBreak-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Область ПрограммныйИнтерфейс
// Сформировать ссылку получения кода

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Область ПрограммныйИнтерфейс
#Область Аккаунт

View File

@@ -34,6 +34,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions

View File

@@ -33,6 +33,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Область ПрограммныйИнтерфейс
#Область ПолучениеДанных

View File

@@ -31,14 +31,13 @@
// BSLLS:IncorrectLineBreak-off
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check method-too-many-params
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
#Область ПрограммныйИнтерфейс
#Область РаботаСоСтраницами

View File

@@ -32,6 +32,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions

View File

@@ -32,6 +32,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
@@ -40,8 +41,6 @@
//@skip-check constructor-function-return-section
//@skip-check doc-comment-collection-item-type
#Область ПрограммныйИнтерфейс
#Область ОбработкаЗапросов

View File

@@ -32,14 +32,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Область ПрограммныйИнтерфейс
#Область АтрибутыИХарактеристики

View File

@@ -34,6 +34,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
@@ -42,8 +43,6 @@
//@skip-check constructor-function-return-section
//@skip-check doc-comment-collection-item-type
#Область ПрограммныйИнтерфейс
#Область ОсновныеМетоды

View File

@@ -33,14 +33,13 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
//@skip-check wrong-string-literal-content
//@skip-check method-too-many-params
#Область ПрограммныйИнтерфейс
#Область ВыполнениеКоманд

View File

@@ -33,6 +33,7 @@
// BSLLS:NumberOfOptionalParams-off
// BSLLS:UsingServiceTag-off
// BSLLS:LineLength-off
// BSLLS:UsingSynchronousCalls-off
//@skip-check module-structure-top-region
//@skip-check module-structure-method-in-regions
@@ -40,8 +41,6 @@
//@skip-check method-too-many-params
//@skip-check constructor-function-return-section
#Область ПрограммныйИнтерфейс
#Область ОбщиеМетоды

Some files were not shown because too many files have changed in this diff Show More