You've already forked OpenIntegrations
							
							
				mirror of
				https://github.com/Bayselonarrend/OpenIntegrations.git
				synced 2025-10-30 23:47:46 +02:00 
			
		
		
		
	Main build (Jenkins)
This commit is contained in:
		
							
								
								
									
										22
									
								
								ci/clitesten
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								ci/clitesten
									
									
									
									
										vendored
									
									
								
							| @@ -1425,6 +1425,10 @@ def test_proxy(){ | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy CreateProject --path "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy LaunchProject --port "test" --proj "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy AddRequestsHandler --proj "test" --lib "test" --func "test" --method "test" --debug --test ' | ||||
|                } | ||||
| @@ -1442,7 +1446,23 @@ def test_proxy(){ | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy Start --port "test" --proj "test" --debug --test ' | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy UpdateRequestsHandler --proj "test" --handler "test" --lib "test" --func "test" --method "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy DisableRequestsHandler --proj "test" --handler "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy EnableRequestsHandler --proj "test" --handler "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy SetHandlerArguments --proj "test" --handler "test" --arg "test" --value "test" --strict "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy GetHandlerArguments --proj "test" --handler "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
| } | ||||
|   | ||||
							
								
								
									
										22
									
								
								ci/clitestru
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								ci/clitestru
									
									
									
									
										vendored
									
									
								
							| @@ -2863,6 +2863,10 @@ def test_proxy(){ | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy СоздатьПроект --path "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy ЗапуститьПроект --port "test" --proj "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy ДобавитьОбработчикЗапросов --proj "test" --lib "test" --func "test" --method "test" --debug --test ' | ||||
|                } | ||||
| @@ -2880,7 +2884,23 @@ def test_proxy(){ | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy Запустить --port "test" --proj "test" --debug --test ' | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy ИзменитьОбработчикЗапросов --proj "test" --handler "test" --lib "test" --func "test" --method "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy ОтключитьОбработчикЗапросов --proj "test" --handler "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy ВключитьОбработчикЗапросов --proj "test" --handler "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy УстановитьАргументОбработчика --proj "test" --handler "test" --arg "test" --value "test" --strict "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
|                catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {    | ||||
| 					powershell encoding: 'UTF-8', script:'./oint.exe proxy ПолучитьАргументыОбработчика --proj "test" --handler "test" --debug --test ' | ||||
|                } | ||||
|  | ||||
| } | ||||
|   | ||||
							
								
								
									
										4
									
								
								docs/en/data/IntegrationProxy/DisableRequestsHandler.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/en/data/IntegrationProxy/DisableRequestsHandler.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| { | ||||
| "Project": "C:\\Users\\Administrator\\AppData\\Local\\Temp\\v8_250E_27.oint", | ||||
| "HandlerKey": "3F56..." | ||||
| } | ||||
							
								
								
									
										4
									
								
								docs/en/data/IntegrationProxy/EnableRequestsHandler.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/en/data/IntegrationProxy/EnableRequestsHandler.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| { | ||||
| "Project": "C:\\Users\\Administrator\\AppData\\Local\\Temp\\v8_250E_27.oint", | ||||
| "HandlerKey": "3F56..." | ||||
| } | ||||
							
								
								
									
										4
									
								
								docs/en/data/IntegrationProxy/UpdateRequestsHandler.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/en/data/IntegrationProxy/UpdateRequestsHandler.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| { | ||||
| "Project": "C:\\Users\\Administrator\\AppData\\Local\\Temp\\v8_250E_27.oint", | ||||
| "HandlerKey": "3F56..." | ||||
| } | ||||
| @@ -1,4 +1,4 @@ | ||||
|     Project      = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     Project      = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     OintLibrary  = "telegram"; | ||||
|     OintFunction = "SendTextMessage"; | ||||
|  | ||||
|   | ||||
| @@ -1,3 +1,3 @@ | ||||
|     Path = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     Path = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.CreateProject(Path); | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
|     Project    = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     HandlerKey = "78fe..."; | ||||
|     Project    = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     HandlerKey = "3F56..."; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.DeleteRequestHandler(Project, HandlerKey); | ||||
|   | ||||
							
								
								
									
										4
									
								
								docs/en/examples/IntegrationProxy/DisableRequestsHandler.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/en/examples/IntegrationProxy/DisableRequestsHandler.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
|     Project    = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     HandlerKey = "3F56..."; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.DisableRequestsHandler(Project, HandlerKey); | ||||
							
								
								
									
										4
									
								
								docs/en/examples/IntegrationProxy/EnableRequestsHandler.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/en/examples/IntegrationProxy/EnableRequestsHandler.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
|     Project    = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     HandlerKey = "3F56..."; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.EnableRequestsHandler(Project, HandlerKey); | ||||
| @@ -1,3 +1,3 @@ | ||||
|     Project = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     Project = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.GetRequestHandlersList(Project); | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
|     Project    = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     HandlerKey = "78fe..."; | ||||
|     Project    = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     HandlerKey = "3F56..."; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.GetRequestsHandler(Project, HandlerKey); | ||||
|   | ||||
							
								
								
									
										6
									
								
								docs/en/examples/IntegrationProxy/UpdateRequestsHandler.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								docs/en/examples/IntegrationProxy/UpdateRequestsHandler.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
|     Project      = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     HandlerKey   = "3F56..."; | ||||
|     OintLibrary  = "dropbox"; | ||||
|     OintFunction = "CreateFolder"; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.UpdateRequestsHandler(Project, HandlerKey, OintLibrary, OintFunction); | ||||
							
								
								
									
										35
									
								
								docs/en/md/Integration_proxy_methods/Argument-setting/Get-handler-arguments.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								docs/en/md/Integration_proxy_methods/Argument-setting/Get-handler-arguments.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| --- | ||||
| sidebar_position: 2 | ||||
| --- | ||||
|  | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
|  | ||||
| # Get handler arguments | ||||
|  Gets the list of defined handler arguments | ||||
|  | ||||
|  | ||||
|  | ||||
| `Function GetHandlerArguments(Val Project, Val HandlerKey) Export` | ||||
|  | ||||
|   | Parameter | CLI option | Type | Required | Description | | ||||
|   |-|-|-|-|-| | ||||
|   | Project | --proj | String | ✔ | Project filepath | | ||||
|   | HandlerKey | --handler | String | ✔ | Handler key | | ||||
|  | ||||
|    | ||||
|   Returns:  Structure Of KeyAndValue - Handlers list | ||||
|  | ||||
| <br/> | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ```bsl title="1C:Enterprise/OneScript code example" | ||||
|  | ||||
| ``` | ||||
|   | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
							
								
								
									
										38
									
								
								docs/en/md/Integration_proxy_methods/Argument-setting/Set-handler-arguments.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								docs/en/md/Integration_proxy_methods/Argument-setting/Set-handler-arguments.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| --- | ||||
| sidebar_position: 1 | ||||
| --- | ||||
|  | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
|  | ||||
| # Set handler arguments | ||||
|  Sets the argument to the function, allowing it to be unspecified when the handler is called | ||||
|  | ||||
|  | ||||
|  | ||||
| `Function SetHandlerArguments(Val Project, Val HandlerKey, Val Argument, Val Value, Val Strict = True) Export` | ||||
|  | ||||
|   | Parameter | CLI option | Type | Required | Description | | ||||
|   |-|-|-|-|-| | ||||
|   | Project | --proj | String | ✔ | Project filepath | | ||||
|   | HandlerKey | --handler | String | ✔ | Handler key | | ||||
|   | Argument | --arg | String | ✔ | CLI argument (option) for the handler function | | ||||
|   | Value | --value | String | ✔ | String argument value | | ||||
|   | Strict | --strict | Boolean | ✖ | True > argument cannot be overwritten by a request data | | ||||
|  | ||||
|    | ||||
|   Returns:  Structure Of KeyAndValue - Setting result | ||||
|  | ||||
| <br/> | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ```bsl title="1C:Enterprise/OneScript code example" | ||||
|  | ||||
| ``` | ||||
|   | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
							
								
								
									
										4
									
								
								docs/en/md/Integration_proxy_methods/Argument-setting/_category_.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/en/md/Integration_proxy_methods/Argument-setting/_category_.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| { | ||||
| "label": "Argument setting", | ||||
| "position": "4" | ||||
| } | ||||
| @@ -1,5 +1,5 @@ | ||||
| --- | ||||
| sidebar_position: 2 | ||||
| sidebar_position: 1 | ||||
| --- | ||||
| 
 | ||||
| import Tabs from '@theme/Tabs'; | ||||
| @@ -28,7 +28,7 @@ import TabItem from '@theme/TabItem'; | ||||
| 
 | ||||
| 
 | ||||
| ```bsl title="1C:Enterprise/OneScript code example" | ||||
|     Project      = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     Project      = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     OintLibrary  = "telegram"; | ||||
|     OintFunction = "SendTextMessage"; | ||||
| 
 | ||||
| @@ -1,5 +1,5 @@ | ||||
| --- | ||||
| sidebar_position: 5 | ||||
| sidebar_position: 4 | ||||
| --- | ||||
| 
 | ||||
| import Tabs from '@theme/Tabs'; | ||||
| @@ -26,8 +26,8 @@ import TabItem from '@theme/TabItem'; | ||||
| 
 | ||||
| 
 | ||||
| ```bsl title="1C:Enterprise/OneScript code example" | ||||
|     Project    = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     HandlerKey = "78fe..."; | ||||
|     Project    = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     HandlerKey = "3F56..."; | ||||
| 
 | ||||
|     Result = OPI_IntegrationProxy.DeleteRequestHandler(Project, HandlerKey); | ||||
| ``` | ||||
							
								
								
									
										38
									
								
								docs/en/md/Integration_proxy_methods/Handlers-configuration/Disable-requests-handler.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								docs/en/md/Integration_proxy_methods/Handlers-configuration/Disable-requests-handler.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| --- | ||||
| sidebar_position: 6 | ||||
| --- | ||||
|  | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
|  | ||||
| # Disable requests handler | ||||
|  Disables the handler by key | ||||
|  | ||||
|  | ||||
|  | ||||
| `Function DisableRequestsHandler(Val Project, Val HandlerKey) Export` | ||||
|  | ||||
|   | Parameter | CLI option | Type | Required | Description | | ||||
|   |-|-|-|-|-| | ||||
|   | Project | --proj | String | ✔ | Project filepath | | ||||
|   | HandlerKey | --handler | String | ✔ | Handler key | | ||||
|  | ||||
|    | ||||
|   Returns:  Structure Of KeyAndValue - Switching result | ||||
|  | ||||
| <br/> | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ```bsl title="1C:Enterprise/OneScript code example" | ||||
|     Project    = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     HandlerKey = "3F56..."; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.DisableRequestsHandler(Project, HandlerKey); | ||||
| ``` | ||||
|   | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
							
								
								
									
										38
									
								
								docs/en/md/Integration_proxy_methods/Handlers-configuration/Enable-requests-handler.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								docs/en/md/Integration_proxy_methods/Handlers-configuration/Enable-requests-handler.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| --- | ||||
| sidebar_position: 7 | ||||
| --- | ||||
|  | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
|  | ||||
| # Enable requests handler | ||||
|  Enables the handler by key | ||||
|  | ||||
|  | ||||
|  | ||||
| `Function EnableRequestsHandler(Val Project, Val HandlerKey) Export` | ||||
|  | ||||
|   | Parameter | CLI option | Type | Required | Description | | ||||
|   |-|-|-|-|-| | ||||
|   | Project | --proj | String | ✔ | Project filepath | | ||||
|   | HandlerKey | --handler | String | ✔ | Handler key | | ||||
|  | ||||
|    | ||||
|   Returns:  Structure Of KeyAndValue - Switching result | ||||
|  | ||||
| <br/> | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ```bsl title="1C:Enterprise/OneScript code example" | ||||
|     Project    = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     HandlerKey = "3F56..."; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.EnableRequestsHandler(Project, HandlerKey); | ||||
| ``` | ||||
|   | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| @@ -1,5 +1,5 @@ | ||||
| --- | ||||
| sidebar_position: 3 | ||||
| sidebar_position: 2 | ||||
| --- | ||||
| 
 | ||||
| import Tabs from '@theme/Tabs'; | ||||
| @@ -25,7 +25,7 @@ import TabItem from '@theme/TabItem'; | ||||
| 
 | ||||
| 
 | ||||
| ```bsl title="1C:Enterprise/OneScript code example" | ||||
|     Project = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     Project = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
| 
 | ||||
|     Result = OPI_IntegrationProxy.GetRequestHandlersList(Project); | ||||
| ``` | ||||
| @@ -1,12 +1,12 @@ | ||||
| --- | ||||
| sidebar_position: 4 | ||||
| sidebar_position: 3 | ||||
| --- | ||||
| 
 | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
| 
 | ||||
| # Get requests handler | ||||
|  Gets information about the handler by ID | ||||
|  Gets information about the handler by key | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @@ -26,8 +26,8 @@ import TabItem from '@theme/TabItem'; | ||||
| 
 | ||||
| 
 | ||||
| ```bsl title="1C:Enterprise/OneScript code example" | ||||
|     Project    = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     HandlerKey = "78fe..."; | ||||
|     Project    = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     HandlerKey = "3F56..."; | ||||
| 
 | ||||
|     Result = OPI_IntegrationProxy.GetRequestsHandler(Project, HandlerKey); | ||||
| ``` | ||||
							
								
								
									
										43
									
								
								docs/en/md/Integration_proxy_methods/Handlers-configuration/Update-requests-handler.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								docs/en/md/Integration_proxy_methods/Handlers-configuration/Update-requests-handler.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
| --- | ||||
| sidebar_position: 5 | ||||
| --- | ||||
|  | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
|  | ||||
| # Update requests handler | ||||
|  Changes the values of the request handler fields | ||||
|  | ||||
|  | ||||
|  | ||||
| `Function UpdateRequestsHandler(Val Project, Val HandlerKey, Val OintLibrary = "", Val OintFunction = "", Val Method = "") Export` | ||||
|  | ||||
|   | Parameter | CLI option | Type | Required | Description | | ||||
|   |-|-|-|-|-| | ||||
|   | Project | --proj | String | ✔ | Project filepath | | ||||
|   | HandlerKey | --handler | String | ✔ | Handler key | | ||||
|   | OintLibrary | --lib | String | ✖ | Library name in CLI command format | | ||||
|   | OintFunction | --func | String | ✖ | OpenIntegrations function name | | ||||
|   | Method | --method | String | ✖ | HTTP method that will process the handler: GET, POST, MULTIPART | | ||||
|  | ||||
|    | ||||
|   Returns:  Structure Of KeyAndValue - Result of handler modification | ||||
|  | ||||
| <br/> | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ```bsl title="1C:Enterprise/OneScript code example" | ||||
|     Project      = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     HandlerKey   = "3F56..."; | ||||
|     OintLibrary  = "dropbox"; | ||||
|     OintFunction = "CreateFolder"; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.UpdateRequestsHandler(Project, HandlerKey, OintLibrary, OintFunction); | ||||
| ``` | ||||
|   | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
							
								
								
									
										4
									
								
								docs/en/md/Integration_proxy_methods/Handlers-configuration/_category_.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/en/md/Integration_proxy_methods/Handlers-configuration/_category_.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| { | ||||
| "label": "Handlers configuration", | ||||
| "position": "3" | ||||
| } | ||||
| @@ -25,7 +25,7 @@ import TabItem from '@theme/TabItem'; | ||||
|  | ||||
|  | ||||
| ```bsl title="1C:Enterprise/OneScript code example" | ||||
|     Path = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     Path = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.CreateProject(Path); | ||||
| ``` | ||||
|   | ||||
| @@ -1,16 +1,16 @@ | ||||
| --- | ||||
| sidebar_position: 6 | ||||
| sidebar_position: 2 | ||||
| --- | ||||
| 
 | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
| 
 | ||||
| # Start | ||||
| # Launch project | ||||
|  Launches integration proxy server | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| `Function Start(Val Port, Val Project) Export` | ||||
| `Function LaunchProject(Val Port, Val Project) Export` | ||||
| 
 | ||||
|   | Parameter | CLI option | Type | Required | Description | | ||||
|   |-|-|-|-|-| | ||||
							
								
								
									
										4
									
								
								docs/ru/data/ПроксиИнтеграций/ВключитьОбработчикЗапросов.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/ru/data/ПроксиИнтеграций/ВключитьОбработчикЗапросов.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| { | ||||
| "Проект": "C:\\Users\\Administrator\\AppData\\Local\\Temp\\v8_250E_27.oint", | ||||
| "КлючОбработчика": "3F56..." | ||||
| } | ||||
							
								
								
									
										4
									
								
								docs/ru/data/ПроксиИнтеграций/ИзменитьОбработчикЗапросов.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/ru/data/ПроксиИнтеграций/ИзменитьОбработчикЗапросов.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| { | ||||
| "Проект": "C:\\Users\\Administrator\\AppData\\Local\\Temp\\v8_250E_27.oint", | ||||
| "КлючОбработчика": "3F56..." | ||||
| } | ||||
							
								
								
									
										4
									
								
								docs/ru/data/ПроксиИнтеграций/ОтключитьОбработчикЗапросов.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/ru/data/ПроксиИнтеграций/ОтключитьОбработчикЗапросов.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| { | ||||
| "Проект": "C:\\Users\\Administrator\\AppData\\Local\\Temp\\v8_250E_27.oint", | ||||
| "КлючОбработчика": "3F56..." | ||||
| } | ||||
							
								
								
									
										4
									
								
								docs/ru/examples/ПроксиИнтеграций/ВключитьОбработчикЗапросов.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/ru/examples/ПроксиИнтеграций/ВключитьОбработчикЗапросов.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     КлючОбработчика = "3F56..."; | ||||
|  | ||||
|     Результат = OPI_ПроксиИнтеграций.ВключитьОбработчикЗапросов(Проект, КлючОбработчика); | ||||
| @@ -1,4 +1,4 @@ | ||||
|     Проект        = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     Проект        = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     БиблиотекаОПИ = "telegram"; | ||||
|     ФункцияОПИ    = "ОтправитьТекстовоеСообщение"; | ||||
|  | ||||
|   | ||||
							
								
								
									
										6
									
								
								docs/ru/examples/ПроксиИнтеграций/ИзменитьОбработчикЗапросов.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								docs/ru/examples/ПроксиИнтеграций/ИзменитьОбработчикЗапросов.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     КлючОбработчика = "3F56..."; | ||||
|     БиблиотекаОПИ   = "dropbox"; | ||||
|     ФункцияОПИ      = "СоздатьПапку"; | ||||
|  | ||||
|     Результат = OPI_ПроксиИнтеграций.ИзменитьОбработчикЗапросов(Проект, КлючОбработчика, БиблиотекаОПИ, ФункцияОПИ); | ||||
							
								
								
									
										4
									
								
								docs/ru/examples/ПроксиИнтеграций/ОтключитьОбработчикЗапросов.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/ru/examples/ПроксиИнтеграций/ОтключитьОбработчикЗапросов.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     КлючОбработчика = "3F56..."; | ||||
|  | ||||
|     Результат = OPI_ПроксиИнтеграций.ОтключитьОбработчикЗапросов(Проект, КлючОбработчика); | ||||
| @@ -1,4 +1,4 @@ | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     КлючОбработчика = "78fe..."; | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     КлючОбработчика = "3F56..."; | ||||
|  | ||||
|     Результат = OPI_ПроксиИнтеграций.ПолучитьОбработчикЗапросов(Проект, КлючОбработчика); | ||||
|   | ||||
| @@ -1,3 +1,3 @@ | ||||
|     Проект = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     Проект = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|  | ||||
|     Результат = OPI_ПроксиИнтеграций.ПолучитьСписокОбработчиковЗапросов(Проект); | ||||
|   | ||||
| @@ -1,3 +1,3 @@ | ||||
|     Путь = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     Путь = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|  | ||||
|     Результат = OPI_ПроксиИнтеграций.СоздатьПроект(Путь); | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     КлючОбработчика = "78fe..."; | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     КлючОбработчика = "3F56..."; | ||||
|  | ||||
|     Результат = OPI_ПроксиИнтеграций.УдалитьОбработчикЗапросов(Проект, КлючОбработчика); | ||||
|   | ||||
							
								
								
									
										35
									
								
								docs/ru/md/Методы_прокси_интеграций/Argument-setting/Get-handler-arguments.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								docs/ru/md/Методы_прокси_интеграций/Argument-setting/Get-handler-arguments.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| --- | ||||
| sidebar_position: 2 | ||||
| --- | ||||
|  | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
|  | ||||
| # Получить аргументы обработчика | ||||
|  Получает список установленных аргументов обработчика | ||||
|  | ||||
|  | ||||
|  | ||||
| `Функция ПолучитьАргументыОбработчика(Знач Проект, Знач КлючОбработчика) Экспорт` | ||||
|  | ||||
|   | Параметр | CLI опция | Тип | Обяз. | Назначение | | ||||
|   |-|-|-|-|-| | ||||
|   | Проект | --proj | Строка | ✔ | Путь к файлу проекта | | ||||
|   | КлючОбработчика | --handler | Строка | ✔ | Ключ обработчика | | ||||
|  | ||||
|    | ||||
|   Возвращаемое значение:   Структура Из КлючИЗначение - Список обработчиков | ||||
|  | ||||
| <br/> | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ```bsl title="Пример использования для 1С:Предприятие/OneScript" | ||||
|  | ||||
| ``` | ||||
|      | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
							
								
								
									
										38
									
								
								docs/ru/md/Методы_прокси_интеграций/Argument-setting/Set-handler-arguments.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								docs/ru/md/Методы_прокси_интеграций/Argument-setting/Set-handler-arguments.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| --- | ||||
| sidebar_position: 1 | ||||
| --- | ||||
|  | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
|  | ||||
| # Установить аргумент обработчика | ||||
|  Устанавливает аргумент для функции обработчика, позволяя не указывать его при вызове | ||||
|  | ||||
|  | ||||
|  | ||||
| `Функция УстановитьАргументОбработчика(Знач Проект, Знач КлючОбработчика, Знач Аргумент, Знач Значение, Знач Строгий = Истина) Экспорт` | ||||
|  | ||||
|   | Параметр | CLI опция | Тип | Обяз. | Назначение | | ||||
|   |-|-|-|-|-| | ||||
|   | Проект | --proj | Строка | ✔ | Путь к файлу проекта | | ||||
|   | КлючОбработчика | --handler | Строка | ✔ | Ключ обработчика | | ||||
|   | Аргумент | --arg | Строка | ✔ | CLI аргумент (опция) для функции обработчика | | ||||
|   | Значение | --value | Строка | ✔ | Строковое значение аргумента | | ||||
|   | Строгий | --strict | Булево | ✖ | Истина > аргумент не может быть перезаписан данными из запроса | | ||||
|  | ||||
|    | ||||
|   Возвращаемое значение:   Структура Из КлючИЗначение - Результат установки | ||||
|  | ||||
| <br/> | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ```bsl title="Пример использования для 1С:Предприятие/OneScript" | ||||
|  | ||||
| ``` | ||||
|      | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
							
								
								
									
										4
									
								
								docs/ru/md/Методы_прокси_интеграций/Argument-setting/_category_.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/ru/md/Методы_прокси_интеграций/Argument-setting/_category_.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| { | ||||
| "label": "Установка аргументов", | ||||
| "position": "4" | ||||
| } | ||||
| @@ -1,5 +1,5 @@ | ||||
| --- | ||||
| sidebar_position: 2 | ||||
| sidebar_position: 1 | ||||
| --- | ||||
| 
 | ||||
| import Tabs from '@theme/Tabs'; | ||||
| @@ -28,7 +28,7 @@ import TabItem from '@theme/TabItem'; | ||||
| 
 | ||||
| 
 | ||||
| ```bsl title="Пример использования для 1С:Предприятие/OneScript" | ||||
|     Проект        = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     Проект        = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     БиблиотекаОПИ = "telegram"; | ||||
|     ФункцияОПИ    = "ОтправитьТекстовоеСообщение"; | ||||
| 
 | ||||
| @@ -1,5 +1,5 @@ | ||||
| --- | ||||
| sidebar_position: 5 | ||||
| sidebar_position: 4 | ||||
| --- | ||||
| 
 | ||||
| import Tabs from '@theme/Tabs'; | ||||
| @@ -26,8 +26,8 @@ import TabItem from '@theme/TabItem'; | ||||
| 
 | ||||
| 
 | ||||
| ```bsl title="Пример использования для 1С:Предприятие/OneScript" | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     КлючОбработчика = "78fe..."; | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     КлючОбработчика = "3F56..."; | ||||
| 
 | ||||
|     Результат = OPI_ПроксиИнтеграций.УдалитьОбработчикЗапросов(Проект, КлючОбработчика); | ||||
| ``` | ||||
							
								
								
									
										38
									
								
								docs/ru/md/Методы_прокси_интеграций/Handlers-configuration/Disable-requests-handler.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								docs/ru/md/Методы_прокси_интеграций/Handlers-configuration/Disable-requests-handler.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| --- | ||||
| sidebar_position: 6 | ||||
| --- | ||||
|  | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
|  | ||||
| # Отключить обработчик запросов | ||||
|  Отключает обработчик по ключу | ||||
|  | ||||
|  | ||||
|  | ||||
| `Функция ОтключитьОбработчикЗапросов(Знач Проект, Знач КлючОбработчика) Экспорт` | ||||
|  | ||||
|   | Параметр | CLI опция | Тип | Обяз. | Назначение | | ||||
|   |-|-|-|-|-| | ||||
|   | Проект | --proj | Строка | ✔ | Путь к файлу проекта | | ||||
|   | КлючОбработчика | --handler | Строка | ✔ | Ключ обработчика | | ||||
|  | ||||
|    | ||||
|   Возвращаемое значение:   Структура Из КлючИЗначение - Результат переключения | ||||
|  | ||||
| <br/> | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ```bsl title="Пример использования для 1С:Предприятие/OneScript" | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     КлючОбработчика = "3F56..."; | ||||
|  | ||||
|     Результат = OPI_ПроксиИнтеграций.ОтключитьОбработчикЗапросов(Проект, КлючОбработчика); | ||||
| ``` | ||||
|      | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
							
								
								
									
										38
									
								
								docs/ru/md/Методы_прокси_интеграций/Handlers-configuration/Enable-requests-handler.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								docs/ru/md/Методы_прокси_интеграций/Handlers-configuration/Enable-requests-handler.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| --- | ||||
| sidebar_position: 7 | ||||
| --- | ||||
|  | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
|  | ||||
| # Включить обработчик запросов | ||||
|  Включает обработчик по ключу | ||||
|  | ||||
|  | ||||
|  | ||||
| `Функция ВключитьОбработчикЗапросов(Знач Проект, Знач КлючОбработчика) Экспорт` | ||||
|  | ||||
|   | Параметр | CLI опция | Тип | Обяз. | Назначение | | ||||
|   |-|-|-|-|-| | ||||
|   | Проект | --proj | Строка | ✔ | Путь к файлу проекта | | ||||
|   | КлючОбработчика | --handler | Строка | ✔ | Ключ обработчика | | ||||
|  | ||||
|    | ||||
|   Возвращаемое значение:   Структура Из КлючИЗначение - Результат переключения | ||||
|  | ||||
| <br/> | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ```bsl title="Пример использования для 1С:Предприятие/OneScript" | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     КлючОбработчика = "3F56..."; | ||||
|  | ||||
|     Результат = OPI_ПроксиИнтеграций.ВключитьОбработчикЗапросов(Проект, КлючОбработчика); | ||||
| ``` | ||||
|      | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| @@ -1,5 +1,5 @@ | ||||
| --- | ||||
| sidebar_position: 3 | ||||
| sidebar_position: 2 | ||||
| --- | ||||
| 
 | ||||
| import Tabs from '@theme/Tabs'; | ||||
| @@ -25,7 +25,7 @@ import TabItem from '@theme/TabItem'; | ||||
| 
 | ||||
| 
 | ||||
| ```bsl title="Пример использования для 1С:Предприятие/OneScript" | ||||
|     Проект = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     Проект = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
| 
 | ||||
|     Результат = OPI_ПроксиИнтеграций.ПолучитьСписокОбработчиковЗапросов(Проект); | ||||
| ``` | ||||
| @@ -1,12 +1,12 @@ | ||||
| --- | ||||
| sidebar_position: 4 | ||||
| sidebar_position: 3 | ||||
| --- | ||||
| 
 | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
| 
 | ||||
| # Получить обработчик запросов | ||||
|  Получает информацию об обработчике по ID | ||||
|  Получает информацию об обработчике по ключу | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @@ -26,8 +26,8 @@ import TabItem from '@theme/TabItem'; | ||||
| 
 | ||||
| 
 | ||||
| ```bsl title="Пример использования для 1С:Предприятие/OneScript" | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     КлючОбработчика = "78fe..."; | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     КлючОбработчика = "3F56..."; | ||||
| 
 | ||||
|     Результат = OPI_ПроксиИнтеграций.ПолучитьОбработчикЗапросов(Проект, КлючОбработчика); | ||||
| ``` | ||||
							
								
								
									
										43
									
								
								docs/ru/md/Методы_прокси_интеграций/Handlers-configuration/Update-requests-handler.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								docs/ru/md/Методы_прокси_интеграций/Handlers-configuration/Update-requests-handler.mdx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
| --- | ||||
| sidebar_position: 5 | ||||
| --- | ||||
|  | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
|  | ||||
| # Изменить обработчик запросов | ||||
|  Изменяет значения полей обработчика запросов | ||||
|  | ||||
|  | ||||
|  | ||||
| `Функция ИзменитьОбработчикЗапросов(Знач Проект, Знач КлючОбработчика, Знач БиблиотекаОПИ = "", Знач ФункцияОПИ = "", Знач Метод = "") Экспорт` | ||||
|  | ||||
|   | Параметр | CLI опция | Тип | Обяз. | Назначение | | ||||
|   |-|-|-|-|-| | ||||
|   | Проект | --proj | Строка | ✔ | Путь к файлу проекта | | ||||
|   | КлючОбработчика | --handler | Строка | ✔ | Ключ обработчика | | ||||
|   | БиблиотекаОПИ | --lib | Строка | ✖ | Имя библиотеки в CLI формате | | ||||
|   | ФункцияОПИ | --func | Строка | ✖ | Имя функции Открытого пакета интеграций | | ||||
|   | Метод | --method | Строка | ✖ | HTTP метод, который будет обрабатывать обработчик: GET, POST, MULTIPART | | ||||
|  | ||||
|    | ||||
|   Возвращаемое значение:   Структура Из КлючИЗначение - Результат изменения обработчика | ||||
|  | ||||
| <br/> | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ```bsl title="Пример использования для 1С:Предприятие/OneScript" | ||||
|     Проект          = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|     КлючОбработчика = "3F56..."; | ||||
|     БиблиотекаОПИ   = "dropbox"; | ||||
|     ФункцияОПИ      = "СоздатьПапку"; | ||||
|  | ||||
|     Результат = OPI_ПроксиИнтеграций.ИзменитьОбработчикЗапросов(Проект, КлючОбработчика, БиблиотекаОПИ, ФункцияОПИ); | ||||
| ``` | ||||
|      | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
							
								
								
									
										4
									
								
								docs/ru/md/Методы_прокси_интеграций/Handlers-configuration/_category_.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/ru/md/Методы_прокси_интеграций/Handlers-configuration/_category_.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| { | ||||
| "label": "Настройка обработчиков", | ||||
| "position": "3" | ||||
| } | ||||
| @@ -25,7 +25,7 @@ import TabItem from '@theme/TabItem'; | ||||
|  | ||||
|  | ||||
| ```bsl title="Пример использования для 1С:Предприятие/OneScript" | ||||
|     Путь = "C:\Users\Administrator\AppData\Local\Temp\v8_8CEA_26.oint"; | ||||
|     Путь = "C:\Users\Administrator\AppData\Local\Temp\v8_250E_27.oint"; | ||||
|  | ||||
|     Результат = OPI_ПроксиИнтеграций.СоздатьПроект(Путь); | ||||
| ``` | ||||
|   | ||||
| @@ -1,16 +1,16 @@ | ||||
| --- | ||||
| sidebar_position: 6 | ||||
| sidebar_position: 2 | ||||
| --- | ||||
| 
 | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
| 
 | ||||
| # Запустить | ||||
| # Запустить проект | ||||
|  Запускает прокси сервер интеграций | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| `Функция Запустить(Знач Порт, Знач Проект) Экспорт` | ||||
| `Функция ЗапуститьПроект(Знач Порт, Знач Проект) Экспорт` | ||||
| 
 | ||||
|   | Параметр | CLI опция | Тип | Обяз. | Назначение | | ||||
|   |-|-|-|-|-| | ||||
							
								
								
									
										12546
									
								
								service/dictionaries/en.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12546
									
								
								service/dictionaries/en.json
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										343
									
								
								src/en/OInt/core/Modules/OPI_IntegrationProxy.os
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										343
									
								
								src/en/OInt/core/Modules/OPI_IntegrationProxy.os
									
									
									
									
										vendored
									
									
								
							| @@ -60,6 +60,44 @@ Function CreateProject(Val Path) Export | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| // Launch project | ||||
| // Launches integration proxy server | ||||
| // | ||||
| // Parameters: | ||||
| // Port - Number - Servers port - port | ||||
| // Project - String - Project filepath - proj | ||||
| // Returns: | ||||
| // Structure Of KeyAndValue - Result of server shutdown | ||||
| Function LaunchProject(Val Port, Val Project) Export | ||||
|  | ||||
|     OPI_TypeConversion.GetNumber(Port); | ||||
|  | ||||
|     Result = CheckProjectExistence(Project); | ||||
|  | ||||
|     If Not Result["result"] Then | ||||
|         Return Result; | ||||
|     Else | ||||
|         Project = Result["path"]; | ||||
|     EndIf; | ||||
|  | ||||
|     ServerType = Type("WebServer"); | ||||
|  | ||||
|     ServerParams    = New Array(1); | ||||
|     ServerParams[0] = Port; | ||||
|  | ||||
|     WebServer = New(ServerType, ServerParams); | ||||
|  | ||||
|     WebServer.AddRequestsHandler(OPI_IntegrationProxy, "MainHandler"); | ||||
|     WebServer.Start(); | ||||
|  | ||||
|     Return FormResponse(True, "Stopped"); | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| #EndRegion | ||||
|  | ||||
| #Region HandlersConfiguration | ||||
|  | ||||
| // Add requests handler | ||||
| // Adds a new handler to the project | ||||
| // | ||||
| @@ -141,7 +179,7 @@ Function GetRequestHandlersList(Val Project) Export | ||||
| EndFunction | ||||
|  | ||||
| // Get requests handler | ||||
| // Gets information about the handler by ID | ||||
| // Gets information about the handler by key | ||||
| // | ||||
| // Parameters: | ||||
| // Project - String - Project filepath - proj | ||||
| @@ -174,6 +212,10 @@ Function GetRequestsHandler(Val Project, Val HandlerKey) Export | ||||
|  | ||||
|     If Result["result"] Then | ||||
|  | ||||
|         For Each Element In Result["data"] Do | ||||
|             Element.Insert("args", GetHandlerArguments(Project, HandlerKey)); | ||||
|         EndDo; | ||||
|  | ||||
|         RecordsCount = Result["data"].Count(); | ||||
|  | ||||
|         If RecordsCount = 1 Then | ||||
| @@ -183,7 +225,7 @@ Function GetRequestsHandler(Val Project, Val HandlerKey) Export | ||||
|         Else | ||||
|  | ||||
|             If RecordsCount = 0 Then | ||||
|                 Result      = FormResponse(False, "Handler not found!"); | ||||
|                 Result      = FormResponse(False, "Handler not found"); | ||||
|              EndIf; | ||||
|  | ||||
|         EndIf; | ||||
| @@ -224,23 +266,47 @@ Function DeleteRequestHandler(Val Project, Val HandlerKey) Export | ||||
|     FilterStructure.Insert("value", HandlerKey); | ||||
|     FilterStructure.Insert("raw"  , False); | ||||
|  | ||||
|     Result = OPI_SQLite.DeletePosts(Table, FilterStructure, Project); | ||||
|     Results = New Map; | ||||
|     Success = True; | ||||
|  | ||||
|     Return Result; | ||||
|     For Each Table In TableNamesConstants() Do | ||||
|  | ||||
|         TableName      = ConstantValue(Table); | ||||
|         Result         = OPI_SQLite.DeletePosts(TableName, FilterStructure, Project); | ||||
|         CurrentSuccess = Result["result"]; | ||||
|  | ||||
|         Results.Insert(TableName, CurrentSuccess); | ||||
|  | ||||
|         Success = ?(Not CurrentSuccess, CurrentSuccess, Success); | ||||
|  | ||||
|     EndDo; | ||||
|  | ||||
|     Return New Structure("result,tables", Success, Results); | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| // Start | ||||
| // Launches integration proxy server | ||||
| // Update requests handler | ||||
| // Changes the values of the request handler fields | ||||
| // | ||||
| // Parameters: | ||||
| // Port - Number - Servers port - port | ||||
| // Project - String - Project filepath - proj | ||||
| // HandlerKey - String - Handler key - handler | ||||
| // OintLibrary - String - Library name in CLI command format - lib | ||||
| // OintFunction - String - OpenIntegrations function name - func | ||||
| // Method - String - HTTP method that will process the handler: GET, POST, MULTIPART - method | ||||
| // | ||||
| // Returns: | ||||
| // Structure Of KeyAndValue - Result of server shutdown | ||||
| Function Start(Val Port, Val Project) Export | ||||
| // Structure Of KeyAndValue - Result of handler modification | ||||
| Function UpdateRequestsHandler(Val Project | ||||
|     , Val HandlerKey | ||||
|     , Val OintLibrary = "" | ||||
|     , Val OintFunction = "" | ||||
|     , Val Method = "") Export | ||||
|  | ||||
|     OPI_TypeConversion.GetNumber(Port); | ||||
|     OPI_TypeConversion.GetLine(OintLibrary); | ||||
|     OPI_TypeConversion.GetLine(OintFunction); | ||||
|     OPI_TypeConversion.GetLine(Method); | ||||
|     OPI_TypeConversion.GetLine(HandlerKey); | ||||
|  | ||||
|     Result = CheckProjectExistence(Project); | ||||
|  | ||||
| @@ -250,17 +316,166 @@ Function Start(Val Port, Val Project) Export | ||||
|         Project = Result["path"]; | ||||
|     EndIf; | ||||
|  | ||||
|     ServerType = Type("WebServer"); | ||||
|     RecordStructure = New Structure; | ||||
|  | ||||
|     ServerParams    = New Array(1); | ||||
|     ServerParams[0] = Port; | ||||
|     If ValueIsFilled(OintLibrary) Then | ||||
|         RecordStructure.Insert("library" , OintLibrary); | ||||
|     EndIf; | ||||
|  | ||||
|     WebServer = New(ServerType, ServerParams); | ||||
|     If ValueIsFilled(OintFunction) Then | ||||
|         RecordStructure.Insert("function", OintFunction); | ||||
|     EndIf; | ||||
|  | ||||
|     WebServer.AddRequestsHandler(OPI_IntegrationProxy, "MainHandler"); | ||||
|     WebServer.Start(); | ||||
|     If ValueIsFilled(Method) Then | ||||
|         RecordStructure.Insert("method" , Method); | ||||
|     EndIf; | ||||
|  | ||||
|     Return FormResponse(True, "Stopped"); | ||||
|     Result = UpdateHandlerFields(Project, HandlerKey, RecordStructure); | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| // Disable requests handler | ||||
| // Disables the handler by key | ||||
| // | ||||
| // Parameters: | ||||
| // Project - String - Project filepath - proj | ||||
| // HandlerKey - String - Handler key - handler | ||||
| // | ||||
| // Returns: | ||||
| // Structure Of KeyAndValue - Switching result | ||||
| Function DisableRequestsHandler(Val Project, Val HandlerKey) Export | ||||
|  | ||||
|     Return SwitchRequestHandler(Project, HandlerKey, False); | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| // Enable requests handler | ||||
| // Enables the handler by key | ||||
| // | ||||
| // Parameters: | ||||
| // Project - String - Project filepath - proj | ||||
| // HandlerKey - String - Handler key - handler | ||||
| // | ||||
| // Returns: | ||||
| // Structure Of KeyAndValue - Switching result | ||||
| Function EnableRequestsHandler(Val Project, Val HandlerKey) Export | ||||
|  | ||||
|     Return SwitchRequestHandler(Project, HandlerKey, True); | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| #EndRegion | ||||
|  | ||||
| #Region ArgumentSetting | ||||
|  | ||||
| // Set handler arguments | ||||
| // Sets the argument to the function, allowing it to be unspecified when the handler is called | ||||
| // | ||||
| // Parameters: | ||||
| // Project - String - Project filepath - proj | ||||
| // HandlerKey - String - Handler key - handler | ||||
| // Argument - String - CLI argument (option) for the handler function - arg | ||||
| // Value - String - String argument value - value | ||||
| // Strict - Boolean - True > argument cannot be overwritten by a request data - strict | ||||
| // | ||||
| // Returns: | ||||
| // Structure Of KeyAndValue - Setting result | ||||
| Function SetHandlerArguments(Val Project | ||||
|     , Val HandlerKey | ||||
|     , Val Argument | ||||
|     , Val Value | ||||
|     , Val Strict = True) Export | ||||
|  | ||||
|     Result = CheckProjectExistence(Project); | ||||
|  | ||||
|     If Not Result["result"] Then | ||||
|         Return Result; | ||||
|     Else | ||||
|         Project = Result["path"]; | ||||
|     EndIf; | ||||
|  | ||||
|     OPI_TypeConversion.GetLine(HandlerKey); | ||||
|     OPI_TypeConversion.GetLine(Argument); | ||||
|     OPI_TypeConversion.GetLine(Value); | ||||
|     OPI_TypeConversion.GetBoolean(Strict); | ||||
|  | ||||
|     FiltersArray = New Array; | ||||
|  | ||||
|     FilterStructure = New Structure; | ||||
|     FilterStructure.Insert("field", "key"); | ||||
|     FilterStructure.Insert("type" , "="); | ||||
|     FilterStructure.Insert("value", HandlerKey); | ||||
|     FilterStructure.Insert("raw"  , False); | ||||
|     FiltersArray.Add(FilterStructure); | ||||
|  | ||||
|     FilterStructure.Insert("field", "arg"); | ||||
|     FilterStructure.Insert("value", Argument); | ||||
|     FiltersArray.Add(FilterStructure); | ||||
|  | ||||
|     Table  = ConstantValue("ArgumentsTable"); | ||||
|     Result = OPI_SQLite.GetRecords(Table, , FiltersArray, , , Project); | ||||
|  | ||||
|     If Result["result"] Then | ||||
|  | ||||
|         RecordsCount = Result["data"].Count(); | ||||
|  | ||||
|         RecordStructure = New Structure("value,strict", Value, Strict); | ||||
|  | ||||
|         If RecordsCount <> 0 Then | ||||
|             Result = OPI_SQLite.UpdateRecords(Table, RecordStructure, FiltersArray, Project); | ||||
|         Else | ||||
|  | ||||
|             RecordStructure.Insert("key", HandlerKey); | ||||
|             RecordStructure.Insert("arg", Argument); | ||||
|             Result = OPI_SQLite.AddRecords(Table, RecordStructure, False, Project); | ||||
|  | ||||
|         EndIf; | ||||
|  | ||||
|         If Result["result"] Then | ||||
|             Result = GetRequestsHandler(Project, HandlerKey); | ||||
|         EndIf; | ||||
|  | ||||
|     EndIf; | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| // Get handler arguments | ||||
| // Gets the list of defined handler arguments | ||||
| // | ||||
| // Parameters: | ||||
| // Project - String - Project filepath - proj | ||||
| // HandlerKey - String - Handler key - handler | ||||
| // | ||||
| // Returns: | ||||
| // Structure Of KeyAndValue - Handlers list | ||||
| Function GetHandlerArguments(Val Project, Val HandlerKey) Export | ||||
|  | ||||
|     Result = CheckProjectExistence(Project); | ||||
|  | ||||
|     If Not Result["result"] Then | ||||
|         Return Result; | ||||
|     Else | ||||
|         Project = Result["path"]; | ||||
|     EndIf; | ||||
|  | ||||
|     OPI_TypeConversion.GetLine(HandlerKey); | ||||
|  | ||||
|     FilterStructure = New Structure; | ||||
|     FilterStructure.Insert("field", "key"); | ||||
|     FilterStructure.Insert("type" , "="); | ||||
|     FilterStructure.Insert("value", HandlerKey); | ||||
|     FilterStructure.Insert("raw"  , False); | ||||
|  | ||||
|     Table      = ConstantValue("ArgumentsTable"); | ||||
|     FieldArray = StrSplit("arg,value,strict", ","); | ||||
|  | ||||
|     Result = OPI_SQLite.GetRecords(Table, FieldArray, FilterStructure, , , Project); | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| @@ -278,16 +493,16 @@ Function CheckProjectExistence(Path) | ||||
|     OPI_Tools.RestoreEscapeSequences(Path); | ||||
|  | ||||
|     ProjectFile = New File(Path); | ||||
|     Text        = "The project file already exists!"; | ||||
|     Text        = "The project file exists"; | ||||
|     Result      = True; | ||||
|  | ||||
|     If Not ProjectFile.Exist() Then | ||||
|         Text   = "Project file not found at the specified path!"; | ||||
|         Text   = "Project file not found at the specified path"; | ||||
|         Result = False; | ||||
|     EndIf; | ||||
|  | ||||
|     If ProjectFile.IsDirectory() Then | ||||
|         Text   = "The directory path is passed, not the project file!"; | ||||
|         Text   = "A directory path was passed, not a project file"; | ||||
|         Result = False; | ||||
|     EndIf; | ||||
|  | ||||
| @@ -326,7 +541,7 @@ Function NormalizeProject(Path) | ||||
|         Result = CreateNewProject(FullPath); | ||||
|  | ||||
|         If Result["result"] Then | ||||
|             Text     = "The project file has been successfully created!"; | ||||
|             Text     = "The project file was created successfully"; | ||||
|             Response = FormResponse(True, Text, FullPath); | ||||
|         Else | ||||
|             Response = Result; | ||||
| @@ -334,7 +549,7 @@ Function NormalizeProject(Path) | ||||
|  | ||||
|     Else | ||||
|  | ||||
|         Text     = "The project file at the given path already exists!"; | ||||
|         Text     = "The project file at the specified path already exists"; | ||||
|         Response = FormResponse(False, Text, FullPath); | ||||
|  | ||||
|     EndIf; | ||||
| @@ -357,11 +572,23 @@ EndFunction | ||||
|  | ||||
| Function ConstantValue(Val Key) | ||||
|  | ||||
|     If Key = "HandlersTable" Then Return "handlers" | ||||
|     If Key    = "HandlersTable" Then Return "handlers" | ||||
|     ElsIf Key = "ArgumentsTable" Then Return "arguments" | ||||
|  | ||||
|     Else Return "" EndIf; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| Function TableNamesConstants(Val HandlersOnly = True) | ||||
|  | ||||
|     ArrayOfNames = New Array; | ||||
|     ArrayOfNames.Add("HandlersTable"); | ||||
|     ArrayOfNames.Add("ArgumentsTable"); | ||||
|  | ||||
|     Return ArrayOfNames; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| Function CreateNewProject(Path) | ||||
|  | ||||
|     EmptyFile = ПолучитьДвоичныеДанныеИзСтроки(""); | ||||
| @@ -374,6 +601,13 @@ Function CreateNewProject(Path) | ||||
|         Return Result; | ||||
|     EndIf; | ||||
|  | ||||
|     Result = CreateArgumentsTable(Path); | ||||
|  | ||||
|     If Not Result["result"] Then | ||||
|         DeleteFiles(Path); | ||||
|         Return Result; | ||||
|     EndIf; | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
| @@ -394,6 +628,21 @@ Function CreateHandlersTable(Path) | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| Function CreateArgumentsTable(Path) | ||||
|  | ||||
|     TableStructure = New Map(); | ||||
|     TableStructure.Insert("key"    , "TEXT"); | ||||
|     TableStructure.Insert("arg"    , "TEXT"); | ||||
|     TableStructure.Insert("value"  , "TEXT"); | ||||
|     TableStructure.Insert("strict" , "BOOLEAN"); | ||||
|  | ||||
|     ArgumentsTableName = ConstantValue("ArgumentsTable"); | ||||
|     Result             = OPI_SQLite.CreateTable(ArgumentsTableName, TableStructure, Path); | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| Function GetHandlerUniqueKey(Path) | ||||
|  | ||||
|     SecretKey = GetUUID(9); | ||||
| @@ -430,7 +679,53 @@ Function GetHandlerUniqueKey(Path) | ||||
| EndFunction | ||||
|  | ||||
| Function GetUUID(Val Length) | ||||
|     Return Left(StrReplace(String(New UUID), "-", ""), Length); | ||||
|     Return Upper(Left(StrReplace(String(New UUID), "-", ""), Length)); | ||||
| EndFunction | ||||
|  | ||||
| Function UpdateHandlerFields(Val Project, Val HandlerKey, Val RecordStructure) | ||||
|  | ||||
|     If RecordStructure.Count() > 0 Then | ||||
|  | ||||
|         FilterStructure = New Structure; | ||||
|  | ||||
|         FilterStructure.Insert("field", "key"); | ||||
|         FilterStructure.Insert("type" , "="); | ||||
|         FilterStructure.Insert("value", HandlerKey); | ||||
|         FilterStructure.Insert("raw"  , False); | ||||
|  | ||||
|         HandlersTableName = ConstantValue("HandlersTable"); | ||||
|  | ||||
|         Result = OPI_SQLite.UpdateRecords(HandlersTableName | ||||
|             , RecordStructure | ||||
|             , FilterStructure | ||||
|             , Project); | ||||
|  | ||||
|     Else | ||||
|         Result = FormResponse(False, "Nothing to change"); | ||||
|     EndIf; | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| Function SwitchRequestHandler(Val Project, Val HandlerKey, Val Activity) | ||||
|  | ||||
|     OPI_TypeConversion.GetLine(HandlerKey); | ||||
|     OPI_TypeConversion.GetBoolean(Activity); | ||||
|  | ||||
|     Result = CheckProjectExistence(Project); | ||||
|  | ||||
|     If Not Result["result"] Then | ||||
|         Return Result; | ||||
|     Else | ||||
|         Project = Result["path"]; | ||||
|     EndIf; | ||||
|  | ||||
|     RecordStructure = New Structure("active", Activity); | ||||
|     Result          = UpdateHandlerFields(Project, HandlerKey, RecordStructure); | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| #EndRegion | ||||
|   | ||||
							
								
								
									
										75
									
								
								src/en/OInt/tests/Modules/internal/OPI_Tests.os
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										75
									
								
								src/en/OInt/tests/Modules/internal/OPI_Tests.os
									
									
									
									
										vendored
									
									
								
							| @@ -47,6 +47,7 @@ | ||||
| //@skip-check undefined-function-or-procedure | ||||
| //@skip-check wrong-string-literal-content | ||||
| //@skip-check module-unused-local-variable | ||||
| //@skip-check use-non-recommended-method | ||||
|  | ||||
| // Uncomment if OneScript is executed | ||||
| #Use "../../../tools" | ||||
| @@ -2324,9 +2325,16 @@ Procedure Proxy_ProjectSetup() Export | ||||
|     IntegrationProxy_AddRequestsHandler(TestParameters); | ||||
|     IntegrationProxy_GetRequestsHandler(TestParameters); | ||||
|     IntegrationProxy_GetRequestHandlersList(TestParameters); | ||||
|     IntegrationProxy_UpdateRequestsHandler(TestParameters); | ||||
|     IntegrationProxy_DisableRequestsHandler(TestParameters); | ||||
|     IntegrationProxy_EnableRequestsHandler(TestParameters); | ||||
|     IntegrationProxy_DeleteRequestHandler(TestParameters); | ||||
|  | ||||
|     DeleteFiles(FilePath); | ||||
|     Try | ||||
|         DeleteFiles(FilePath); | ||||
|     Except | ||||
|         Message("Failed to delete a temporary file"); | ||||
|     EndTry; | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| @@ -17184,7 +17192,11 @@ Procedure IntegrationProxy_CreateProject(FunctionParameters) | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "CreateProject (catalog)", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_FileExist(ProjectPath); | ||||
|  | ||||
|     DeleteFiles(ProjectPath); | ||||
|     Try | ||||
|         DeleteFiles(ProjectPath); | ||||
|     Except | ||||
|         Message("Failed to delete a temporary file"); | ||||
|     EndTry; | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| @@ -17258,6 +17270,65 @@ Procedure IntegrationProxy_GetRequestHandlersList(FunctionParameters) | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| Procedure IntegrationProxy_UpdateRequestsHandler(FunctionParameters) | ||||
|  | ||||
|     Project      = FunctionParameters["Proxy_ProjectPath"]; | ||||
|     HandlerKey   = FunctionParameters["Proxy_HandlerKey"]; | ||||
|     OintLibrary  = "dropbox"; | ||||
|     OintFunction = "CreateFolder"; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.UpdateRequestsHandler(Project, HandlerKey, OintLibrary, OintFunction); | ||||
|  | ||||
|     // END | ||||
|  | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "UpdateRequestsHandler", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_ResultTrue(Result); | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.GetRequestsHandler(Project, HandlerKey); | ||||
|  | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "UpdateRequestsHandler (check)", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_ProxyHandler(Result, OintLibrary, OintFunction); | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| Procedure IntegrationProxy_DisableRequestsHandler(FunctionParameters) | ||||
|  | ||||
|     Project    = FunctionParameters["Proxy_ProjectPath"]; | ||||
|     HandlerKey = FunctionParameters["Proxy_HandlerKey"]; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.DisableRequestsHandler(Project, HandlerKey); | ||||
|  | ||||
|     // END | ||||
|  | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "DisableRequestsHandler", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_ResultTrue(Result); | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.GetRequestsHandler(Project, HandlerKey); | ||||
|  | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "DisableRequestsHandler (check)", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_ProxySwitch(Result, False); | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| Procedure IntegrationProxy_EnableRequestsHandler(FunctionParameters) | ||||
|  | ||||
|     Project    = FunctionParameters["Proxy_ProjectPath"]; | ||||
|     HandlerKey = FunctionParameters["Proxy_HandlerKey"]; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.EnableRequestsHandler(Project, HandlerKey); | ||||
|  | ||||
|     // END | ||||
|  | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "EnableRequestsHandler", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_ResultTrue(Result); | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.GetRequestsHandler(Project, HandlerKey); | ||||
|  | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "EnableRequestsHandler (check)", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_ProxySwitch(Result, True); | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| #EndRegion | ||||
|  | ||||
| #EndRegion | ||||
|   | ||||
| @@ -2119,6 +2119,20 @@ Procedure Check_FileExist(Val Result) Export | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| Procedure Check_ProxyHandler(Val Result, Val OintLibrary, Val OintFunction) Export | ||||
|  | ||||
|     ExpectsThat(Result["data"]["library"]).Равно(OintLibrary); | ||||
|     ExpectsThat(Result["data"]["function"]).Равно(OintFunction); | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| Procedure Check_ProxySwitch(Val Result, Val Active) Export | ||||
|  | ||||
|     Active = ?(Active, 1, 0); | ||||
|     ExpectsThat(Result["data"]["active"]).Равно(Active); | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| #EndRegion | ||||
|  | ||||
| #EndRegion | ||||
|   | ||||
| @@ -60,6 +60,44 @@ Function CreateProject(Val Path) Export | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| // Launch project | ||||
| // Launches integration proxy server | ||||
| // | ||||
| // Parameters: | ||||
| // Port - Number - Servers port - port | ||||
| // Project - String - Project filepath - proj | ||||
| // Returns: | ||||
| // Structure Of KeyAndValue - Result of server shutdown | ||||
| Function LaunchProject(Val Port, Val Project) Export | ||||
|  | ||||
|     OPI_TypeConversion.GetNumber(Port); | ||||
|  | ||||
|     Result = CheckProjectExistence(Project); | ||||
|  | ||||
|     If Not Result["result"] Then | ||||
|         Return Result; | ||||
|     Else | ||||
|         Project = Result["path"]; | ||||
|     EndIf; | ||||
|  | ||||
|     ServerType = Type("WebServer"); | ||||
|  | ||||
|     ServerParams    = New Array(1); | ||||
|     ServerParams[0] = Port; | ||||
|  | ||||
|     WebServer = New(ServerType, ServerParams); | ||||
|  | ||||
|     WebServer.AddRequestsHandler(OPI_IntegrationProxy, "MainHandler"); | ||||
|     WebServer.Start(); | ||||
|  | ||||
|     Return FormResponse(True, "Stopped"); | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| #EndRegion | ||||
|  | ||||
| #Region HandlersConfiguration | ||||
|  | ||||
| // Add requests handler | ||||
| // Adds a new handler to the project | ||||
| // | ||||
| @@ -141,7 +179,7 @@ Function GetRequestHandlersList(Val Project) Export | ||||
| EndFunction | ||||
|  | ||||
| // Get requests handler | ||||
| // Gets information about the handler by ID | ||||
| // Gets information about the handler by key | ||||
| // | ||||
| // Parameters: | ||||
| // Project - String - Project filepath - proj | ||||
| @@ -174,6 +212,10 @@ Function GetRequestsHandler(Val Project, Val HandlerKey) Export | ||||
|  | ||||
|     If Result["result"] Then | ||||
|  | ||||
|         For Each Element In Result["data"] Do | ||||
|             Element.Insert("args", GetHandlerArguments(Project, HandlerKey)); | ||||
|         EndDo; | ||||
|  | ||||
|         RecordsCount = Result["data"].Count(); | ||||
|  | ||||
|         If RecordsCount = 1 Then | ||||
| @@ -183,7 +225,7 @@ Function GetRequestsHandler(Val Project, Val HandlerKey) Export | ||||
|         Else | ||||
|  | ||||
|             If RecordsCount = 0 Then | ||||
|                 Result      = FormResponse(False, "Handler not found!"); | ||||
|                 Result      = FormResponse(False, "Handler not found"); | ||||
|              EndIf; | ||||
|  | ||||
|         EndIf; | ||||
| @@ -224,23 +266,47 @@ Function DeleteRequestHandler(Val Project, Val HandlerKey) Export | ||||
|     FilterStructure.Insert("value", HandlerKey); | ||||
|     FilterStructure.Insert("raw"  , False); | ||||
|  | ||||
|     Result = OPI_SQLite.DeletePosts(Table, FilterStructure, Project); | ||||
|     Results = New Map; | ||||
|     Success = True; | ||||
|  | ||||
|     Return Result; | ||||
|     For Each Table In TableNamesConstants() Do | ||||
|  | ||||
|         TableName      = ConstantValue(Table); | ||||
|         Result         = OPI_SQLite.DeletePosts(TableName, FilterStructure, Project); | ||||
|         CurrentSuccess = Result["result"]; | ||||
|  | ||||
|         Results.Insert(TableName, CurrentSuccess); | ||||
|  | ||||
|         Success = ?(Not CurrentSuccess, CurrentSuccess, Success); | ||||
|  | ||||
|     EndDo; | ||||
|  | ||||
|     Return New Structure("result,tables", Success, Results); | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| // Start | ||||
| // Launches integration proxy server | ||||
| // Update requests handler | ||||
| // Changes the values of the request handler fields | ||||
| // | ||||
| // Parameters: | ||||
| // Port - Number - Servers port - port | ||||
| // Project - String - Project filepath - proj | ||||
| // HandlerKey - String - Handler key - handler | ||||
| // OintLibrary - String - Library name in CLI command format - lib | ||||
| // OintFunction - String - OpenIntegrations function name - func | ||||
| // Method - String - HTTP method that will process the handler: GET, POST, MULTIPART - method | ||||
| // | ||||
| // Returns: | ||||
| // Structure Of KeyAndValue - Result of server shutdown | ||||
| Function Start(Val Port, Val Project) Export | ||||
| // Structure Of KeyAndValue - Result of handler modification | ||||
| Function UpdateRequestsHandler(Val Project | ||||
|     , Val HandlerKey | ||||
|     , Val OintLibrary = "" | ||||
|     , Val OintFunction = "" | ||||
|     , Val Method = "") Export | ||||
|  | ||||
|     OPI_TypeConversion.GetNumber(Port); | ||||
|     OPI_TypeConversion.GetLine(OintLibrary); | ||||
|     OPI_TypeConversion.GetLine(OintFunction); | ||||
|     OPI_TypeConversion.GetLine(Method); | ||||
|     OPI_TypeConversion.GetLine(HandlerKey); | ||||
|  | ||||
|     Result = CheckProjectExistence(Project); | ||||
|  | ||||
| @@ -250,17 +316,166 @@ Function Start(Val Port, Val Project) Export | ||||
|         Project = Result["path"]; | ||||
|     EndIf; | ||||
|  | ||||
|     ServerType = Type("WebServer"); | ||||
|     RecordStructure = New Structure; | ||||
|  | ||||
|     ServerParams    = New Array(1); | ||||
|     ServerParams[0] = Port; | ||||
|     If ValueIsFilled(OintLibrary) Then | ||||
|         RecordStructure.Insert("library" , OintLibrary); | ||||
|     EndIf; | ||||
|  | ||||
|     WebServer = New(ServerType, ServerParams); | ||||
|     If ValueIsFilled(OintFunction) Then | ||||
|         RecordStructure.Insert("function", OintFunction); | ||||
|     EndIf; | ||||
|  | ||||
|     WebServer.AddRequestsHandler(OPI_IntegrationProxy, "MainHandler"); | ||||
|     WebServer.Start(); | ||||
|     If ValueIsFilled(Method) Then | ||||
|         RecordStructure.Insert("method" , Method); | ||||
|     EndIf; | ||||
|  | ||||
|     Return FormResponse(True, "Stopped"); | ||||
|     Result = UpdateHandlerFields(Project, HandlerKey, RecordStructure); | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| // Disable requests handler | ||||
| // Disables the handler by key | ||||
| // | ||||
| // Parameters: | ||||
| // Project - String - Project filepath - proj | ||||
| // HandlerKey - String - Handler key - handler | ||||
| // | ||||
| // Returns: | ||||
| // Structure Of KeyAndValue - Switching result | ||||
| Function DisableRequestsHandler(Val Project, Val HandlerKey) Export | ||||
|  | ||||
|     Return SwitchRequestHandler(Project, HandlerKey, False); | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| // Enable requests handler | ||||
| // Enables the handler by key | ||||
| // | ||||
| // Parameters: | ||||
| // Project - String - Project filepath - proj | ||||
| // HandlerKey - String - Handler key - handler | ||||
| // | ||||
| // Returns: | ||||
| // Structure Of KeyAndValue - Switching result | ||||
| Function EnableRequestsHandler(Val Project, Val HandlerKey) Export | ||||
|  | ||||
|     Return SwitchRequestHandler(Project, HandlerKey, True); | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| #EndRegion | ||||
|  | ||||
| #Region ArgumentSetting | ||||
|  | ||||
| // Set handler arguments | ||||
| // Sets the argument to the function, allowing it to be unspecified when the handler is called | ||||
| // | ||||
| // Parameters: | ||||
| // Project - String - Project filepath - proj | ||||
| // HandlerKey - String - Handler key - handler | ||||
| // Argument - String - CLI argument (option) for the handler function - arg | ||||
| // Value - String - String argument value - value | ||||
| // Strict - Boolean - True > argument cannot be overwritten by a request data - strict | ||||
| // | ||||
| // Returns: | ||||
| // Structure Of KeyAndValue - Setting result | ||||
| Function SetHandlerArguments(Val Project | ||||
|     , Val HandlerKey | ||||
|     , Val Argument | ||||
|     , Val Value | ||||
|     , Val Strict = True) Export | ||||
|  | ||||
|     Result = CheckProjectExistence(Project); | ||||
|  | ||||
|     If Not Result["result"] Then | ||||
|         Return Result; | ||||
|     Else | ||||
|         Project = Result["path"]; | ||||
|     EndIf; | ||||
|  | ||||
|     OPI_TypeConversion.GetLine(HandlerKey); | ||||
|     OPI_TypeConversion.GetLine(Argument); | ||||
|     OPI_TypeConversion.GetLine(Value); | ||||
|     OPI_TypeConversion.GetBoolean(Strict); | ||||
|  | ||||
|     FiltersArray = New Array; | ||||
|  | ||||
|     FilterStructure = New Structure; | ||||
|     FilterStructure.Insert("field", "key"); | ||||
|     FilterStructure.Insert("type" , "="); | ||||
|     FilterStructure.Insert("value", HandlerKey); | ||||
|     FilterStructure.Insert("raw"  , False); | ||||
|     FiltersArray.Add(FilterStructure); | ||||
|  | ||||
|     FilterStructure.Insert("field", "arg"); | ||||
|     FilterStructure.Insert("value", Argument); | ||||
|     FiltersArray.Add(FilterStructure); | ||||
|  | ||||
|     Table  = ConstantValue("ArgumentsTable"); | ||||
|     Result = OPI_SQLite.GetRecords(Table, , FiltersArray, , , Project); | ||||
|  | ||||
|     If Result["result"] Then | ||||
|  | ||||
|         RecordsCount = Result["data"].Count(); | ||||
|  | ||||
|         RecordStructure = New Structure("value,strict", Value, Strict); | ||||
|  | ||||
|         If RecordsCount <> 0 Then | ||||
|             Result = OPI_SQLite.UpdateRecords(Table, RecordStructure, FiltersArray, Project); | ||||
|         Else | ||||
|  | ||||
|             RecordStructure.Insert("key", HandlerKey); | ||||
|             RecordStructure.Insert("arg", Argument); | ||||
|             Result = OPI_SQLite.AddRecords(Table, RecordStructure, False, Project); | ||||
|  | ||||
|         EndIf; | ||||
|  | ||||
|         If Result["result"] Then | ||||
|             Result = GetRequestsHandler(Project, HandlerKey); | ||||
|         EndIf; | ||||
|  | ||||
|     EndIf; | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| // Get handler arguments | ||||
| // Gets the list of defined handler arguments | ||||
| // | ||||
| // Parameters: | ||||
| // Project - String - Project filepath - proj | ||||
| // HandlerKey - String - Handler key - handler | ||||
| // | ||||
| // Returns: | ||||
| // Structure Of KeyAndValue - Handlers list | ||||
| Function GetHandlerArguments(Val Project, Val HandlerKey) Export | ||||
|  | ||||
|     Result = CheckProjectExistence(Project); | ||||
|  | ||||
|     If Not Result["result"] Then | ||||
|         Return Result; | ||||
|     Else | ||||
|         Project = Result["path"]; | ||||
|     EndIf; | ||||
|  | ||||
|     OPI_TypeConversion.GetLine(HandlerKey); | ||||
|  | ||||
|     FilterStructure = New Structure; | ||||
|     FilterStructure.Insert("field", "key"); | ||||
|     FilterStructure.Insert("type" , "="); | ||||
|     FilterStructure.Insert("value", HandlerKey); | ||||
|     FilterStructure.Insert("raw"  , False); | ||||
|  | ||||
|     Table      = ConstantValue("ArgumentsTable"); | ||||
|     FieldArray = StrSplit("arg,value,strict", ","); | ||||
|  | ||||
|     Result = OPI_SQLite.GetRecords(Table, FieldArray, FilterStructure, , , Project); | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| @@ -278,16 +493,16 @@ Function CheckProjectExistence(Path) | ||||
|     OPI_Tools.RestoreEscapeSequences(Path); | ||||
|  | ||||
|     ProjectFile = New File(Path); | ||||
|     Text        = "The project file already exists!"; | ||||
|     Text        = "The project file exists"; | ||||
|     Result      = True; | ||||
|  | ||||
|     If Not ProjectFile.Exists() Then | ||||
|         Text   = "Project file not found at the specified path!"; | ||||
|         Text   = "Project file not found at the specified path"; | ||||
|         Result = False; | ||||
|     EndIf; | ||||
|  | ||||
|     If ProjectFile.IsDirectory() Then | ||||
|         Text   = "The directory path is passed, not the project file!"; | ||||
|         Text   = "A directory path was passed, not a project file"; | ||||
|         Result = False; | ||||
|     EndIf; | ||||
|  | ||||
| @@ -326,7 +541,7 @@ Function NormalizeProject(Path) | ||||
|         Result = CreateNewProject(FullPath); | ||||
|  | ||||
|         If Result["result"] Then | ||||
|             Text     = "The project file has been successfully created!"; | ||||
|             Text     = "The project file was created successfully"; | ||||
|             Response = FormResponse(True, Text, FullPath); | ||||
|         Else | ||||
|             Response = Result; | ||||
| @@ -334,7 +549,7 @@ Function NormalizeProject(Path) | ||||
|  | ||||
|     Else | ||||
|  | ||||
|         Text     = "The project file at the given path already exists!"; | ||||
|         Text     = "The project file at the specified path already exists"; | ||||
|         Response = FormResponse(False, Text, FullPath); | ||||
|  | ||||
|     EndIf; | ||||
| @@ -357,11 +572,23 @@ EndFunction | ||||
|  | ||||
| Function ConstantValue(Val Key) | ||||
|  | ||||
|     If Key = "HandlersTable" Then Return "handlers" | ||||
|     If Key    = "HandlersTable" Then Return "handlers" | ||||
|     ElsIf Key = "ArgumentsTable" Then Return "arguments" | ||||
|  | ||||
|     Else Return "" EndIf; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| Function TableNamesConstants(Val HandlersOnly = True) | ||||
|  | ||||
|     ArrayOfNames = New Array; | ||||
|     ArrayOfNames.Add("HandlersTable"); | ||||
|     ArrayOfNames.Add("ArgumentsTable"); | ||||
|  | ||||
|     Return ArrayOfNames; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| Function CreateNewProject(Path) | ||||
|  | ||||
|     EmptyFile = GetBinaryDataFromString(""); | ||||
| @@ -374,6 +601,13 @@ Function CreateNewProject(Path) | ||||
|         Return Result; | ||||
|     EndIf; | ||||
|  | ||||
|     Result = CreateArgumentsTable(Path); | ||||
|  | ||||
|     If Not Result["result"] Then | ||||
|         DeleteFiles(Path); | ||||
|         Return Result; | ||||
|     EndIf; | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
| @@ -394,6 +628,21 @@ Function CreateHandlersTable(Path) | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| Function CreateArgumentsTable(Path) | ||||
|  | ||||
|     TableStructure = New Map(); | ||||
|     TableStructure.Insert("key"    , "TEXT"); | ||||
|     TableStructure.Insert("arg"    , "TEXT"); | ||||
|     TableStructure.Insert("value"  , "TEXT"); | ||||
|     TableStructure.Insert("strict" , "BOOLEAN"); | ||||
|  | ||||
|     ArgumentsTableName = ConstantValue("ArgumentsTable"); | ||||
|     Result             = OPI_SQLite.CreateTable(ArgumentsTableName, TableStructure, Path); | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| Function GetHandlerUniqueKey(Path) | ||||
|  | ||||
|     SecretKey = GetUUID(9); | ||||
| @@ -430,7 +679,53 @@ Function GetHandlerUniqueKey(Path) | ||||
| EndFunction | ||||
|  | ||||
| Function GetUUID(Val Length) | ||||
|     Return Left(StrReplace(String(New UUID), "-", ""), Length); | ||||
|     Return Upper(Left(StrReplace(String(New UUID), "-", ""), Length)); | ||||
| EndFunction | ||||
|  | ||||
| Function UpdateHandlerFields(Val Project, Val HandlerKey, Val RecordStructure) | ||||
|  | ||||
|     If RecordStructure.Count() > 0 Then | ||||
|  | ||||
|         FilterStructure = New Structure; | ||||
|  | ||||
|         FilterStructure.Insert("field", "key"); | ||||
|         FilterStructure.Insert("type" , "="); | ||||
|         FilterStructure.Insert("value", HandlerKey); | ||||
|         FilterStructure.Insert("raw"  , False); | ||||
|  | ||||
|         HandlersTableName = ConstantValue("HandlersTable"); | ||||
|  | ||||
|         Result = OPI_SQLite.UpdateRecords(HandlersTableName | ||||
|             , RecordStructure | ||||
|             , FilterStructure | ||||
|             , Project); | ||||
|  | ||||
|     Else | ||||
|         Result = FormResponse(False, "Nothing to change"); | ||||
|     EndIf; | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| Function SwitchRequestHandler(Val Project, Val HandlerKey, Val Activity) | ||||
|  | ||||
|     OPI_TypeConversion.GetLine(HandlerKey); | ||||
|     OPI_TypeConversion.GetBoolean(Activity); | ||||
|  | ||||
|     Result = CheckProjectExistence(Project); | ||||
|  | ||||
|     If Not Result["result"] Then | ||||
|         Return Result; | ||||
|     Else | ||||
|         Project = Result["path"]; | ||||
|     EndIf; | ||||
|  | ||||
|     RecordStructure = New Structure("active", Activity); | ||||
|     Result          = UpdateHandlerFields(Project, HandlerKey, RecordStructure); | ||||
|  | ||||
|     Return Result; | ||||
|  | ||||
| EndFunction | ||||
|  | ||||
| #EndRegion | ||||
|   | ||||
| @@ -2119,6 +2119,20 @@ Procedure Check_FileExists(Val Result) Export | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| Procedure Check_ProxyHandler(Val Result, Val OintLibrary, Val OintFunction) Export | ||||
|  | ||||
|     ExpectsThat(Result["data"]["library"]).Равно(OintLibrary); | ||||
|     ExpectsThat(Result["data"]["function"]).Равно(OintFunction); | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| Procedure Check_ProxySwitch(Val Result, Val Active) Export | ||||
|  | ||||
|     Active = ?(Active, 1, 0); | ||||
|     ExpectsThat(Result["data"]["active"]).Равно(Active); | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| #EndRegion | ||||
|  | ||||
| #EndRegion | ||||
|   | ||||
| @@ -47,6 +47,7 @@ | ||||
| //@skip-check undefined-function-or-procedure | ||||
| //@skip-check wrong-string-literal-content | ||||
| //@skip-check module-unused-local-variable | ||||
| //@skip-check use-non-recommended-method | ||||
|  | ||||
| // Uncomment if OneScript is executed | ||||
| // #Use "../../../tools" | ||||
| @@ -2324,9 +2325,16 @@ Procedure Proxy_ProjectSetup() Export | ||||
|     IntegrationProxy_AddRequestsHandler(TestParameters); | ||||
|     IntegrationProxy_GetRequestsHandler(TestParameters); | ||||
|     IntegrationProxy_GetRequestHandlersList(TestParameters); | ||||
|     IntegrationProxy_UpdateRequestsHandler(TestParameters); | ||||
|     IntegrationProxy_DisableRequestsHandler(TestParameters); | ||||
|     IntegrationProxy_EnableRequestsHandler(TestParameters); | ||||
|     IntegrationProxy_DeleteRequestHandler(TestParameters); | ||||
|  | ||||
|     DeleteFiles(FilePath); | ||||
|     Try | ||||
|         DeleteFiles(FilePath); | ||||
|     Except | ||||
|         Message("Failed to delete a temporary file"); | ||||
|     EndTry; | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| @@ -17184,7 +17192,11 @@ Procedure IntegrationProxy_CreateProject(FunctionParameters) | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "CreateProject (catalog)", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_FileExists(ProjectPath); | ||||
|  | ||||
|     DeleteFiles(ProjectPath); | ||||
|     Try | ||||
|         DeleteFiles(ProjectPath); | ||||
|     Except | ||||
|         Message("Failed to delete a temporary file"); | ||||
|     EndTry; | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| @@ -17258,6 +17270,65 @@ Procedure IntegrationProxy_GetRequestHandlersList(FunctionParameters) | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| Procedure IntegrationProxy_UpdateRequestsHandler(FunctionParameters) | ||||
|  | ||||
|     Project      = FunctionParameters["Proxy_ProjectPath"]; | ||||
|     HandlerKey   = FunctionParameters["Proxy_HandlerKey"]; | ||||
|     OintLibrary  = "dropbox"; | ||||
|     OintFunction = "CreateFolder"; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.UpdateRequestsHandler(Project, HandlerKey, OintLibrary, OintFunction); | ||||
|  | ||||
|     // END | ||||
|  | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "UpdateRequestsHandler", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_ResultTrue(Result); | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.GetRequestsHandler(Project, HandlerKey); | ||||
|  | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "UpdateRequestsHandler (check)", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_ProxyHandler(Result, OintLibrary, OintFunction); | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| Procedure IntegrationProxy_DisableRequestsHandler(FunctionParameters) | ||||
|  | ||||
|     Project    = FunctionParameters["Proxy_ProjectPath"]; | ||||
|     HandlerKey = FunctionParameters["Proxy_HandlerKey"]; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.DisableRequestsHandler(Project, HandlerKey); | ||||
|  | ||||
|     // END | ||||
|  | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "DisableRequestsHandler", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_ResultTrue(Result); | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.GetRequestsHandler(Project, HandlerKey); | ||||
|  | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "DisableRequestsHandler (check)", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_ProxySwitch(Result, False); | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| Procedure IntegrationProxy_EnableRequestsHandler(FunctionParameters) | ||||
|  | ||||
|     Project    = FunctionParameters["Proxy_ProjectPath"]; | ||||
|     HandlerKey = FunctionParameters["Proxy_HandlerKey"]; | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.EnableRequestsHandler(Project, HandlerKey); | ||||
|  | ||||
|     // END | ||||
|  | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "EnableRequestsHandler", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_ResultTrue(Result); | ||||
|  | ||||
|     Result = OPI_IntegrationProxy.GetRequestsHandler(Project, HandlerKey); | ||||
|  | ||||
|     OPI_TestDataRetrieval.WriteLog(Result, "EnableRequestsHandler (check)", "IntegrationProxy"); | ||||
|     OPI_TestDataRetrieval.Check_ProxySwitch(Result, True); | ||||
|  | ||||
| EndProcedure | ||||
|  | ||||
| #EndRegion | ||||
|  | ||||
| #EndRegion | ||||
|   | ||||
							
								
								
									
										213
									
								
								src/en/cli/data/Classes/internal/Classes/proxy.os
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										213
									
								
								src/en/cli/data/Classes/internal/Classes/proxy.os
									
									
									
									
										vendored
									
									
								
							| @@ -21,6 +21,27 @@ | ||||
|     NewLine.ОписаниеМетода   = "Creates a project file at the selected path"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "LaunchProject"; | ||||
|     NewLine.МетодПоиска = "LAUNCHPROJECT"; | ||||
|     NewLine.Параметр    = "--port"; | ||||
|     NewLine.Описание    = "Servers port"; | ||||
|     NewLine.Область     = "Project setup"; | ||||
|     NewLine.ОписаниеМетода   = "Launches integration proxy server"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "LaunchProject"; | ||||
|     NewLine.МетодПоиска = "LAUNCHPROJECT"; | ||||
|     NewLine.Параметр    = "--proj"; | ||||
|     NewLine.Описание    = "Project filepath"; | ||||
|     NewLine.Область     = "Project setup"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
| @@ -28,7 +49,7 @@ | ||||
|     NewLine.МетодПоиска = "ADDREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--proj"; | ||||
|     NewLine.Описание    = "Project filepath"; | ||||
|     NewLine.Область     = "Project setup"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|     NewLine.ОписаниеМетода   = "Adds a new handler to the project"; | ||||
|  | ||||
|  | ||||
| @@ -39,7 +60,7 @@ | ||||
|     NewLine.МетодПоиска = "ADDREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--lib"; | ||||
|     NewLine.Описание    = "Library name in CLI command format"; | ||||
|     NewLine.Область     = "Project setup"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
| @@ -49,7 +70,7 @@ | ||||
|     NewLine.МетодПоиска = "ADDREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--func"; | ||||
|     NewLine.Описание    = "OpenIntegrations function name"; | ||||
|     NewLine.Область     = "Project setup"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
| @@ -59,7 +80,7 @@ | ||||
|     NewLine.МетодПоиска = "ADDREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--method"; | ||||
|     NewLine.Описание    = "HTTP method that will process the handler: GET, POST, MULTIPART (optional, def. val. - GET)"; | ||||
|     NewLine.Область     = "Project setup"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
| @@ -69,7 +90,7 @@ | ||||
|     NewLine.МетодПоиска = "GETREQUESTHANDLERSLIST"; | ||||
|     NewLine.Параметр    = "--proj"; | ||||
|     NewLine.Описание    = "Project filepath"; | ||||
|     NewLine.Область     = "Project setup"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|     NewLine.ОписаниеМетода   = "Gets the list of handlers in the project"; | ||||
|  | ||||
|  | ||||
| @@ -80,8 +101,8 @@ | ||||
|     NewLine.МетодПоиска = "GETREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--proj"; | ||||
|     NewLine.Описание    = "Project filepath"; | ||||
|     NewLine.Область     = "Project setup"; | ||||
|     NewLine.ОписаниеМетода   = "Gets information about the handler by ID"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|     NewLine.ОписаниеМетода   = "Gets information about the handler by key"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
| @@ -91,7 +112,7 @@ | ||||
|     NewLine.МетодПоиска = "GETREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--handler"; | ||||
|     NewLine.Описание    = "Handler key"; | ||||
|     NewLine.Область     = "Project setup"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
| @@ -101,7 +122,7 @@ | ||||
|     NewLine.МетодПоиска = "DELETEREQUESTHANDLER"; | ||||
|     NewLine.Параметр    = "--proj"; | ||||
|     NewLine.Описание    = "Project filepath"; | ||||
|     NewLine.Область     = "Project setup"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|     NewLine.ОписаниеМетода   = "Removes the request handler from the project"; | ||||
|  | ||||
|  | ||||
| @@ -112,28 +133,172 @@ | ||||
|     NewLine.МетодПоиска = "DELETEREQUESTHANDLER"; | ||||
|     NewLine.Параметр    = "--handler"; | ||||
|     NewLine.Описание    = "Handler key"; | ||||
|     NewLine.Область     = "Project setup"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "Start"; | ||||
|     NewLine.МетодПоиска = "START"; | ||||
|     NewLine.Параметр    = "--port"; | ||||
|     NewLine.Описание    = "Servers port"; | ||||
|     NewLine.Область     = "Project setup"; | ||||
|     NewLine.ОписаниеМетода   = "Launches integration proxy server"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "Start"; | ||||
|     NewLine.МетодПоиска = "START"; | ||||
|     NewLine.Метод       = "UpdateRequestsHandler"; | ||||
|     NewLine.МетодПоиска = "UPDATEREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--proj"; | ||||
|     NewLine.Описание    = "Project filepath"; | ||||
|     NewLine.Область     = "Project setup"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|     NewLine.ОписаниеМетода   = "Changes the values of the request handler fields"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "UpdateRequestsHandler"; | ||||
|     NewLine.МетодПоиска = "UPDATEREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--handler"; | ||||
|     NewLine.Описание    = "Handler key"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "UpdateRequestsHandler"; | ||||
|     NewLine.МетодПоиска = "UPDATEREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--lib"; | ||||
|     NewLine.Описание    = "Library name in CLI command format (optional, def. val. - Empty value)"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "UpdateRequestsHandler"; | ||||
|     NewLine.МетодПоиска = "UPDATEREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--func"; | ||||
|     NewLine.Описание    = "OpenIntegrations function name (optional, def. val. - Empty value)"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "UpdateRequestsHandler"; | ||||
|     NewLine.МетодПоиска = "UPDATEREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--method"; | ||||
|     NewLine.Описание    = "HTTP method that will process the handler: GET, POST, MULTIPART (optional, def. val. - Empty value)"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "DisableRequestsHandler"; | ||||
|     NewLine.МетодПоиска = "DISABLEREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--proj"; | ||||
|     NewLine.Описание    = "Project filepath"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|     NewLine.ОписаниеМетода   = "Disables the handler by key"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "DisableRequestsHandler"; | ||||
|     NewLine.МетодПоиска = "DISABLEREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--handler"; | ||||
|     NewLine.Описание    = "Handler key"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "EnableRequestsHandler"; | ||||
|     NewLine.МетодПоиска = "ENABLEREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--proj"; | ||||
|     NewLine.Описание    = "Project filepath"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|     NewLine.ОписаниеМетода   = "Enables the handler by key"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "EnableRequestsHandler"; | ||||
|     NewLine.МетодПоиска = "ENABLEREQUESTSHANDLER"; | ||||
|     NewLine.Параметр    = "--handler"; | ||||
|     NewLine.Описание    = "Handler key"; | ||||
|     NewLine.Область     = "Handlers configuration"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "SetHandlerArguments"; | ||||
|     NewLine.МетодПоиска = "SETHANDLERARGUMENTS"; | ||||
|     NewLine.Параметр    = "--proj"; | ||||
|     NewLine.Описание    = "Project filepath"; | ||||
|     NewLine.Область     = "Argument setting"; | ||||
|     NewLine.ОписаниеМетода   = "Sets the argument to the function, allowing it to be unspecified when the handler is called"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "SetHandlerArguments"; | ||||
|     NewLine.МетодПоиска = "SETHANDLERARGUMENTS"; | ||||
|     NewLine.Параметр    = "--handler"; | ||||
|     NewLine.Описание    = "Handler key"; | ||||
|     NewLine.Область     = "Argument setting"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "SetHandlerArguments"; | ||||
|     NewLine.МетодПоиска = "SETHANDLERARGUMENTS"; | ||||
|     NewLine.Параметр    = "--arg"; | ||||
|     NewLine.Описание    = "CLI argument (option) for the handler function"; | ||||
|     NewLine.Область     = "Argument setting"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "SetHandlerArguments"; | ||||
|     NewLine.МетодПоиска = "SETHANDLERARGUMENTS"; | ||||
|     NewLine.Параметр    = "--value"; | ||||
|     NewLine.Описание    = "String argument value"; | ||||
|     NewLine.Область     = "Argument setting"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "SetHandlerArguments"; | ||||
|     NewLine.МетодПоиска = "SETHANDLERARGUMENTS"; | ||||
|     NewLine.Параметр    = "--strict"; | ||||
|     NewLine.Описание    = "True > argument cannot be overwritten by a request data (optional, def. val. - Yes)"; | ||||
|     NewLine.Область     = "Argument setting"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "GetHandlerArguments"; | ||||
|     NewLine.МетодПоиска = "GETHANDLERARGUMENTS"; | ||||
|     NewLine.Параметр    = "--proj"; | ||||
|     NewLine.Описание    = "Project filepath"; | ||||
|     NewLine.Область     = "Argument setting"; | ||||
|     NewLine.ОписаниеМетода   = "Gets the list of defined handler arguments"; | ||||
|  | ||||
|  | ||||
|     NewLine = CompositionTable.Add(); | ||||
|     NewLine.Библиотека  = "proxy"; | ||||
|     NewLine.Модуль      = "OPI_IntegrationProxy"; | ||||
|     NewLine.Метод       = "GetHandlerArguments"; | ||||
|     NewLine.МетодПоиска = "GETHANDLERARGUMENTS"; | ||||
|     NewLine.Параметр    = "--handler"; | ||||
|     NewLine.Описание    = "Handler key"; | ||||
|     NewLine.Область     = "Argument setting"; | ||||
|  | ||||
|     Return CompositionTable; | ||||
| EndFunction | ||||
|   | ||||
| @@ -695,7 +695,7 @@ | ||||
|  | ||||
|         ИмяТаблицыОбработчиков = КонстантноеЗначение("ТаблицаОбработчиков"); | ||||
|  | ||||
|         Результат  = OPI_SQLite.ОбновитьЗаписи(ИмяТаблицыОбработчиков | ||||
|         Результат = OPI_SQLite.ОбновитьЗаписи(ИмяТаблицыОбработчиков | ||||
|             , СтруктураЗаписи | ||||
|             , СтруктураФильтра | ||||
|             , Проект); | ||||
|   | ||||
| @@ -695,7 +695,7 @@ | ||||
|  | ||||
|         ИмяТаблицыОбработчиков = КонстантноеЗначение("ТаблицаОбработчиков"); | ||||
|  | ||||
|         Результат  = OPI_SQLite.ОбновитьЗаписи(ИмяТаблицыОбработчиков | ||||
|         Результат = OPI_SQLite.ОбновитьЗаписи(ИмяТаблицыОбработчиков | ||||
|             , СтруктураЗаписи | ||||
|             , СтруктураФильтра | ||||
|             , Проект); | ||||
|   | ||||
| @@ -21,6 +21,27 @@ | ||||
|     НоваяСтрока.ОписаниеМетода   = "Создает файл проекта по выбранному пути"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "ЗапуститьПроект"; | ||||
|     НоваяСтрока.МетодПоиска = "ЗАПУСТИТЬПРОЕКТ"; | ||||
|     НоваяСтрока.Параметр    = "--port"; | ||||
|     НоваяСтрока.Описание    = "Порт запуска сервера"; | ||||
|     НоваяСтрока.Область     = "Настройка проектов"; | ||||
|     НоваяСтрока.ОписаниеМетода   = "Запускает прокси сервер интеграций"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "ЗапуститьПроект"; | ||||
|     НоваяСтрока.МетодПоиска = "ЗАПУСТИТЬПРОЕКТ"; | ||||
|     НоваяСтрока.Параметр    = "--proj"; | ||||
|     НоваяСтрока.Описание    = "Путь к файлу проекта"; | ||||
|     НоваяСтрока.Область     = "Настройка проектов"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
| @@ -28,7 +49,7 @@ | ||||
|     НоваяСтрока.МетодПоиска = "ДОБАВИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--proj"; | ||||
|     НоваяСтрока.Описание    = "Путь к файлу проекта"; | ||||
|     НоваяСтрока.Область     = "Настройка проектов"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|     НоваяСтрока.ОписаниеМетода   = "Добавляет новый обработчик в проект"; | ||||
|  | ||||
|  | ||||
| @@ -39,7 +60,7 @@ | ||||
|     НоваяСтрока.МетодПоиска = "ДОБАВИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--lib"; | ||||
|     НоваяСтрока.Описание    = "Имя библиотеки в CLI формате"; | ||||
|     НоваяСтрока.Область     = "Настройка проектов"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
| @@ -49,7 +70,7 @@ | ||||
|     НоваяСтрока.МетодПоиска = "ДОБАВИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--func"; | ||||
|     НоваяСтрока.Описание    = "Имя функции Открытого пакета интеграций"; | ||||
|     НоваяСтрока.Область     = "Настройка проектов"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
| @@ -59,7 +80,7 @@ | ||||
|     НоваяСтрока.МетодПоиска = "ДОБАВИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--method"; | ||||
|     НоваяСтрока.Описание    = "HTTP метод, который будет обрабатывать обработчик: GET, POST, MULTIPART (необяз. по ум. - GET)"; | ||||
|     НоваяСтрока.Область     = "Настройка проектов"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
| @@ -69,7 +90,7 @@ | ||||
|     НоваяСтрока.МетодПоиска = "ПОЛУЧИТЬСПИСОКОБРАБОТЧИКОВЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--proj"; | ||||
|     НоваяСтрока.Описание    = "Путь к файлу проекта"; | ||||
|     НоваяСтрока.Область     = "Настройка проектов"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|     НоваяСтрока.ОписаниеМетода   = "Получает список обработчиков в проекте"; | ||||
|  | ||||
|  | ||||
| @@ -80,8 +101,8 @@ | ||||
|     НоваяСтрока.МетодПоиска = "ПОЛУЧИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--proj"; | ||||
|     НоваяСтрока.Описание    = "Путь к файлу проекта"; | ||||
|     НоваяСтрока.Область     = "Настройка проектов"; | ||||
|     НоваяСтрока.ОписаниеМетода   = "Получает информацию об обработчике по ID"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|     НоваяСтрока.ОписаниеМетода   = "Получает информацию об обработчике по ключу"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
| @@ -91,7 +112,7 @@ | ||||
|     НоваяСтрока.МетодПоиска = "ПОЛУЧИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--handler"; | ||||
|     НоваяСтрока.Описание    = "Ключ обработчика"; | ||||
|     НоваяСтрока.Область     = "Настройка проектов"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
| @@ -101,7 +122,7 @@ | ||||
|     НоваяСтрока.МетодПоиска = "УДАЛИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--proj"; | ||||
|     НоваяСтрока.Описание    = "Путь к файлу проекта"; | ||||
|     НоваяСтрока.Область     = "Настройка проектов"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|     НоваяСтрока.ОписаниеМетода   = "Удаляет обработчик запросов из проекта"; | ||||
|  | ||||
|  | ||||
| @@ -112,28 +133,172 @@ | ||||
|     НоваяСтрока.МетодПоиска = "УДАЛИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--handler"; | ||||
|     НоваяСтрока.Описание    = "Ключ обработчика"; | ||||
|     НоваяСтрока.Область     = "Настройка проектов"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "Запустить"; | ||||
|     НоваяСтрока.МетодПоиска = "ЗАПУСТИТЬ"; | ||||
|     НоваяСтрока.Параметр    = "--port"; | ||||
|     НоваяСтрока.Описание    = "Порт запуска сервера"; | ||||
|     НоваяСтрока.Область     = "Настройка проектов"; | ||||
|     НоваяСтрока.ОписаниеМетода   = "Запускает прокси сервер интеграций"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "Запустить"; | ||||
|     НоваяСтрока.МетодПоиска = "ЗАПУСТИТЬ"; | ||||
|     НоваяСтрока.Метод       = "ИзменитьОбработчикЗапросов"; | ||||
|     НоваяСтрока.МетодПоиска = "ИЗМЕНИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--proj"; | ||||
|     НоваяСтрока.Описание    = "Путь к файлу проекта"; | ||||
|     НоваяСтрока.Область     = "Настройка проектов"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|     НоваяСтрока.ОписаниеМетода   = "Изменяет значения полей обработчика запросов"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "ИзменитьОбработчикЗапросов"; | ||||
|     НоваяСтрока.МетодПоиска = "ИЗМЕНИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--handler"; | ||||
|     НоваяСтрока.Описание    = "Ключ обработчика"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "ИзменитьОбработчикЗапросов"; | ||||
|     НоваяСтрока.МетодПоиска = "ИЗМЕНИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--lib"; | ||||
|     НоваяСтрока.Описание    = "Имя библиотеки в CLI формате (необяз. по ум. - Пустое значение)"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "ИзменитьОбработчикЗапросов"; | ||||
|     НоваяСтрока.МетодПоиска = "ИЗМЕНИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--func"; | ||||
|     НоваяСтрока.Описание    = "Имя функции Открытого пакета интеграций (необяз. по ум. - Пустое значение)"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "ИзменитьОбработчикЗапросов"; | ||||
|     НоваяСтрока.МетодПоиска = "ИЗМЕНИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--method"; | ||||
|     НоваяСтрока.Описание    = "HTTP метод, который будет обрабатывать обработчик: GET, POST, MULTIPART (необяз. по ум. - Пустое значение)"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "ОтключитьОбработчикЗапросов"; | ||||
|     НоваяСтрока.МетодПоиска = "ОТКЛЮЧИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--proj"; | ||||
|     НоваяСтрока.Описание    = "Путь к файлу проекта"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|     НоваяСтрока.ОписаниеМетода   = "Отключает обработчик по ключу"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "ОтключитьОбработчикЗапросов"; | ||||
|     НоваяСтрока.МетодПоиска = "ОТКЛЮЧИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--handler"; | ||||
|     НоваяСтрока.Описание    = "Ключ обработчика"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "ВключитьОбработчикЗапросов"; | ||||
|     НоваяСтрока.МетодПоиска = "ВКЛЮЧИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--proj"; | ||||
|     НоваяСтрока.Описание    = "Путь к файлу проекта"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|     НоваяСтрока.ОписаниеМетода   = "Включает обработчик по ключу"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "ВключитьОбработчикЗапросов"; | ||||
|     НоваяСтрока.МетодПоиска = "ВКЛЮЧИТЬОБРАБОТЧИКЗАПРОСОВ"; | ||||
|     НоваяСтрока.Параметр    = "--handler"; | ||||
|     НоваяСтрока.Описание    = "Ключ обработчика"; | ||||
|     НоваяСтрока.Область     = "Настройка обработчиков"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "УстановитьАргументОбработчика"; | ||||
|     НоваяСтрока.МетодПоиска = "УСТАНОВИТЬАРГУМЕНТОБРАБОТЧИКА"; | ||||
|     НоваяСтрока.Параметр    = "--proj"; | ||||
|     НоваяСтрока.Описание    = "Путь к файлу проекта"; | ||||
|     НоваяСтрока.Область     = "Установка аргументов"; | ||||
|     НоваяСтрока.ОписаниеМетода   = "Устанавливает аргумент для функции обработчика, позволяя не указывать его при вызове"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "УстановитьАргументОбработчика"; | ||||
|     НоваяСтрока.МетодПоиска = "УСТАНОВИТЬАРГУМЕНТОБРАБОТЧИКА"; | ||||
|     НоваяСтрока.Параметр    = "--handler"; | ||||
|     НоваяСтрока.Описание    = "Ключ обработчика"; | ||||
|     НоваяСтрока.Область     = "Установка аргументов"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "УстановитьАргументОбработчика"; | ||||
|     НоваяСтрока.МетодПоиска = "УСТАНОВИТЬАРГУМЕНТОБРАБОТЧИКА"; | ||||
|     НоваяСтрока.Параметр    = "--arg"; | ||||
|     НоваяСтрока.Описание    = "CLI аргумент (опция) для функции обработчика"; | ||||
|     НоваяСтрока.Область     = "Установка аргументов"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "УстановитьАргументОбработчика"; | ||||
|     НоваяСтрока.МетодПоиска = "УСТАНОВИТЬАРГУМЕНТОБРАБОТЧИКА"; | ||||
|     НоваяСтрока.Параметр    = "--value"; | ||||
|     НоваяСтрока.Описание    = "Строковое значение аргумента"; | ||||
|     НоваяСтрока.Область     = "Установка аргументов"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "УстановитьАргументОбработчика"; | ||||
|     НоваяСтрока.МетодПоиска = "УСТАНОВИТЬАРГУМЕНТОБРАБОТЧИКА"; | ||||
|     НоваяСтрока.Параметр    = "--strict"; | ||||
|     НоваяСтрока.Описание    = "Истина > аргумент не может быть перезаписан данными из запроса (необяз. по ум. - Да)"; | ||||
|     НоваяСтрока.Область     = "Установка аргументов"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "ПолучитьАргументыОбработчика"; | ||||
|     НоваяСтрока.МетодПоиска = "ПОЛУЧИТЬАРГУМЕНТЫОБРАБОТЧИКА"; | ||||
|     НоваяСтрока.Параметр    = "--proj"; | ||||
|     НоваяСтрока.Описание    = "Путь к файлу проекта"; | ||||
|     НоваяСтрока.Область     = "Установка аргументов"; | ||||
|     НоваяСтрока.ОписаниеМетода   = "Получает список установленных аргументов обработчика"; | ||||
|  | ||||
|  | ||||
|     НоваяСтрока = ТаблицаСостава.Добавить(); | ||||
|     НоваяСтрока.Библиотека  = "proxy"; | ||||
|     НоваяСтрока.Модуль      = "OPI_ПроксиИнтеграций"; | ||||
|     НоваяСтрока.Метод       = "ПолучитьАргументыОбработчика"; | ||||
|     НоваяСтрока.МетодПоиска = "ПОЛУЧИТЬАРГУМЕНТЫОБРАБОТЧИКА"; | ||||
|     НоваяСтрока.Параметр    = "--handler"; | ||||
|     НоваяСтрока.Описание    = "Ключ обработчика"; | ||||
|     НоваяСтрока.Область     = "Установка аргументов"; | ||||
|  | ||||
|     Возврат ТаблицаСостава; | ||||
| КонецФункции | ||||
|   | ||||
		Reference in New Issue
	
	Block a user