You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-25 22:12:29 +02:00
Main build (Jenkins)
This commit is contained in:
2
ci/installer_set/share/oint/.versionhash
vendored
2
ci/installer_set/share/oint/.versionhash
vendored
@@ -1 +1 @@
|
|||||||
20B882C7B524C090B4A5C46334314340FC1818BF7F33C612FA00D03607369322
|
8FA439AD7E1536B2A9AB8C7B8FFA79E5FC8039F2477EA39A1F621596D65C21BD
|
||||||
185
docs/docusaurus/src/css/custom.css
vendored
185
docs/docusaurus/src/css/custom.css
vendored
@@ -379,14 +379,36 @@ li > a.menu__link {
|
|||||||
|
|
||||||
/* AUTOGENERATED */
|
/* AUTOGENERATED */
|
||||||
|
|
||||||
.Airtable a::before , .Telegram a::before, .VK a::before, .Viber a::before, .Twitter a::before,
|
.Airtable a::before,
|
||||||
.Notion a::before, .GoogleCalendar a::before, .GoogleDrive a::before, .GoogleSheets a::before,
|
.Bitrix24 a::before,
|
||||||
.Slack a::before, .YandexDisk a::before, .Dropbox a::before, .Bitrix24 a::before, .Messenger a::before,
|
.CDEK a::before,
|
||||||
.Social a::before, .Database a::before, .Folder a::before, .Calendar a::before, .CRM a::before, .Commerce a::before,
|
.Dropbox a::before,
|
||||||
.VKTeams a::before, .S3 a::before, .TCP a::before, .Neocities a::before, .CDEK a::before, .Start a::before,
|
.FTP a::before,
|
||||||
.Other a::before, .SQLite a::before, .PostgreSQL a::before, .GreenAPI a::before, .RCON a::before, .MySQL a::before, .MSSQL a::before, .AI a:before,
|
.GoogleCalendar a::before,
|
||||||
.Ollama a::before, .Exchange a::before, .HTTP a::before, .OpenAI a::before, .Addons a::before, .Melezh a::before, .CL a::before, .WebUI a::before,
|
.GoogleDrive a::before,
|
||||||
.Info a::before, .FTP a::before, .SFTP a::before, .SSH a::before, .GreenMax a::before, .MongoDB a::before{
|
.GoogleSheets a::before,
|
||||||
|
.GreenAPI a::before,
|
||||||
|
.GreenMax a::before,
|
||||||
|
.MongoDB a::before,
|
||||||
|
.MSSQL a::before,
|
||||||
|
.MySQL a::before,
|
||||||
|
.Neocities a::before,
|
||||||
|
.Notion a::before,
|
||||||
|
.PostgreSQL a::before,
|
||||||
|
.RCON a::before,
|
||||||
|
.ReportPortal a::before,
|
||||||
|
.S3 a::before,
|
||||||
|
.SFTP a::before,
|
||||||
|
.Slack a::before,
|
||||||
|
.SQLite a::before,
|
||||||
|
.SSH a::before,
|
||||||
|
.TCP a::before,
|
||||||
|
.Telegram a::before,
|
||||||
|
.Twitter a::before,
|
||||||
|
.Viber a::before,
|
||||||
|
.VK a::before,
|
||||||
|
.VKTeams a::before,
|
||||||
|
.YandexDisk a::before,{
|
||||||
padding-right: 0.7rem;
|
padding-right: 0.7rem;
|
||||||
padding-top: 0.4rem;
|
padding-top: 0.4rem;
|
||||||
}
|
}
|
||||||
@@ -395,28 +417,20 @@ li > a.menu__link {
|
|||||||
content: url(../../static/img/APIs/small/Airtable.png);
|
content: url(../../static/img/APIs/small/Airtable.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
.Telegram > div > a::before{
|
.Bitrix24 > div > a::before{
|
||||||
content: url(../../static/img/APIs/small/Telegram.png);
|
content: url(../../static/img/APIs/small/Bitrix24.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
.HTTP > div > a::before{
|
.CDEK > div > a::before{
|
||||||
content: url(../../static/img/APIs/small/HTTP.png);
|
content: url(../../static/img/APIs/small/CDEK.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
.VK > div > a::before{
|
.Dropbox > div > a::before{
|
||||||
content: url(../../static/img/APIs/small/VK.png);
|
content: url(../../static/img/APIs/small/Dropbox.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
.Viber > div > a::before{
|
.FTP > div > a::before{
|
||||||
content: url(../../static/img/APIs/small/Viber.png);
|
content: url(../../static/img/APIs/small/FTP.png);
|
||||||
}
|
|
||||||
|
|
||||||
.Twitter > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/Twitter.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.Notion > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/Notion.png);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.GoogleCalendar > div > a::before{
|
.GoogleCalendar > div > a::before{
|
||||||
@@ -431,62 +445,6 @@ li > a.menu__link {
|
|||||||
content: url(../../static/img/APIs/small/GoogleSheets.png);
|
content: url(../../static/img/APIs/small/GoogleSheets.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
.Slack > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/Slack.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.YandexDisk > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/YandexDisk.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.Dropbox > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/Dropbox.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.Bitrix24 > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/Bitrix24.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.VKTeams > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/VKTeams.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.Neocities > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/Neocities.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.CDEK > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/CDEK.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.S3 > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/S3.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.TCP > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/TCP.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.RCON > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/RCON.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.MySQL > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/MySQL.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.MSSQL > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/MSSQL.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.SQLite > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/SQLite.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.PostgreSQL > div > a::before{
|
|
||||||
content: url(../../static/img/APIs/small/PostgreSQL.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.GreenAPI > div > a::before{
|
.GreenAPI > div > a::before{
|
||||||
content: url(../../static/img/APIs/small/GreenAPI.png);
|
content: url(../../static/img/APIs/small/GreenAPI.png);
|
||||||
}
|
}
|
||||||
@@ -499,23 +457,78 @@ li > a.menu__link {
|
|||||||
content: url(../../static/img/APIs/small/MongoDB.png);
|
content: url(../../static/img/APIs/small/MongoDB.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
.Ollama > div > a::before{
|
.MSSQL > div > a::before{
|
||||||
content: url(../../static/img/APIs/small/Ollama.png);
|
content: url(../../static/img/APIs/small/MSSQL.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
.OpenAI > div > a::before{
|
.MySQL > div > a::before{
|
||||||
content: url(../../static/img/APIs/small/OpenAI.png);
|
content: url(../../static/img/APIs/small/MySQL.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
.FTP > div > a::before{
|
.Neocities > div > a::before{
|
||||||
content: url(../../static/img/APIs/small/FTP.png);
|
content: url(../../static/img/APIs/small/Neocities.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.Notion > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/Notion.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.PostgreSQL > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/PostgreSQL.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.RCON > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/RCON.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ReportPortal > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/ReportPortal.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.S3 > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/S3.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
.SFTP > div > a::before{
|
.SFTP > div > a::before{
|
||||||
content: url(../../static/img/APIs/small/SFTP.png);
|
content: url(../../static/img/APIs/small/SFTP.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.Slack > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/Slack.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.SQLite > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/SQLite.png);
|
||||||
|
}
|
||||||
|
|
||||||
.SSH > div > a::before{
|
.SSH > div > a::before{
|
||||||
content: url(../../static/img/APIs/small/SSH.png);
|
content: url(../../static/img/APIs/small/SSH.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.TCP > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/TCP.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.Telegram > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/Telegram.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.Twitter > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/Twitter.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.Viber > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/Viber.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.VK > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/VK.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.VKTeams > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/VKTeams.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.YandexDisk > div > a::before{
|
||||||
|
content: url(../../static/img/APIs/small/YandexDisk.png);
|
||||||
|
}
|
||||||
BIN
docs/docusaurus/static/img/APIs/ReportPortal.png
vendored
Normal file
BIN
docs/docusaurus/static/img/APIs/ReportPortal.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
docs/docusaurus/static/img/APIs/small/ReportPortal.png
vendored
Normal file
BIN
docs/docusaurus/static/img/APIs/small/ReportPortal.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 780 B |
1
docs/en/data/MongoDB/ExecuteCommand.json
vendored
Normal file
1
docs/en/data/MongoDB/ExecuteCommand.json
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"Login":"bayselonarrend","Password":"12we...","Base":"main"}
|
||||||
1
docs/en/data/MongoDB/GetDatabase.json
vendored
Normal file
1
docs/en/data/MongoDB/GetDatabase.json
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"Login":"bayselonarrend","Password":"12we...","Base":"main"}
|
||||||
4
docs/en/examples/MongoDB/ExecuteCommand.txt
vendored
Normal file
4
docs/en/examples/MongoDB/ExecuteCommand.txt
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Address = "127.0.0.1:1234";
|
||||||
|
Login = "bayselonarrend";
|
||||||
|
Password = "12we...";
|
||||||
|
Base = "main";
|
||||||
@@ -2,3 +2,6 @@
|
|||||||
Login = "bayselonarrend";
|
Login = "bayselonarrend";
|
||||||
Password = "12we...";
|
Password = "12we...";
|
||||||
Base = "main";
|
Base = "main";
|
||||||
|
|
||||||
|
ConnectionParams = New Structure("authSource", "admin");
|
||||||
|
Result = OPI_MongoDB.GenerateConnectionString(Address, Base, Login, Password, ConnectionParams);
|
||||||
|
|||||||
4
docs/en/examples/MongoDB/GetDatabase.txt
vendored
Normal file
4
docs/en/examples/MongoDB/GetDatabase.txt
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Address = "127.0.0.1:1234";
|
||||||
|
Login = "bayselonarrend";
|
||||||
|
Password = "12we...";
|
||||||
|
Base = "main";
|
||||||
21
docs/en/md/Instructions/Airtable.md
vendored
21
docs/en/md/Instructions/Airtable.md
vendored
@@ -1,24 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: Airtable
|
id: Airtable
|
||||||
sidebar_class_name: Airtable
|
sidebar_class_name: Airtable
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Airtable]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/Airtable.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Airtable.png').default} width='64px' />
|
||||||
|
|
||||||
# Airtable
|
# Airtable
|
||||||
|
|
||||||
This section is dedicated to the library for working with Airtable API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
1. Sign in to Airtable and go to the **[personal tokens creation page](https://airtable.com/create/tokens)**, press **Create new token**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Enter a name for the new token, select the necessary **scopes** (permissions), and choose the databases and workspaces to which the token will have access
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Copy the new **token**
|
|
||||||
|
|
||||||

|
|
||||||
59
docs/en/md/Instructions/Bitrix24.md
vendored
59
docs/en/md/Instructions/Bitrix24.md
vendored
@@ -1,62 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: Bitrix24
|
id: Bitrix24
|
||||||
sidebar_class_name: Bitrix24
|
sidebar_class_name: Bitrix24
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Bitrix24]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/Bitrix24.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Bitrix24.png').default} width='64px' />
|
||||||
|
|
||||||
# Bitrix24
|
# Bitrix24
|
||||||
|
|
||||||
This section is dedicated to the library for working with Bitrix24 API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
There are two ways to work with Bitrix24 via API: via **Webhook** and via **local application**. For both options you need:
|
|
||||||
|
|
||||||
1. Go to **Developers** in the **Applications** section of the sidebar
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Select **Other**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/><br/>
|
|
||||||
|
|
||||||
### To work via Webhook
|
|
||||||
|
|
||||||
1. Select **Incoming Webhook**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Fill in the necessary permissions in **Permissions Settings** and save the URL of the webhook. This will be used to execute library methods as the **URL** parameter. The optional **Token** parameter will always remain empty in this case
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/><br/>
|
|
||||||
|
|
||||||
## To work via Local Application
|
|
||||||
|
|
||||||
1. Select **Local Application**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Select the path of the handler (if the application does not imply authorization of other users, but only Bitrix management through one administrator account, you can choose any address, for example https://localhost), tick **Use only API** (if you need only the functionality of calling library methods) and fill in the necessary permissions
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Save the **application key** and **application code**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Using the application key, call the **GetAppAuthLink** function and follow the received link in the browser. After authorization, copy the received code from the address bar (or get it to the handler whose address was specified in point 2)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Pass the received code, along with the application key and secret, to the **GetToken** function. Save the received **access** and **refresh tokens**
|
|
||||||
|
|
||||||
6. Tokens have a limited lifetime. To get a new token, you can use the **UpdateToken** function, passing here the refresh token, key and application secret. The refresh creates not only a new access token, but also a refresh token as well
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
16
docs/en/md/Instructions/CDEK.md
vendored
16
docs/en/md/Instructions/CDEK.md
vendored
@@ -1,21 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: CDEK
|
id: CDEK
|
||||||
sidebar_class_name: CDEK
|
sidebar_class_name: CDEK
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, CDEK]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/CDEK.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/CDEK.png').default} width='64px' />
|
||||||
|
|
||||||
# CDEK
|
# CDEK
|
||||||
|
|
||||||
This section is dedicated to the library for working with CDEK API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
1. Contract with CDEK or use test credentials to get started. Learn more [on the documentation page](https://api-docs.cdek.ru/29923849.html)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Use the obtained **Account** and **Secure password** to create a Token using the *GetToken()* method
|
|
||||||
|
|
||||||
|
|
||||||
A **Token** has a limited lifetime, during which it can be used in calls to other library methods. After it expires, you can get a new one by passing the Account and Secure password to the *GetToken()* method again.
|
|
||||||
37
docs/en/md/Instructions/Dropbox.md
vendored
37
docs/en/md/Instructions/Dropbox.md
vendored
@@ -1,40 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: Dropbox
|
id: Dropbox
|
||||||
sidebar_class_name: Dropbox
|
sidebar_class_name: Dropbox
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Dropbox]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/Dropbox.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Dropbox.png').default} width='64px' />
|
||||||
|
|
||||||
# Dropbox
|
# Dropbox
|
||||||
|
|
||||||
This section is dedicated to the library for working with Dropbox API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
1. Login to [Dropbox Developers](https://www.dropbox.com/developers)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
1. Go to **App Console**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Click on **Create app**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Enter a name for the new application and select **Full Dropbox**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. After creation, on the application page, click **Scoped app** and select the permissions that are necessary to solve your problems. Save **AppKey** and **AppSecret**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
6. Get the authorization link using the *GetAuthorizationLink()* function and pass it in the browser
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
7. Pass the **received code**, **AppKey** and **AppSecret** to the function *GetToken()*, save the received **access_token** and **refresh_token**
|
|
||||||
|
|
||||||
8. After the access_token lifetime expires, it can be updated using the function *RefreshToken()*
|
|
||||||
82
docs/en/md/Instructions/FTP.md
vendored
82
docs/en/md/Instructions/FTP.md
vendored
@@ -1,87 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: FTP
|
id: FTP
|
||||||
sidebar_class_name: FTP
|
sidebar_class_name: FTP
|
||||||
keywords: [1C, 1C:Enterprise, 1C:Enterprise 8.3, API, Integration, Services, Data Exchange, OneScript, CLI, FTP, FTPS]
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, FTP]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/FTP.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/FTP.png').default} width='64px' />
|
||||||
|
|
||||||
# FTP(s)
|
# FTP
|
||||||
|
|
||||||
This section is dedicated to the library for working with FTP(s). On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">An external component is used to implement some functions in this library<br/>
|
|
||||||
Please review the ["About external components"](/docs/Start/Component-requirements) section before getting started</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
This library provides various methods for working with FTP(s) on the client side. Each method accepts a `Connection` as its first parameter, which can be initialized in one of two ways:
|
|
||||||
|
|
||||||
1. Using the `OpenConnection` function. In this case, a component object is returned that supports a single connection for multiple requests.
|
|
||||||
2. Using the `GetConnectionConfiguration` function. In this case, only a connection description structure is returned. Each function receiving this structure as the `Connection` parameter will internally create a new connection and close it upon completion
|
|
||||||
|
|
||||||
When performing multiple sequential requests to an FTP server, it is recommended to use a full connection obtained via the `OpenConnection` function
|
|
||||||
|
|
||||||
## Proxy Usage
|
|
||||||
|
|
||||||
The client supports establishing connections through a proxy server. Proxy settings can be obtained using the `GetProxySettings` function. The resulting structure must then be passed to either `OpenConnection` or `GetConnectionConfiguration` when initiating work
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
ProxyType = "http"; // http, socks5, socks4
|
|
||||||
|
|
||||||
ProxyAddress = FunctionParameters["Proxy_IP"];
|
|
||||||
ProxyPort = FunctionParameters["Proxy_Port"];
|
|
||||||
ProxyLogin = FunctionParameters["Proxy_User"];
|
|
||||||
ProxyPassword = FunctionParameters["Proxy_Password"];
|
|
||||||
|
|
||||||
ProxySettings = OPI_FTP.GetProxySettings(ProxyAddress, ProxyPort, ProxyType, ProxyLogin, ProxyPassword);
|
|
||||||
|
|
||||||
Connection = OPI_FTP.CreateConnection(FTPSettings, ProxySettings, TLSSettings);
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Support is provided for socks4, socks5, and http proxy servers
|
|
||||||
|
|
||||||
:::warning
|
|
||||||
Operation via http-proxy is experimental and may be unstable depending on the proxy server’s implementation, configuration, and capabilities. It is recommended to use socks-proxy whenever possible for stable traffic transmission
|
|
||||||
:::
|
|
||||||
|
|
||||||
## FTPS (TLS)
|
|
||||||
|
|
||||||
The client also supports secure connections via TLS. To enable it, pass the TLS settings structure to `OpenConnection` or `GetConnectionConfiguration` when initiating work. The TLS settings structure can be obtained using the `GetTlsSettings` function
|
|
||||||
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
TLSSettings = OPI_FTP.GetTLSSettings(True);
|
|
||||||
Connection = OPI_FTP.CreateConnection(FTPSettings, ProxySettings, TLSSettings);
|
|
||||||
|
|
||||||
If UseProxy Then
|
|
||||||
|
|
||||||
ProxyType = FunctionParameters["Proxy_Type"]; // http, socks5, socks4
|
|
||||||
|
|
||||||
ProxyAddress = FunctionParameters["Proxy_IP"];
|
|
||||||
ProxyPort = FunctionParameters["Proxy_Port"];
|
|
||||||
ProxyLogin = FunctionParameters["Proxy_User"];
|
|
||||||
ProxyPassword = FunctionParameters["Proxy_Password"];
|
|
||||||
|
|
||||||
ProxySettings = OPI_FTP.GetProxySettings(ProxyAddress, ProxyPort, ProxyType, ProxyLogin, ProxyPassword);
|
|
||||||
|
|
||||||
EndIf;
|
|
||||||
|
|
||||||
If FTPS Then
|
|
||||||
TLSSettings = OPI_FTP.GetTLSSettings(True);
|
|
||||||
EndIf;
|
|
||||||
|
|
||||||
Connection = OPI_FTP.CreateConnection(FTPSettings, ProxySettings, TLSSettings);
|
|
||||||
|
|
||||||
```
|
|
||||||
99
docs/en/md/Instructions/GoogleCalendar.md
vendored
99
docs/en/md/Instructions/GoogleCalendar.md
vendored
@@ -1,102 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: GoogleCalendar
|
id: GoogleCalendar
|
||||||
sidebar_class_name: GoogleCalendar
|
sidebar_class_name: GoogleCalendar
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, GoogleCalendar]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/GoogleCalendar.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/GoogleCalendar.png').default} width='64px' />
|
||||||
|
|
||||||
# Google Calendar
|
# GoogleCalendar
|
||||||
|
|
||||||
This section is dedicated to the library for working with API Google Calendar. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
:::important
|
|
||||||
If you're already using the API to interact with other Google Workspace services and have completed the initial setup, you can skip the steps for **Creating a Project** and **Setting Up OAuth**. You just need to enable the Google Drive** service in your existing project and reacquire the token (the last two steps in the instructions).
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Project creation
|
|
||||||
|
|
||||||
1. Go to the [Google Cloud Console](https://console.cloud.google.com) and create a project
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Select the created project and in the side menu go to APIs and Services -> OAuth consent screen
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Choose External
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Fill in the fields: App name, User support email, and Email addresses (all fields with asterisks)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Click on Next and then Save and continue on the last tab
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
6. Click on Publish App
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### OAuth settings
|
|
||||||
|
|
||||||
1. In the side menu, select Credentials -> Create Credentials -> OAuth client ID
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Enter the name and choose Application type - Desktop app
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Save ClientID and Client Secret
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Enable service - Google Calendar
|
|
||||||
|
|
||||||
1. Go to the [Calendar page on the Marketplace](https://console.cloud.google.com/marketplace/product/google/calendar-json.googleapis.com)
|
|
||||||
|
|
||||||
2. Click Enable
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Token retrieval
|
|
||||||
|
|
||||||
1. Pass the ClientID to the function OPI_GoogleWorkspace.FormCodeRetrievalLink() with boolean parameters of the services you use. The function will result in a URL that needs to be opened in the browser. Authorize with your Google account
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Copy the code from the URL after authorization
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
:::important
|
|
||||||
**The code life time is extremely short.** After receiving it, you need to perform step 3 as quickly as possible. It is best to prepare a data processor with an input field and a button (in 1C), or use the CLI version of OPI for this step. In case of code lifetime expiry before completing step 3, the error `invalid_grant` will occur
|
|
||||||
:::
|
|
||||||
|
|
||||||
3. Use the obtained code, ClientID, and Client Secret to call the function OPI_GoogleWorkspace.GetTokenByCode(ClientID, ClientSecret, Code)
|
|
||||||
|
|
||||||
```json title="Result of the function GetTokenByCode() if converted to JSON"
|
|
||||||
|
|
||||||
{
|
|
||||||
"token_type": "Bearer",
|
|
||||||
"refresh_token": "1//09au6OES3JN9oCgYIARAAGAkSNwF-L9Ir1B7uawfwafT1wE0FKO519Xj6JxawfawfyjMyJ_QlUZYLHZqw",
|
|
||||||
"scope": "https://www.googleapis.com/auth/calendar",
|
|
||||||
"expires_in": 3599,
|
|
||||||
"access_token": "ya29.a0AfB_byA344tXkIawdawdwadadhyZQV8bSZn_snNXtY2HLb7l71awdawdawdad-ASgpzyOSWIvEmPruhUa_1yCCq6jvoD0r_q-fNEsARrH8zpJ3c6LNGWvwdg8CXsSxYaCgYKAWkSawfwafawfrCK0EP5kZY_A0171"
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Use the **access_token** to pass as a Token parameter when calling functions of the library, and the **refresh_token** - to obtain a new access_token (function OPI_GoogleWorkspace.RefreshToken(ClientID, ClientSecret, RefreshToken)), when the old one expires. When refreshing the token, the refresh_token is not updated - you can use the same one to get a new access_token each time.
|
|
||||||
99
docs/en/md/Instructions/GoogleDrive.md
vendored
99
docs/en/md/Instructions/GoogleDrive.md
vendored
@@ -1,102 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: GoogleDrive
|
id: GoogleDrive
|
||||||
sidebar_class_name: GoogleDrive
|
sidebar_class_name: GoogleDrive
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, GoogleDrive]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/GoogleDrive.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/GoogleDrive.png').default} width='64px' />
|
||||||
|
|
||||||
# Google Drive
|
# GoogleDrive
|
||||||
|
|
||||||
This section is dedicated to the library for working with API Google Drive. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
:::important
|
|
||||||
If you're already using the API to interact with other Google Workspace services and have completed the initial setup, you can skip the steps for **Creating a Project** and **Setting Up OAuth**. You just need to enable the Google Drive** service in your existing project and reacquire the token (the last two steps in the instructions).
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Project creation
|
|
||||||
|
|
||||||
1. Go to the [Google Cloud Console](https://console.cloud.google.com) and create a project
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Select the created project and in the side menu go to APIs and Services -> OAuth consent screen
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Choose External
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Fill in the fields: App name, User support email, and Email addresses (all fields with asterisks)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Click on Next and then Save and continue on the last tab
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
6. Click on Publish App
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### OAuth settings
|
|
||||||
|
|
||||||
1. In the side menu, select Credentials -> Create Credentials -> OAuth client ID
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Enter the name and choose Application type - Desktop app
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Save ClientID and Client Secret
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Enable service - Google Drive
|
|
||||||
|
|
||||||
1. Go to [page Drive in Marketplace](https://console.cloud.google.com/marketplace/product/google/drive.googleapis.com)
|
|
||||||
|
|
||||||
2. Click Enable
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Token retrieval
|
|
||||||
|
|
||||||
1. Pass the ClientID to the function OPI_GoogleWorkspace.FormCodeRetrievalLink() with boolean parameters of the services you use. The function will result in a URL that needs to be opened in the browser. Authorize with your Google account
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Copy the code from the URL after authorization
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
:::important
|
|
||||||
**The code life time is extremely short.** After receiving it, you need to perform step 3 as quickly as possible. It is best to prepare a data processor with an input field and a button (in 1C), or use the CLI version of OPI for this step. In case of code lifetime expiry before completing step 3, the error `invalid_grant` will occur
|
|
||||||
:::
|
|
||||||
|
|
||||||
3. Use the obtained code, ClientID, and Client Secret to call the function OPI_GoogleWorkspace.GetTokenByCode(ClientID, ClientSecret, Code)
|
|
||||||
|
|
||||||
```json title="Result of the function GetTokenByCode() if converted to JSON"
|
|
||||||
|
|
||||||
{
|
|
||||||
"token_type": "Bearer",
|
|
||||||
"refresh_token": "1//09au6OES3JN9oCgYIARAAGAkSNwF-L9Ir1B7uawfwafT1wE0FKO519Xj6JxawfawfyjMyJ_QlUZYLHZqw",
|
|
||||||
"scope": "https://www.googleapis.com/auth/...",
|
|
||||||
"expires_in": 3599,
|
|
||||||
"access_token": "ya29.a0AfB_byA344tXkIawdawdwadadhyZQV8bSZn_snNXtY2HLb7l71awdawdawdad-ASgpzyOSWIvEmPruhUa_1yCCq6jvoD0r_q-fNEsARrH8zpJ3c6LNGWvwdg8CXsSxYaCgYKAWkSawfwafawfrCK0EP5kZY_A0171"
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Use the **access_token** to pass as a Token parameter when calling functions of the library, and the **refresh_token** - to obtain a new access_token (function OPI_GoogleWorkspace.RefreshToken(ClientID, ClientSecret, RefreshToken)), when the old one expires. When refreshing the token, the refresh_token is not updated - you can use the same one to get a new access_token each time.
|
|
||||||
99
docs/en/md/Instructions/GoogleSheets.md
vendored
99
docs/en/md/Instructions/GoogleSheets.md
vendored
@@ -1,102 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: GoogleSheets
|
id: GoogleSheets
|
||||||
sidebar_class_name: GoogleSheets
|
sidebar_class_name: GoogleSheets
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, GoogleSheets]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/GoogleSheets.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/GoogleSheets.png').default} width='64px' />
|
||||||
|
|
||||||
# Google Sheets
|
# GoogleSheets
|
||||||
|
|
||||||
This section is dedicated to the library for working with API Google Sheets. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
:::important
|
|
||||||
If you're already using the API to interact with other Google Workspace services and have completed the initial setup, you can skip the steps for **Creating a Project** and **Setting Up OAuth**. You just need to enable the Google Sheets** service in your existing project and reacquire the token (the last two steps in the instructions).
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Project creation
|
|
||||||
|
|
||||||
1. Go to the [Google Cloud Console](https://console.cloud.google.com) and create a project
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Select the created project and in the side menu go to APIs and Services -> OAuth consent screen
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Choose External
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Fill in the fields: App name, User support email, and Email addresses (all fields with asterisks)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Click on Next and then Save and continue on the last tab
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
6. Click on Publish App
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### OAuth settings
|
|
||||||
|
|
||||||
1. In the side menu, select Credentials -> Create Credentials -> OAuth client ID
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Enter the name and choose Application type - Desktop app
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Save ClientID and Client Secret
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Enable service - Google Sheets
|
|
||||||
|
|
||||||
1. Go to [page Sheets in Marketplace](https://console.cloud.google.com/marketplace/product/google/sheets.googleapis.com)
|
|
||||||
|
|
||||||
2. Click Enable
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Token retrieval
|
|
||||||
|
|
||||||
1. Pass the ClientID to the function OPI_GoogleWorkspace.FormCodeRetrievalLink() with boolean parameters of the services you use. The function will result in a URL that needs to be opened in the browser. Authorize with your Google account
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Copy the code from the URL after authorization
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
:::important
|
|
||||||
**The code life time is extremely short.** After receiving it, you need to perform step 3 as quickly as possible. It is best to prepare a data processor with an input field and a button (in 1C), or use the CLI version of OPI for this step. In case of code lifetime expiry before completing step 3, the error `invalid_grant` will occur
|
|
||||||
:::
|
|
||||||
|
|
||||||
3. Use the obtained code, ClientID, and Client Secret to call the function OPI_GoogleWorkspace.GetTokenByCode(ClientID, ClientSecret, Code)
|
|
||||||
|
|
||||||
```json title="Result of the function GetTokenByCode() if converted to JSON"
|
|
||||||
|
|
||||||
{
|
|
||||||
"token_type": "Bearer",
|
|
||||||
"refresh_token": "1//09au6OES3JN9oCgYIARAAGAkSNwF-L9Ir1B7uawfwafT1wE0FKO519Xj6JxawfawfyjMyJ_QlUZYLHZqw",
|
|
||||||
"scope": "https://www.googleapis.com/auth/...",
|
|
||||||
"expires_in": 3599,
|
|
||||||
"access_token": "ya29.a0AfB_byA344tXkIawdawdwadadhyZQV8bSZn_snNXtY2HLb7l71awdawdawdad-ASgpzyOSWIvEmPruhUa_1yCCq6jvoD0r_q-fNEsARrH8zpJ3c6LNGWvwdg8CXsSxYaCgYKAWkSawfwafawfrCK0EP5kZY_A0171"
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Use the **access_token** to pass as a Token parameter when calling functions of the library, and the **refresh_token** - to obtain a new access_token (function OPI_GoogleWorkspace.RefreshToken(ClientID, ClientSecret, RefreshToken)), when the old one expires. When refreshing the token, the refresh_token is not updated - you can use the same one to get a new access_token each time.
|
|
||||||
34
docs/en/md/Instructions/GreenAPI.md
vendored
34
docs/en/md/Instructions/GreenAPI.md
vendored
@@ -1,39 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: GreenAPI
|
id: GreenAPI
|
||||||
sidebar_class_name: GreenAPI
|
sidebar_class_name: GreenAPI
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, GreenAPI]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/GreenAPI.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/GreenAPI.png').default} width='64px' />
|
||||||
|
|
||||||
# WhatsApp (GreenAPI)
|
# GreenAPI
|
||||||
|
|
||||||
This section is dedicated to the library for working with WhatsApp via Green API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
1. Go to [Green API console](https://console.green-api.com/registration) and complete the registration procedure
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Go to [instances list](https://console.green-api.com/instanceList) and create a new one
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Select a new instance and link it to your WhatsApp account by QR code or phone number
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Save the instance credentials. The `apiUrl`, `mediaUrl`, `idInstance` and `apiTokenInstance` are required to work with the library
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The received data should be passed to the `FormAccessParameters` function. The resulting structure will be used for authorization in all other functions of work with GreenAPI
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
ApiUrl = "https://7105.api.greenapi.com";
|
|
||||||
MediaUrl = "https://7105.media.greenapi.com";
|
|
||||||
IdInstance = "71051...";
|
|
||||||
ApiTokenInstance = "425010d90e114aa6b78f0969e...";
|
|
||||||
|
|
||||||
Result = OPI_GreenAPI.FormAccessParameters(ApiUrl, MediaUrl, IdInstance, ApiTokenInstance);
|
|
||||||
```
|
|
||||||
34
docs/en/md/Instructions/GreenMax.md
vendored
34
docs/en/md/Instructions/GreenMax.md
vendored
@@ -1,39 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: GreenMax
|
id: GreenMax
|
||||||
sidebar_class_name: GreenMax
|
sidebar_class_name: GreenMax
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, GreenMax]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/GreenMax.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/GreenMax.png').default} width='64px' />
|
||||||
|
|
||||||
# Max (GreenAPI)
|
# GreenMax
|
||||||
|
|
||||||
This section is dedicated to the library for working with Max via Green API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
1. Go to [Green API console](https://console.green-api.com/registration) and complete the registration procedure
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Go to [instances list](https://console.green-api.com/instanceList) and create a new one
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Select a new instance and link it to your Max account by phone number
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Save the instance credentials. The `apiUrl`, `mediaUrl`, `idInstance` and `apiTokenInstance` are required to work with the library
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The received data should be passed to the `FormAccessParameters` function. The resulting structure will be used for authorization in all other functions of work with GreenAPI
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
ApiUrl = "https://3100.api.green-api.com/v3";
|
|
||||||
MediaUrl = "https://3100.api.green-api.com/v3";
|
|
||||||
IdInstance = "71051...";
|
|
||||||
ApiTokenInstance = "425010d90e114aa6b78f0969e...";
|
|
||||||
|
|
||||||
Result = OPI_GreenMax.FormAccessParameters(ApiUrl, MediaUrl, IdInstance, ApiTokenInstance);
|
|
||||||
```
|
|
||||||
64
docs/en/md/Instructions/MSSQL.md
vendored
64
docs/en/md/Instructions/MSSQL.md
vendored
@@ -1,69 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: MSSQL
|
id: MSSQL
|
||||||
sidebar_class_name: MSSQL
|
sidebar_class_name: MSSQL
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, MSSQL]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/MSSQL.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/MSSQL.png').default} width='64px' />
|
||||||
|
|
||||||
# MSSQL
|
# MSSQL
|
||||||
|
|
||||||
This section is dedicated to the MSSQL database library. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">An external component is used to implement some functions in this library<br/>
|
|
||||||
Please review the ["About external components"](/docs/Start/Component-requirements) section before getting started</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
|
||||||
<div class="addin">This library requires **OpenSSL 3.x** to run on Linux <br/>
|
|
||||||
Learn more: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Using OpenSSL in External Components"</a></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## About implemented methods
|
|
||||||
|
|
||||||
This library has two parts: basic methods, like connecting and executing SQL queries, and a small ORM for common operations like CREATE, SELECT, INSERT, DELETE, and so on. Working through the ORM and through the query texts executed through the `ExecuteSQLQuery()` function is technically the same: the ORM simply generates the SQL query text based on the layouts, but then also calls them through this function
|
|
||||||
|
|
||||||
By default, all SELECT queries return an array of selected data, while other queries return only `true` in the `result` field on success, or `false` and error text in the `result` and `error` fields, respectively. To execute queries that require data to be returned but are not SELECT queries, the `ExecuteSQLQuery()` function has a `ForceResult` parameter
|
|
||||||
|
|
||||||
## Query parameters
|
|
||||||
|
|
||||||
The MSSQL connector supports the use of positional parameters. All values passed both when executing queries directly through the `ExecuteRequestSQL()` function and in ORM methods with value setting, such as `AddRecords` and `UpdateRecords`, must be a structure of the form `{'Data Type': 'Value'}`. The following data types are supported\*:
|
|
||||||
|
|
||||||
> \* The MSSQL type list lists only a few suitable types
|
|
||||||
|
|
||||||
| Имя типа (ключ структуры) | Тип значения 1С | Подходит для типов MSSQL |
|
|
||||||
|-|-|-|
|
|
||||||
| TINYINT | Number | tinyint |
|
|
||||||
| SMALLINT | Number | smallint |
|
|
||||||
| INT | Number | int |
|
|
||||||
| BIGINT | Number | bigint |
|
|
||||||
| FLOAT24 | Number | float(24), real |
|
|
||||||
| FLOAT53 | Number | float(53) |
|
|
||||||
| NUMERIC | Number | decimal, numeric |
|
|
||||||
| DECIMAL | Number | decimal, numeric |
|
|
||||||
| BIT | Bool | bit |
|
|
||||||
| NVARCHAR | String | nvarchar, varchar, nchar, char, ntext, text |
|
|
||||||
| UUID | String, UUID | uniqueidentifier |
|
|
||||||
| XML | String | xml |
|
|
||||||
| DATE | Date, String | date |
|
|
||||||
| TIME | Date, String | time |
|
|
||||||
| DATETIME | Date, String | datetime, datetime2 |
|
|
||||||
| DATETIMEOFFSET | Date, String | datetimeoffset |
|
|
||||||
| BYTES | BinaryData | varbinary |
|
|
||||||
|
|
||||||
## Retrieving Binary Data
|
|
||||||
|
|
||||||
Binary data retrieved from the database will be represented as an object (structure) of the form `{"BYTES": "Base64 string"}` and must be manually converted from Base64
|
|
||||||
|
|
||||||
## TLS
|
|
||||||
|
|
||||||
The library supports operation in TLS mode. To enable it, you need to configure TLS settings using the `GetTlsSettings` function and pass them as the corresponding parameter to the `CreateConnection` function or one of the ORM functions that support this parameter. If the TLS parameter is not provided when calling these functions, the connection will be initialized in an unsecured mode.
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
TLS settings can only be applied when the connection is established — either explicitly when using the `CreateConnection` function or implicitly when passing a connection string to ORM methods. Providing TLS settings along with an already established connection (passed via the *Connection* parameter) will be ignored.
|
|
||||||
:::
|
|
||||||
8
docs/en/md/Instructions/MongoDB.md
vendored
8
docs/en/md/Instructions/MongoDB.md
vendored
@@ -1,11 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: MongoDB
|
id: MongoDB
|
||||||
sidebar_class_name: MongoDB
|
sidebar_class_name: MongoDB
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, MongoDB]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/MongoDB.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/MongoDB.png').default} width='64px' />
|
||||||
|
|
||||||
# MongoDB
|
# MongoDB
|
||||||
|
|
||||||
This section is dedicated to the library for working with MongoDB. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
55
docs/en/md/Instructions/MySQL.md
vendored
55
docs/en/md/Instructions/MySQL.md
vendored
@@ -1,60 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: MySQL
|
id: MySQL
|
||||||
sidebar_class_name: MySQL
|
sidebar_class_name: MySQL
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, MySQL]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/MySQL.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/MySQL.png').default} width='64px' />
|
||||||
|
|
||||||
# MySQL
|
# MySQL
|
||||||
|
|
||||||
This section is dedicated to the MySQL database library. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">An external component is used to implement some functions in this library<br/>
|
|
||||||
Please review the ["About external components"](/docs/Start/Component-requirements) section before getting started</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
|
||||||
<div class="addin">This library requires **OpenSSL 3.x** to run on Linux <br/>
|
|
||||||
Learn more: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Using OpenSSL in External Components"</a></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## About implemented methods
|
|
||||||
|
|
||||||
This library has two parts: basic methods, like connecting and executing SQL queries, and a small ORM for common operations like CREATE, SELECT, INSERT, DELETE, and so on. Working through the ORM and through the query texts executed through the `ExecuteSQLQuery()` function is technically the same: the ORM simply generates the SQL query text based on the layouts, but then also calls them through this function
|
|
||||||
|
|
||||||
By default, all SELECT queries return an array of selected data, while other queries return only `true` in the `result` field on success, or `false` and error text in the `result` and `error` fields, respectively. To execute queries that require data to be returned but are not SELECT queries, the `ExecuteSQLQuery()` function has a `ForceResult` parameter
|
|
||||||
|
|
||||||
## Query parameters
|
|
||||||
|
|
||||||
The MySQL connector supports the use of positional parameters. All values passed both when executing queries directly through the `ExecuteRequestSQL()` function and in ORM methods with value setting, such as `AddRecords` and `UpdateRecords`, must be a structure of the form `{'Data Type': 'Value'}`. The following data types are supported\*:
|
|
||||||
|
|
||||||
> \* The MySQL type list lists only a few suitable types
|
|
||||||
|
|
||||||
| Type name (key) | 1C type | Suitable MySQL types |
|
|
||||||
|-|-|-|
|
|
||||||
| BYTES | String (filepath), BinaryData | TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB |
|
|
||||||
| UINT | Number (integer, unsigned) | TINYINT UNSIGNED, SMALLINT UNSIGNED, MEDIUMINT UNSIGNED, INT UNSIGNED, BIGINT UNSIGNED |
|
|
||||||
| INT | Number (integer) | TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT |
|
|
||||||
| FLOAT | Number | FLOAT |
|
|
||||||
| DOUBLE | Number | DOUBLE (REAL, DOUBLE PRECISION) |
|
|
||||||
| DATE | Date, String (RFC 3339) | DATE, DATETIME, TIMESTAMP |
|
|
||||||
| TIME | Дата, String (RFC 3339) | TIME |
|
|
||||||
| TEXT | String | CHAR, VARCHAR, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT, SET |
|
|
||||||
|
|
||||||
## Retrieving Binary Data
|
|
||||||
|
|
||||||
Binary data retrieved from the database will be represented as an object (structure) of the form `{"BYTES": "Base64 string"}` and must be manually converted from Base64
|
|
||||||
|
|
||||||
## TLS
|
|
||||||
|
|
||||||
The library supports operation in TLS mode. To enable it, you need to configure TLS settings using the `GetTlsSettings` function and pass them as the corresponding parameter to the `CreateConnection` function or one of the ORM functions that support this parameter. If the TLS parameter is not provided when calling these functions, the connection will be initialized in an unsecured mode.
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
TLS settings can only be applied when the connection is established — either explicitly when using the `CreateConnection` function or implicitly when passing a connection string to ORM methods. Providing TLS settings along with an already established connection (passed via the *Connection* parameter) will be ignored.
|
|
||||||
:::
|
|
||||||
21
docs/en/md/Instructions/Neocities.md
vendored
21
docs/en/md/Instructions/Neocities.md
vendored
@@ -1,26 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: Neocities
|
id: Neocities
|
||||||
sidebar_class_name: Neocities
|
sidebar_class_name: Neocities
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Neocities]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/Neocities.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Neocities.png').default} width='64px' />
|
||||||
|
|
||||||
# Neocities
|
# Neocities
|
||||||
|
|
||||||
This section is dedicated to the library for working with Neocities API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
1. Log in to the [Neocities portal](https://neocities.org) and go to settings
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Select the required site from the list and click **Manage Site Settings**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Click on the **API** tab, generate and save the **API KEY**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
API Key is used in each API method as a Token parameter. You can also generate a token based on your login and password using the *GetToken* method
|
|
||||||
35
docs/en/md/Instructions/Notion.md
vendored
35
docs/en/md/Instructions/Notion.md
vendored
@@ -1,38 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: Notion
|
id: Notion
|
||||||
sidebar_class_name: Notion
|
sidebar_class_name: Notion
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Notion]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/Notion.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Notion.png').default} width='64px' />
|
||||||
|
|
||||||
# Notion
|
# Notion
|
||||||
|
|
||||||
This section is dedicated to the library for working with Notion API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
1. Go to the **[section of integrations of the developer portal](https://www.notion.so/my-integrations)**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Enter the name of your integration
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. After finishing the integration creation, click *Show* and copy the **Token (Secret)**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Go to the **[main interface of Notion](https://notion.so)** and create a new page. This page will serve as the parent for all other objects created through the API
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Click on the three dots in the upper right corner and at the very bottom find the item *Add connections*. Select your integration from items 1-3 there
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
6. Get the ID of this page. You can do this by clicking Share -> Copy link or simply by copying it from the URL
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
**Token** and **Page ID** are the two parameters required for working through the API.
|
|
||||||
82
docs/en/md/Instructions/PostgreSQL.md
vendored
82
docs/en/md/Instructions/PostgreSQL.md
vendored
@@ -1,87 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: PostgreSQL
|
id: PostgreSQL
|
||||||
sidebar_class_name: PostgreSQL
|
sidebar_class_name: PostgreSQL
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, PostgreSQL]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/PostgreSQL.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/PostgreSQL.png').default} width='64px' />
|
||||||
|
|
||||||
# PostgreSQL
|
# PostgreSQL
|
||||||
|
|
||||||
This section is dedicated to the PostgreSQL database library. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">An external component is used to implement some functions in this library<br/>
|
|
||||||
Please review the ["About external components"](/docs/Start/Component-requirements) section before getting started</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
|
||||||
<div class="addin">This library requires **OpenSSL 3.x** to run on Linux <br/>
|
|
||||||
Learn more: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Using OpenSSL in External Components"</a></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## About implemented methods
|
|
||||||
|
|
||||||
This library has two parts: basic methods, like connecting and executing SQL queries, and a small ORM for common operations like CREATE, SELECT, INSERT, DELETE, and so on. Working through the ORM and through the query texts executed through the `ExecuteSQLQuery()` function is technically the same: the ORM simply generates the SQL query text based on the layouts, but then also calls them through this function
|
|
||||||
|
|
||||||
By default, all SELECT queries return an array of selected data, while other queries return only `true` in the `result` field on success, or `false` and error text in the `result` and `error` fields, respectively. To execute queries that require data to be returned but are not SELECT queries, the `ExecuteSQLQuery()` function has a `ForceResult` parameter
|
|
||||||
|
|
||||||
## Query parameters
|
|
||||||
|
|
||||||
The PostgreSQL connector supports the use of positional parameters. All values passed both when executing queries directly through the `ExecuteRequestSQL()` function and in ORM methods with value setting, such as `AddRecords` and `UpdateRecords`, must be a structure of the form `{'Data Type': 'Value'}`. The following data types are supported:
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
🟢 - Implemented, tested; 🟡 - Implemented, not tested
|
|
||||||
:::
|
|
||||||
|
|
||||||
| Type | Support | Synonym | Native types|
|
|
||||||
|-|-|-|-|
|
|
||||||
| BOOL | 🟢 | - | Bool |
|
|
||||||
| "char" | 🟢 | OLDCHAR | Number |
|
|
||||||
| SMALLINT | 🟢 | - | Number |
|
|
||||||
| SMALLSERIAL | 🟢 | - | Number |
|
|
||||||
| INT | 🟢 | - | Number |
|
|
||||||
| SERIAL | 🟢 | - | Number |
|
|
||||||
| BIGINT | 🟢 | - | Number |
|
|
||||||
| BIGSERIAL | 🟢 | - | Number |
|
|
||||||
| OID | 🟢 | - | Number |
|
|
||||||
| REAL | 🟢 | - | Number |
|
|
||||||
| DOUBLE PRECISION | 🟢 | DOUBLE_PRECISION | Number |
|
|
||||||
| VARCHAR | 🟢 | - | String |
|
|
||||||
| TEXT | 🟢 | - | String |
|
|
||||||
| CHAR | 🟢 | - | String |
|
|
||||||
| CITEXT | 🟢 | - | String |
|
|
||||||
| NAME | 🟢 | - | String |
|
|
||||||
| INET | 🟢 | - | String |
|
|
||||||
| UUID | 🟢 | - | String, УникальныйИдентификатор |
|
|
||||||
| TIMESTAMP | 🟢 | - | Date, String (ISO 8601, RFC 3339) |
|
|
||||||
| TIMESTAMP WITH TIME ZONE | 🟢 | TIMESTAMP_WITH_TIME_ZONE | Date (the time zone will be specified as UTC), String (RFC 3339) |
|
|
||||||
| DATE | 🟢 | - | Date (any time part), String (ISO 8601, RFC 3339) |
|
|
||||||
| TIME | 🟢 | - | Date (any date part), String (ISO 8601, RFC 3339) |
|
|
||||||
| BYTEA | 🟢 | - | BinaryData, File path, Base64 String (all converted to a Base64 string) |
|
|
||||||
| JSON | 🟢 | - | Array, Structure, Map, String (JSON) |
|
|
||||||
| JSONB | 🟢 | - | Array, Structure, Map, String (JSON) |
|
|
||||||
| LTREE | 🟡 | - | String |
|
|
||||||
| LQUERY | 🟡 | - | String |
|
|
||||||
| LTXTQUERY | 🟡 | - | String |
|
|
||||||
| HSTORE | 🟡 | - | Structure, Map |
|
|
||||||
|
|
||||||
A similar list of types is also available to retrieve as query results from PostgreSQL
|
|
||||||
|
|
||||||
## Retrieving Binary Data
|
|
||||||
|
|
||||||
Binary data retrieved from the database will be represented as an object (structure) of the form `{"BYTES": "Base64 string"}` and must be manually converted from Base64
|
|
||||||
|
|
||||||
## TLS
|
|
||||||
|
|
||||||
The library supports operation in TLS mode. To enable it, you need to configure TLS settings using the `GetTlsSettings` function and pass them as the corresponding parameter to the `CreateConnection` function or one of the ORM functions that support this parameter. If the TLS parameter is not provided when calling these functions, the connection will be initialized in an unsecured mode.
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
TLS settings can only be applied when the connection is established — either explicitly when using the `CreateConnection` function or implicitly when passing a connection string to ORM methods. Providing TLS settings along with an already established connection (passed via the *Connection* parameter) will be ignored.
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Compatibility
|
|
||||||
27
docs/en/md/Instructions/RCON.md
vendored
27
docs/en/md/Instructions/RCON.md
vendored
@@ -1,32 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: RCON
|
id: RCON
|
||||||
sidebar_class_name: RCON
|
sidebar_class_name: RCON
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, RCON]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/RCON.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/RCON.png').default} width='64px' />
|
||||||
|
|
||||||
# RCON (Client)
|
# RCON
|
||||||
|
|
||||||
This section is dedicated to the library for working with the RCON. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">An external component is used to implement some functions in this library<br/>
|
|
||||||
Please review the ["About external components"](/docs/Start/Component-requirements) section before getting started</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## About the library
|
|
||||||
|
|
||||||
RCON (Remote Console) is a protocol used to remotely control servers, most commonly game servers. It allows administrators or owners to execute commands on a server from the outside, without having to physically access the machine where the server is running.
|
|
||||||
|
|
||||||
Typically, control via RCON is available on servers for games such as:
|
|
||||||
- Minecraft
|
|
||||||
- Counter Strike
|
|
||||||
- ARK
|
|
||||||
- Rust
|
|
||||||
- SAMP
|
|
||||||
- MTA
|
|
||||||
- etc.
|
|
||||||
|
|
||||||
This library provides two main functions for operation: `CreateConnection` for connection and authorisation on the server, and `ExecuteCommand` for performing actions. It is also possible to execute single commands without creating a preliminary connection, passing connection parameters to the `ExecuteCommand` method (in this case the connection will be opened and closed within the function, the only option for CLI version).
|
|
||||||
9
docs/en/md/Instructions/ReportPortal.md
vendored
Normal file
9
docs/en/md/Instructions/ReportPortal.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
id: ReportPortal
|
||||||
|
sidebar_class_name: ReportPortal
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, ReportPortal]
|
||||||
|
---
|
||||||
|
|
||||||
|
<img src={require('../../static/img/APIs/ReportPortal.png').default} width='64px' />
|
||||||
|
|
||||||
|
# ReportPortal
|
||||||
67
docs/en/md/Instructions/S3.md
vendored
67
docs/en/md/Instructions/S3.md
vendored
@@ -1,72 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: S3
|
id: S3
|
||||||
sidebar_class_name: S3
|
sidebar_class_name: S3
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, S3]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/S3.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/S3.png').default} width='64px' />
|
||||||
|
|
||||||
# AWS S3 (MinIO)
|
# S3
|
||||||
|
|
||||||
This section is dedicated to the library for working with AWS S3 API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
:::important
|
|
||||||
|
|
||||||
**S3** - is a standard used by different software products. This means that the availability of methods, as well as their parameters, may differ depending on what software you are using. MinIO-based object storage is used to develop and test this library
|
|
||||||
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
1. Obtain the following authorization data to work with S3:
|
|
||||||
|
|
||||||
+ Access key
|
|
||||||
+ Secret key
|
|
||||||
+ Region
|
|
||||||
+ Storage URL
|
|
||||||
+ Type of service (by default - S3)
|
|
||||||
|
|
||||||
2. Pass the received data to the `GetDataStructure` function and get the structure of the basic data
|
|
||||||
|
|
||||||
```bsl title="1С:Enterprise/OneScript"
|
|
||||||
|
|
||||||
URL = "storage-155.s3hoster.by";
|
|
||||||
AccessKey = "BRN5RKJE67...";
|
|
||||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
|
||||||
Region = "BTC";
|
|
||||||
|
|
||||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash title="CLI"
|
|
||||||
|
|
||||||
oint s3 GetBasicDataStructure
|
|
||||||
--url "storage-155.s3hoster.by"
|
|
||||||
--access "BRN5RKJE67..."
|
|
||||||
--secret "NNhv+i9PrytpT8Tu0C1N..."
|
|
||||||
--region "BTC"
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
The obtained structure (or JSON file) should be used to call other methods of work with S3 API (parameter `MainData`) - authorization data and additional settings of requests will be based on it
|
|
||||||
|
|
||||||
## Response format
|
|
||||||
|
|
||||||
This library uses its own response format to provide data received from the server. It looks as follows:
|
|
||||||
|
|
||||||
```json
|
|
||||||
|
|
||||||
{
|
|
||||||
"status": 200,
|
|
||||||
"response": {},
|
|
||||||
"headers": {}
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
+ The **status** field contains the HTTP response status code
|
|
||||||
+ The **response** field contains the body of the original S3 response, previously converted from XML to JSON
|
|
||||||
+ The **headers** field contains the headers from the original response
|
|
||||||
|
|
||||||
|
|
||||||
The response was modified to JSON to simplify its usage, as the original XML format was more complex to work with
|
|
||||||
62
docs/en/md/Instructions/SFTP.md
vendored
62
docs/en/md/Instructions/SFTP.md
vendored
@@ -1,67 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: SFTP
|
id: SFTP
|
||||||
sidebar_class_name: SFTP
|
sidebar_class_name: SFTP
|
||||||
keywords: [1C, 1C:Enterprise, 1C:Enterprise 8.3, API, Integration, Services, Data Exchange, OneScript, CLI, SFTP]
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, SFTP]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/SFTP.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/SFTP.png').default} width='64px' />
|
||||||
|
|
||||||
# SFTP
|
# SFTP
|
||||||
|
|
||||||
This section is dedicated to the library for working with SFTP. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">An external component is used to implement some functions in this library<br/>
|
|
||||||
Please review the ["About external components"](/docs/Start/Component-requirements) section before getting started</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
|
||||||
<div class="addin">This library requires **OpenSSL 3.x** to run on Linux <br/>
|
|
||||||
Learn more: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Using OpenSSL in External Components"</a></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
This library provides various methods for working with SFTP on the client side. Each method accepts a `Connection` as its first parameter, which can be initialized in one of two ways:
|
|
||||||
|
|
||||||
1. Using the `OpenConnection` function. In this case, a component object is returned that supports a single connection for multiple requests.
|
|
||||||
2. Using the `GetConnectionConfiguration` function. In this case, only a connection description structure is returned. Each function receiving this structure as the `Connection` parameter will internally create a new connection and close it upon completion
|
|
||||||
|
|
||||||
When performing multiple sequential requests to an SFTP server, it is recommended to use a full connection obtained via the `OpenConnection` function
|
|
||||||
|
|
||||||
Once a connection is established, it can be used with the library's other methods to perform specific tasks
|
|
||||||
|
|
||||||
## Proxy Usage
|
|
||||||
|
|
||||||
The client supports establishing connections through a proxy server. Proxy settings can be obtained using the `GetProxySettings` function. The resulting structure must then be passed to either `OpenConnection` or `GetConnectionConfiguration` when initiating work
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
ProxyType = "http"; // http, socks5, socks4
|
|
||||||
|
|
||||||
ProxyAddress = FunctionParameters["Proxy_IP"];
|
|
||||||
ProxyPort = FunctionParameters["Proxy_Port"];
|
|
||||||
ProxyLogin = FunctionParameters["Proxy_User"];
|
|
||||||
ProxyPassword = FunctionParameters["Proxy_Password"];
|
|
||||||
|
|
||||||
ProxySettings = OPI_SFTP.GetProxySettings(ProxyAddress, ProxyPort, ProxyType, ProxyLogin, ProxyPassword);
|
|
||||||
|
|
||||||
Connection = OPI_SFTP.CreateConnection(SFTPSettings, ProxySettings);
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Support is provided for socks4, socks5, and http proxy servers
|
|
||||||
|
|
||||||
:::warning
|
|
||||||
Operation via http-proxy is experimental and may be unstable depending on the proxy server’s implementation, configuration, and capabilities. It is recommended to use socks-proxy whenever possible for stable traffic transmission
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Compatibility with the SSH Library
|
|
||||||
|
|
||||||
The SFTP and SSH libraries share a common connection format. This means that when working with SFTP, you can also execute `sh` commands by passing the existing connection object to the SSH library methods.
|
|
||||||
22
docs/en/md/Instructions/SQLite.md
vendored
22
docs/en/md/Instructions/SQLite.md
vendored
@@ -1,27 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: SQLite
|
id: SQLite
|
||||||
sidebar_class_name: SQLite
|
sidebar_class_name: SQLite
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, SQLite]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/SQLite.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/SQLite.png').default} width='64px' />
|
||||||
|
|
||||||
# SQLite
|
# SQLite
|
||||||
|
|
||||||
This section is dedicated to the SQLite database library. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">An external component is used to implement some functions in this library<br/>
|
|
||||||
Please review the ["About external components"](/docs/Start/Component-requirements) section before getting started</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## About implemented methods
|
|
||||||
|
|
||||||
This library has two parts: basic methods, like connecting and executing SQL queries, and a small ORM for common operations like CREATE, SELECT, INSERT, DELETE, and so on. Working through the ORM and through the query texts executed through the `ExecuteSQLQuery()` function is technically the same: the ORM simply generates the SQL query text based on the layouts, but then also calls them through this function
|
|
||||||
|
|
||||||
By default, all SELECT queries return an array of selected data, while other queries return only `true` in the `result` field on success, or `false` and error text in the `result` and `error` fields, respectively. To execute queries that require data to be returned but are not SELECT queries, the `ExecuteSQLQuery()` function has a `ForceResult` parameter
|
|
||||||
|
|
||||||
## "BLOB" type fields
|
|
||||||
|
|
||||||
This library can process fields of type BLOB (Binary Data). To place a value in a field of this type during INSERT or UPDATE, it can be passed either as a variable of type `BinaryData` (in 1C and OneScript) or as a structure of type `{"blob":File Path}` (in 1C, OneScript and CLI versions). Binary data is always returned as `{"blob":Base64 string}`.
|
|
||||||
62
docs/en/md/Instructions/SSH.md
vendored
62
docs/en/md/Instructions/SSH.md
vendored
@@ -1,67 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: SSH
|
id: SSH
|
||||||
sidebar_class_name: SSH
|
sidebar_class_name: SSH
|
||||||
keywords: [1C, 1C:Enterprise, 1C:Enterprise 8.3, API, Integration, Services, Data Exchange, OneScript, CLI, SSH]
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, SSH]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/SSH.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/SSH.png').default} width='64px' />
|
||||||
|
|
||||||
# SSH
|
# SSH
|
||||||
|
|
||||||
This section is dedicated to the library for working with SSH. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">An external component is used to implement some functions in this library<br/>
|
|
||||||
Please review the ["About external components"](/docs/Start/Component-requirements) section before getting started</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
|
||||||
<div class="addin">This library requires **OpenSSL 3.x** to run on Linux <br/>
|
|
||||||
Learn more: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Using OpenSSL in External Components"</a></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
This library provides various methods for working with SSH on the client side. Each method accepts a `Connection` as its first parameter, which can be initialized in one of two ways:
|
|
||||||
|
|
||||||
1. Using the `OpenConnection` function. In this case, a component object is returned that supports a single connection for multiple requests.
|
|
||||||
2. Using the `GetConnectionConfiguration` function. In this case, only a connection description structure is returned. Each function receiving this structure as the `Connection` parameter will internally create a new connection and close it upon completion
|
|
||||||
|
|
||||||
When performing multiple sequential requests to an SSH server, it is recommended to use a full connection obtained via the `OpenConnection` function
|
|
||||||
|
|
||||||
After establishing a connection, `sh` commands can be executed using the `ExecuteCommand` function.
|
|
||||||
|
|
||||||
:::important
|
|
||||||
Commands are run in `execute` mode. This means that execution context, such as changing the current working directory or setting environment variables, is not preserved between calls. To execute multiple sequential commands, they must be included in a single call to the `ExecuteCommand` function.
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Proxy Usage
|
|
||||||
|
|
||||||
The client supports establishing connections through a proxy server. Proxy settings can be obtained using the `GetProxySettings` function. The resulting structure must then be passed to either `OpenConnection` or `GetConnectionConfiguration` when initiating work
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
ProxyType = "http"; // http, socks5, socks4
|
|
||||||
|
|
||||||
ProxyAddress = FunctionParameters["Proxy_IP"];
|
|
||||||
ProxyPort = FunctionParameters["Proxy_Port"];
|
|
||||||
ProxyLogin = FunctionParameters["Proxy_User"];
|
|
||||||
ProxyPassword = FunctionParameters["Proxy_Password"];
|
|
||||||
|
|
||||||
ProxySettings = OPI_SSH.GetProxySettings(ProxyAddress, ProxyPort, ProxyType, ProxyLogin, ProxyPassword);
|
|
||||||
|
|
||||||
Connection = OPI_SSH.CreateConnection(SSHSettings, ProxySettings);
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Support is provided for socks4, socks5, and http proxy servers
|
|
||||||
|
|
||||||
:::warning
|
|
||||||
Operation via http-proxy is experimental and may be unstable depending on the proxy server’s implementation, configuration, and capabilities. It is recommended to use socks-proxy whenever possible for stable traffic transmission
|
|
||||||
:::
|
|
||||||
61
docs/en/md/Instructions/Slack.md
vendored
61
docs/en/md/Instructions/Slack.md
vendored
@@ -1,64 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: Slack
|
id: Slack
|
||||||
sidebar_class_name: Slack
|
sidebar_class_name: Slack
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Slack]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/Slack.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Slack.png').default} width='64px' />
|
||||||
|
|
||||||
# Slack
|
# Slack
|
||||||
|
|
||||||
This section is dedicated to the library for working with the Slack Web API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
1. Log in to your account and go to the **Your Apps** page on the website [Slack API](https://api.slack.com)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
2. Click **Create App** and choose **From scratch**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Select the name and workspace where you need to create the application
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
4. Create a new token by clicking Generate Token and Scopes below on the application page
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
5. Select a name and add permissions
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
6. Go to **Premission scope** page
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
7. Add the permissions required for your purposes
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
8. Install the application
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
9. Save the generated token
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
35
docs/en/md/Instructions/TCP.md
vendored
35
docs/en/md/Instructions/TCP.md
vendored
@@ -1,40 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: TCP
|
id: TCP
|
||||||
sidebar_class_name: TCP
|
sidebar_class_name: TCP
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, TCP]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/TCP.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/TCP.png').default} width='64px' />
|
||||||
|
|
||||||
# TCP (Client)
|
# TCP
|
||||||
|
|
||||||
This section is dedicated to the library for working with the TCP. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">An external component is used to implement some functions in this library<br/>
|
|
||||||
Please review the ["About external components"](/docs/Start/Component-requirements) section before getting started</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
|
||||||
<div class="addin">This library requires **OpenSSL 3.x** to run on Linux <br/>
|
|
||||||
Learn more: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Using OpenSSL in External Components"</a></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## About implemented methods
|
|
||||||
|
|
||||||
This library provides several ready-made methods for working as a TCP client. The standard scheme of interaction with the server is as follows:
|
|
||||||
|
|
||||||
1. The object is created and connected to the server using the `CreateConnection` function. The connection string in the format `<address>:<port>` is passed there.
|
|
||||||
2. If necessary, a message can be sent to the server using the `SendBinaryData` and `SendLine` functions
|
|
||||||
3. To receive data from the server, the `ReadBinaryData` and `ReadLine` functions are used. They have different parameters to limit the received data by size, token and waiting for input (timeout)
|
|
||||||
4. At the end of work it is desirable to explicitly terminate the connection using the `CloseConnection` function
|
|
||||||
|
|
||||||
For a simple scenario with standard settings, there is also the `ProcessRequest` function - it sends data to the specified address and waits for a response, finishing reading when the standard `\\n` token is found. It is also the only function that is available in the CLI version of the OPI
|
|
||||||
|
|
||||||
## TLS
|
|
||||||
|
|
||||||
The library supports TLS mode. To enable it, you must configure TLS settings using the `GetTlsSettings` function and pass them as the corresponding parameter to the `CreateConnection` or `ProcessRequest` function. If the TLS parameter is not provided when calling these functions, the connection will be initialized in an unsecured mode.
|
|
||||||
38
docs/en/md/Instructions/Telegram.md
vendored
38
docs/en/md/Instructions/Telegram.md
vendored
@@ -1,41 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: Telegram
|
id: Telegram
|
||||||
sidebar_class_name: Telegram
|
sidebar_class_name: Telegram
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Telegram]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/Telegram.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Telegram.png').default} width='64px' />
|
||||||
|
|
||||||
# Telegram
|
# Telegram
|
||||||
|
|
||||||
This section is dedicated to the library for working with Telegram API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
- Create a Telegram bot
|
|
||||||
|
|
||||||
1. All actions with the Telegram API are carried out through bots. To create a new bot, you need to start a conversation with [@BotFather](https://t.me/BotFather)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Choose */newbot* command
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. BotFather will prompt you to choose a name and a username for the bot, after which the creation process will be completed
|
|
||||||
|
|
||||||
- Save the **token** that BotFather sent you after completing the bot creation
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- (Optional) Determine the purpose of the interaction
|
|
||||||
|
|
||||||
The bot you created can now be used in two ways
|
|
||||||
|
|
||||||
- Like a chat-bot
|
|
||||||
- For automating channel management
|
|
||||||
|
|
||||||
Depending on the chosen path, the way to obtain the **ChatID** (the parameter responsible for identifying the interaction object) will differ.
|
|
||||||
|
|
||||||
In the case of a chat bot, the chat ID will be the user ID with whom the bot is conversing. If the bot is to be used for channel management, after adding it as an administrator, you can use the channel's name with @ (e.g., @MyChannel) instead of the chat ID
|
|
||||||
|
|
||||||
The token and chat ID are the primary parameters for all methods of working with the Telegram API
|
|
||||||
117
docs/en/md/Instructions/Twitter.md
vendored
117
docs/en/md/Instructions/Twitter.md
vendored
@@ -1,120 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: Twitter
|
id: Twitter
|
||||||
sidebar_class_name: Twitter
|
sidebar_class_name: Twitter
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Twitter]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/Twitter.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Twitter.png').default} width='64px' />
|
||||||
|
|
||||||
# Twitter | X
|
# Twitter
|
||||||
|
|
||||||
This section is dedicated to the library for working with Twitter API. On this page, all the steps necessary to start working are described. This library allows you to work with the functionality of the free plan, meaning you can create tweets.
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
|
|
||||||
Working with Twitter involves using two APIs - v1 (1.1) and v2, which are not separate types of actions but simply different versions of the API. Despite Twitter's preference for v2, it turned out that some mechanisms (such as the file upload mechanism) did not appear in it. Therefore, even for creating a regular tweet with an image, you need to work with both API versions, resulting in a double set of authentication data. This set is described in the function *GetStandardParameters()*
|
|
||||||
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
|
|
||||||
Parameters_.Insert("redirect_uri", "");
|
|
||||||
Parameters_.Insert("scope", "");
|
|
||||||
Parameters_.Insert("client_id", "");
|
|
||||||
Parameters_.Insert("client_secret", "");
|
|
||||||
Parameters_.Insert("access_token", "");
|
|
||||||
Parameters_.Insert("refresh_token", "");
|
|
||||||
Parameters_.Insert("oauth_token", "");
|
|
||||||
Parameters_.Insert("oauth_token_secret", "");
|
|
||||||
Parameters_.Insert("oauth_consumer_key", "");
|
|
||||||
Parameters_.Insert("oauth_consumer_secret", "");
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
You can define these parameters directly within the structure inside this function or pass them directly when calling the functions for working with the API - each of them accepts parameters as the last optional argument. When passing parameters in this way, the default parameters will be overwritten by keys. Let's consider the creation of an application and obtaining each field
|
|
||||||
|
|
||||||
|
|
||||||
### Creating an application
|
|
||||||
To work with the Twitter API, you need to go to the following address: [https://developer.twitter.com/](https://developer.twitter.com/), register, and create a new application
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### Definition of fields
|
|
||||||
After creating the application, you can fill in the necessary data in 1C
|
|
||||||
|
|
||||||
|
|
||||||
- **redirect_uri**
|
|
||||||
|
|
||||||
redirect_uri - The URL of the HTTP request handler specified during registration. Authorization for API v2 requires confirmation of login through the browser, after which a request with a special code will be sent to this handler. Further details will be provided in the section on access_token and refresh_token.
|
|
||||||
|
|
||||||
|
|
||||||
- **scope**
|
|
||||||
|
|
||||||
The scope determines the functions available for operation. In GetStandardParameters(), the scope list is defined by default.
|
|
||||||
|
|
||||||
- **client_id**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- **client_secret**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- **access_token** and **refresh_token**
|
|
||||||
|
|
||||||
These tokens need to be obtained via an HTTP request with the code that comes during authorization on the HTTP service redirect_uri. The sequence of actions is as follows:
|
|
||||||
1. Create a link for authorization in the browser using the *GetAuthorizationLink* function
|
|
||||||
2. Add to the HTTP service module (GET) a call to the *HandleIncomingRequestAfterAuthorization* function, passing the HTTP service request as a parameter.
|
|
||||||
3. Authorize in the browser using the link from step 1
|
|
||||||
3. Save the access_token and refresh_token obtained from the *HandleIncomingRequestAfterAuthorization* function in step 2 into constants or another storage
|
|
||||||
|
|
||||||
|
|
||||||
```bsl title="Obtaining"
|
|
||||||
|
|
||||||
Function Twitterget(Request)
|
|
||||||
|
|
||||||
Code = Request.RequestParameters["code"];
|
|
||||||
TokenResponse = OPI_Twitter.GetToken(Code, Parameters);
|
|
||||||
|
|
||||||
Constants.TwitterRefresh.Set(ResponseToken["refresh_token"]);
|
|
||||||
Constants.TwitterToken.Set(ResponseToken["access_token"]);
|
|
||||||
|
|
||||||
Response = New HTTPServiceResponse(200);
|
|
||||||
Return Response;
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
```bsl title="Updating"
|
|
||||||
|
|
||||||
Procedure UpdateTokenEveryTwoHours(Val Parameters)
|
|
||||||
|
|
||||||
Response = OPI_Twitter.RefreshToken(Parameters);
|
|
||||||
Constants.TwitterToken.Set(Response["access_token"]);
|
|
||||||
Constants.TwitterRefresh.Set(Response["refresh_token"]);
|
|
||||||
|
|
||||||
EndProcedure
|
|
||||||
```
|
|
||||||
|
|
||||||
Hardcoding token data is not recommended because the access_token expires after only 2 hours. Upon expiration, the token needs to be refreshed using the RefreshToken function. During this update, both the access_token and refresh_token are refreshed. Therefore, when refreshing the expired access_token token next time, the refresh_token should be from the previous request.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
- **oauth_token** and **oauth_token_secret**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- **oauth_consumer_key** and **oauth_consumer_secret**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
After filling in the data fields, you can proceed to work with the API methods
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
91
docs/en/md/Instructions/VK.md
vendored
91
docs/en/md/Instructions/VK.md
vendored
@@ -1,94 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: VK
|
id: VK
|
||||||
sidebar_class_name: VK
|
sidebar_class_name: VK
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, VK]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/VK.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/VK.png').default} width='64px' />
|
||||||
|
|
||||||
# VKontakte
|
# VK
|
||||||
|
|
||||||
This section is dedicated to the library for working with VK API. It is geared towards working with communities and performing actions on their behalf. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
To begin, you need to obtain certain parameters for the VK API.
|
|
||||||
|
|
||||||
<br/><br/>
|
|
||||||
The list of necessary data in the form of a structure is contained in the function *GetStandardParameters()*. You can specify parameter values directly within it or pass them as a structure when calling any other library methods as an optional parameter *Parameters* (the last one in all library methods). In the latter case, the standard parameters will be overwritten by the ones passed during the method call. Only the data with matching keys will be overwritten. If a parameter exists in the standard set but was not passed during the method call, it will retain its default value.
|
|
||||||
<br/><br/>
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
_Parameters = New Structure;
|
|
||||||
|
|
||||||
_Parameters.Insert("v", "5.131");
|
|
||||||
_Parameters.Insert("from_group", "1");
|
|
||||||
_Parameters.Insert("group_id", "123456789");
|
|
||||||
_Parameters.Insert("owner_id", "-123456789");
|
|
||||||
_Parameters.Insert("app_id", "87654321");
|
|
||||||
_Parameters.Insert("access_token", "vk1.a.E-byuFeG1qcN7...");
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Let's consider obtaining of each value:
|
|
||||||
|
|
||||||
**1. v**
|
|
||||||
|
|
||||||
The parameter `v` denotes the version of the VK API. Testing was conducted on version 5.131, and it is recommended to keep it as such
|
|
||||||
|
|
||||||
**2. from_group**
|
|
||||||
|
|
||||||
On behalf of the group. It should be set to 1
|
|
||||||
|
|
||||||
**3. group_id and owner_id**
|
|
||||||
|
|
||||||
Group ID. If you have a standard group URL, you can find the ID in the URL. Otherwise, it will be on the 'Manage' tab in the group, below the Address field. 'owner_id' is the same but with a '-' sign in front of it
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
**4. app_id**
|
|
||||||
|
|
||||||
app_id - Application ID. To create an application, you need to:
|
|
||||||
|
|
||||||
* Go to the https://id.vk.com/about/business/go, authorize and enter your personal or company information
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
* Enter the application name and select the **Web**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
* Enter the domain name and the URL of the redirect handler. It's worth noting that this mechanism for creating VK applications is new. Until recently, VK applications were created differently, and having a redirect URL was unnecessary. At the moment, it's not entirely clear why it's needed for our server application - VK no longer distinguishes server applications as such. Theoretically, you can enter anything there - there is no need for receiving callback data to work with the library. However, this may change over time.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
* Enter passport details or organization information, enable access to communities (in short, if you already had an application before, you're lucky, but if you don't have a Russian passport, you'll have to contact support)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
* Get app_id at the application page
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
**5. access_token**
|
|
||||||
|
|
||||||
You can obtain a link for acquiring the access token using the function *CreateTokenRetrievalLink* or manually concatenate it
|
|
||||||
|
|
||||||
https://oauth.vk.com/authorize?client_id= + *app_id* + &scope=offline,wall,groups,photos,stats,stories,ads&v=5.131&response_type=token&redirect_uri=https://api.vk.com/blank.html
|
|
||||||
|
|
||||||
* You need to follow this link in your browser
|
|
||||||
* Authorize through VK and confirm access
|
|
||||||
* Retrieve the token from the URL parameter in the address bar
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
**(Additionally) communitytoken**
|
|
||||||
|
|
||||||
Some methods, such as those for working with community chat bots, accept the parameter 'communitytoken' instead of 'access_token'. To obtain it, you need to:
|
|
||||||
|
|
||||||
* Go to the 'Manage' section in the VK group
|
|
||||||
* Find the 'API usage' tab
|
|
||||||
* Click on 'Create key' and retrieve it
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
You don't need to obtain the 'communitytoken' if you're not using such methods at the moment
|
|
||||||
44
docs/en/md/Instructions/VKTeams.md
vendored
44
docs/en/md/Instructions/VKTeams.md
vendored
@@ -1,47 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: VKTeams
|
id: VKTeams
|
||||||
sidebar_class_name: VKTeams
|
sidebar_class_name: VKTeams
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, VKTeams]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/VKTeams.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/VKTeams.png').default} width='64px' />
|
||||||
|
|
||||||
# VK Teams
|
# VKTeams
|
||||||
|
|
||||||
This section is dedicated to the library for working with VK Teams API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
1. Register, book a tariff and download the VK Teams app [on the home page](https://biz.mail.ru/teams)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Log in to the application using the one-time password that should arrive in the mail. You can view the mail of the required user in the administration panel
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Start a dialog with [@metabot](http://teams.vk.com/profile/70001) and follow the procedure to create a new bot
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Generate a new **token** and enable the ability to add the bot to a group (if necessary)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Save the bot ID by retrieving it using the "Show My Bots" button
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
6. Form a link and click on it in your browser
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
At the end of the URL should be your bot ID
|
|
||||||
https://teams.vk.com/profile/1234567890
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
7. Start a dialog with the bot
|
|
||||||
|
|
||||||
Now you will be able to add a bot to groups and control it with **Token** and **ID of the desired dialog** (group or user)
|
|
||||||
|
|
||||||

|
|
||||||
60
docs/en/md/Instructions/Viber.md
vendored
60
docs/en/md/Instructions/Viber.md
vendored
@@ -1,63 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: Viber
|
id: Viber
|
||||||
sidebar_class_name: Viber
|
sidebar_class_name: Viber
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Viber]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/Viber.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Viber.png').default} width='64px' />
|
||||||
|
|
||||||
# Viber
|
# Viber
|
||||||
|
|
||||||
This section is dedicated to the library for working with Viber API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
:::warning
|
|
||||||
Starting from February 5, 2024, this method of creating bots is no longer valid: Rakuten has canceled the ability to create bots for free, and now working with the API requires verification under a commercial model. More details [here](https://help.viber.com/hc/en-us/articles/15247629658525-Bot-commercial-model)
|
|
||||||
:::
|
|
||||||
|
|
||||||
:::caution
|
|
||||||
The methods of this library have not been tested since 10.01.2025
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
For Viber, there are two REST APIs: one for working with channels and the other for chatbots. In both cases, the main parameters are **Token** and **UserID**
|
|
||||||
|
|
||||||
- If you need to manage a channel:
|
|
||||||
1. Open the Viber app and create a new channel
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. After creation, go to the channel settings -> For developers, and copy the **Token**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Set webhook (see Set webhook)
|
|
||||||
4. **UserID** - your ID (channel administrator). See Get Channel Information for details
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
- If you need a chatbot:
|
|
||||||
1. Go to the link [https://partners.viber.com/account/create-bot-account](https://partners.viber.com/account/create-bot-account) and authorize yourself with your phone number linked to Viber
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Select the option to create a new bot
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. In the bot creation menu, fill in all the required fields
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Copy the **Token**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. To find your new bot, you can scan the QR code on the creation page or in the settings (chat bots section) within the Viber app.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. You cannot start a conversation with the bot right now. First, you need to set up a webhook. See Set Webhook
|
|
||||||
6. After launch, the **User ID** will be the ID of the specific person engaging with the bot. You can obtain it from processing incoming messages via Webhook
|
|
||||||
|
|
||||||
|
|
||||||
**Important**: The ID of the same user in chat and channel is different. You cannot use the ID obtained from a message to the bot to invoke channel management methods and vice versa
|
|
||||||
59
docs/en/md/Instructions/YandexDisk.md
vendored
59
docs/en/md/Instructions/YandexDisk.md
vendored
@@ -1,62 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: YandexDisk
|
id: YandexDisk
|
||||||
sidebar_class_name: YandexDisk
|
sidebar_class_name: YandexDisk
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, YandexDisk]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/YandexDisk.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/YandexDisk.png').default} width='64px' />
|
||||||
|
|
||||||
# Yandex Disk
|
# YandexDisk
|
||||||
|
|
||||||
This section is dedicated to the library for working with Yandex Disk API. On this page, all the steps necessary to start working are described
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
To start working, you need to obtain an access token for the disk:
|
|
||||||
|
|
||||||
1. Go to [app creation page](https://oauth.yandex.ru/client/new/)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Enter the service name, select *Web services* as the platform. You can specify any *Redirect URI* or select the Insert debugging URL option - it will not be needed for working with the library.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. In the **Data Access** field, add permissions as shown in the screenshot below, then click **Create Application**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Save **ClientID** and **ClientSecret** from the application page
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Call the function *OPI_YandexID.GetConfirmationCode()*, passing ClientID as a parameter. It will return a response from the Yandex server, which will contain the fields:
|
|
||||||
- **user_code** - you will need to enter in the browser
|
|
||||||
- **device_code** - you will need to pass to another function
|
|
||||||
- **verification_url** - the URL that needs to be opened in the browser
|
|
||||||
<br/>
|
|
||||||
```json title="The result of the function GetConfirmationCode(), if convert it to JSON"
|
|
||||||
{
|
|
||||||
"verification_url": "https://ya.ru/device",
|
|
||||||
"user_code": "gjehyruw",
|
|
||||||
"interval": 5,
|
|
||||||
"expires_in": 300,
|
|
||||||
"device_code": "12207cafec1b40ad8d0052af3faf0d12"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
6. Open the URL from **verification_url** in the browser. Most likely, it will be https://ya.ru/device. In the field that appears, enter the **user_code** from step 5
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
7. After entering the code in step 6, call the function *OPI_YandexID.ConvertCodeToToken()*, passing **ClientID** and **ClientSecret** from step 4, as well as **device_code** from step 5. Save the obtained **access_token** and **refresh_token**
|
|
||||||
|
|
||||||
```json title="The result of the function ConvertCodeToToken(), if convert it to JSON"
|
|
||||||
{
|
|
||||||
"token_type": "bearer",
|
|
||||||
"refresh_token": "1:Tj6nD2vgE2L8jwSm:YgWjQXPv6_y3e07GW70ig2AOyEXoRVsKKpApGHq2EOg7pfx0MKrXiCrfLBFtzgQawdawdwadad3Sasa9z2H0vSeZKNmZmA",
|
|
||||||
"expires_in": 31535956,
|
|
||||||
"access_token": "y0_AgAAAABWxxdkAAs0QgAAAAD59cawdawdwadadVKIiwGK__crw"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**access_token** is used in all other functions of the library, and with the help of **refresh_token**, it can be refreshed when its lifespan is nearing the end (using the function *RefreshToken()*)
|
|
||||||
36
docs/en/md/MongoDB/Collection-management/Create-collection.mdx
vendored
Normal file
36
docs/en/md/MongoDB/Collection-management/Create-collection.mdx
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 1
|
||||||
|
description: Create collection and other functions to work with MongoDB in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, MongoDB]
|
||||||
|
---
|
||||||
|
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# Create collection
|
||||||
|
Creates a new collection with the specified parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`Function CreateCollection(Val Connection, Val Name, Val Base = Undefined, Val Parameters = Undefined) Export`
|
||||||
|
|
||||||
|
| Parameter | CLI option | Type | Required | Description |
|
||||||
|
|-|-|-|-|-|
|
||||||
|
| Connection | --dbc | String, Arbitrary | ✔ | Connection or connection string |
|
||||||
|
| Name | --name | String | ✔ | Collection name |
|
||||||
|
| Base | --db | String | ✖ | Database name. Current database if not specified |
|
||||||
|
| Parameters | --params | Structure Of KeyAndValue | ✖ | Additional creation parameters |
|
||||||
|
|
||||||
|
|
||||||
|
Returns: Map Of KeyAndValue - Operation result
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
35
docs/en/md/MongoDB/Collection-management/Delete-collection.mdx
vendored
Normal file
35
docs/en/md/MongoDB/Collection-management/Delete-collection.mdx
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 2
|
||||||
|
description: Delete collection and other functions to work with MongoDB in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, MongoDB]
|
||||||
|
---
|
||||||
|
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# Delete collection
|
||||||
|
Deletes the selected database collection
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`Function DeleteCollection(Val Connection, Val Collection, Val Base = Undefined) Export`
|
||||||
|
|
||||||
|
| Parameter | CLI option | Type | Required | Description |
|
||||||
|
|-|-|-|-|-|
|
||||||
|
| Connection | --dbc | String, Arbitrary | ✔ | Connection or connection string |
|
||||||
|
| Collection | --coll | String | ✔ | Collection name |
|
||||||
|
| Base | --db | String | ✖ | Database name. Current database if not specified |
|
||||||
|
|
||||||
|
|
||||||
|
Returns: Map Of KeyAndValue - Operation result
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
4
docs/en/md/MongoDB/Collection-management/_category_.json
vendored
Normal file
4
docs/en/md/MongoDB/Collection-management/_category_.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"label": "Collection management",
|
||||||
|
"position": "4"
|
||||||
|
}
|
||||||
42
docs/en/md/MongoDB/Common-methods/Execute-command.mdx
vendored
Normal file
42
docs/en/md/MongoDB/Common-methods/Execute-command.mdx
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 5
|
||||||
|
description: Execute command and other functions to work with MongoDB in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, MongoDB]
|
||||||
|
---
|
||||||
|
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# Execute command
|
||||||
|
Executes the command according to its description
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`Function ExecuteCommand(Val Connection, Val Command, Val Argument = 1, Val Base = Undefined, Val Data = Undefined) Export`
|
||||||
|
|
||||||
|
| Parameter | CLI option | Type | Required | Description |
|
||||||
|
|-|-|-|-|-|
|
||||||
|
| Connection | --dbc | String, Arbitrary | ✔ | Connection or connection string |
|
||||||
|
| Command | --comm | String | ✔ | Command name to execute |
|
||||||
|
| Argument | --arg | Arbitrary | ✖ | Command argument |
|
||||||
|
| Base | --db | String | ✖ | Database in which the operation needs to be performed |
|
||||||
|
| Data | --data | Structure Of KeyAndValue | ✖ | Main data fields for performing the operation |
|
||||||
|
|
||||||
|
|
||||||
|
Returns: Map Of KeyAndValue - Operation result
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```bsl title="1C:Enterprise/OneScript code example"
|
||||||
|
Address = "127.0.0.1:1234";
|
||||||
|
Login = "bayselonarrend";
|
||||||
|
Password = "12we...";
|
||||||
|
Base = "main";
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -34,6 +34,9 @@ import TabItem from '@theme/TabItem';
|
|||||||
Login = "bayselonarrend";
|
Login = "bayselonarrend";
|
||||||
Password = "12we...";
|
Password = "12we...";
|
||||||
Base = "main";
|
Base = "main";
|
||||||
|
|
||||||
|
ConnectionParams = New Structure("authSource", "admin");
|
||||||
|
Result = OPI_MongoDB.GenerateConnectionString(Address, Base, Login, Password, ConnectionParams);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
34
docs/en/md/MongoDB/Working-with-databases/Delete-database.mdx
vendored
Normal file
34
docs/en/md/MongoDB/Working-with-databases/Delete-database.mdx
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 3
|
||||||
|
description: Drop database and other functions to work with MongoDB in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, MongoDB]
|
||||||
|
---
|
||||||
|
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# Drop database
|
||||||
|
Deletes the database
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`Function DeleteDatabase(Val Connection, Val Base = Undefined) Export`
|
||||||
|
|
||||||
|
| Parameter | CLI option | Type | Required | Description |
|
||||||
|
|-|-|-|-|-|
|
||||||
|
| Connection | --dbc | String, Arbitrary | ✔ | Connection or connection string |
|
||||||
|
| Base | --db | String | ✖ | Database name. Current database if not specified |
|
||||||
|
|
||||||
|
|
||||||
|
Returns: Map Of KeyAndValue - Operation result
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
39
docs/en/md/MongoDB/Working-with-databases/Get-database.mdx
vendored
Normal file
39
docs/en/md/MongoDB/Working-with-databases/Get-database.mdx
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 2
|
||||||
|
description: Get database and other functions to work with MongoDB in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, MongoDB]
|
||||||
|
---
|
||||||
|
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# Get database
|
||||||
|
Gets information about the database
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`Function GetDatabase(Val Connection, Val Base = Undefined) Export`
|
||||||
|
|
||||||
|
| Parameter | CLI option | Type | Required | Description |
|
||||||
|
|-|-|-|-|-|
|
||||||
|
| Connection | --dbc | String, Arbitrary | ✔ | Connection or connection string |
|
||||||
|
| Base | --db | String | ✖ | Database name. Current database if not specified |
|
||||||
|
|
||||||
|
|
||||||
|
Returns: Map Of KeyAndValue - Operation result
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```bsl title="1C:Enterprise/OneScript code example"
|
||||||
|
Address = "127.0.0.1:1234";
|
||||||
|
Login = "bayselonarrend";
|
||||||
|
Password = "12we...";
|
||||||
|
Base = "main";
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
33
docs/en/md/MongoDB/Working-with-databases/Get-list-of-bases.mdx
vendored
Normal file
33
docs/en/md/MongoDB/Working-with-databases/Get-list-of-bases.mdx
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 1
|
||||||
|
description: Get list of bases and other functions to work with MongoDB in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
||||||
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, MongoDB]
|
||||||
|
---
|
||||||
|
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# Get list of bases
|
||||||
|
Gets the list of databases
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`Function GetListOfBases(Val Connection) Export`
|
||||||
|
|
||||||
|
| Parameter | CLI option | Type | Required | Description |
|
||||||
|
|-|-|-|-|-|
|
||||||
|
| Connection | --dbc | String, Arbitrary | ✔ | Connection or connection string |
|
||||||
|
|
||||||
|
|
||||||
|
Returns: Map Of KeyAndValue - Operation result
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
4
docs/en/md/MongoDB/Working-with-databases/_category_.json
vendored
Normal file
4
docs/en/md/MongoDB/Working-with-databases/_category_.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"label": "Working with databases",
|
||||||
|
"position": "3"
|
||||||
|
}
|
||||||
1
docs/ru/data/MongoDB/ВыполнитьКоманду.json
vendored
Normal file
1
docs/ru/data/MongoDB/ВыполнитьКоманду.json
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"Логин":"bayselonarrend","Пароль":"12we...","База":"main"}
|
||||||
1
docs/ru/data/MongoDB/ПолучитьБазуДанных.json
vendored
Normal file
1
docs/ru/data/MongoDB/ПолучитьБазуДанных.json
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"Логин":"bayselonarrend","Пароль":"12we...","База":"main"}
|
||||||
4
docs/ru/examples/MongoDB/ВыполнитьКоманду.txt
vendored
Normal file
4
docs/ru/examples/MongoDB/ВыполнитьКоманду.txt
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Адрес = "127.0.0.1:1234";
|
||||||
|
Логин = "bayselonarrend";
|
||||||
|
Пароль = "12we...";
|
||||||
|
База = "main";
|
||||||
4
docs/ru/examples/MongoDB/ПолучитьБазуДанных.txt
vendored
Normal file
4
docs/ru/examples/MongoDB/ПолучитьБазуДанных.txt
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Адрес = "127.0.0.1:1234";
|
||||||
|
Логин = "bayselonarrend";
|
||||||
|
Пароль = "12we...";
|
||||||
|
База = "main";
|
||||||
@@ -2,3 +2,6 @@
|
|||||||
Логин = "bayselonarrend";
|
Логин = "bayselonarrend";
|
||||||
Пароль = "12we...";
|
Пароль = "12we...";
|
||||||
База = "main";
|
База = "main";
|
||||||
|
|
||||||
|
ПараметрыПодключения = Новый Структура("authSource", "admin");
|
||||||
|
Результат = OPI_MongoDB.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль, ПараметрыПодключения);
|
||||||
|
|||||||
18
docs/ru/md/Instructions/Airtable.md
vendored
18
docs/ru/md/Instructions/Airtable.md
vendored
@@ -6,20 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/Airtable.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Airtable.png').default} width='64px' />
|
||||||
|
|
||||||
# Airtable
|
# Airtable
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с Airtable API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
1. Авторизуйтесь в Airtable и перейдите **[на страницу создания персональных токенов](https://airtable.com/create/tokens)**, нажмите **Create new token**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Введите название для нового токена, выберите из перечня необходимые **Scopes** (разрешения) и **Access** (базы и рабочие пространства, к которым у токена будет доступ)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Скопируйте новый **токен**
|
|
||||||
|
|
||||||

|
|
||||||
56
docs/ru/md/Instructions/Bitrix24.md
vendored
56
docs/ru/md/Instructions/Bitrix24.md
vendored
@@ -6,58 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/Bitrix24.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Bitrix24.png').default} width='64px' />
|
||||||
|
|
||||||
# Bitrix24
|
# Bitrix24
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с Bitrix24 API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
Работать с Bitrix24 через API можно двумя способами: через **Webhook** и через **локальное приложение**. Для обоих вариантов необходимо:
|
|
||||||
|
|
||||||
1. Перейти в подраздел **Разработчикам** в разделе **Приложения** боковой панели
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Выбрать пункт **Другое**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/><br/>
|
|
||||||
|
|
||||||
### Для работы через Webhook
|
|
||||||
|
|
||||||
1. Выберите пункт **Входящий вебхук**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Заполните необходимые разрешения в **Настройках прав** и сохраните URL вебхука. Он будет использоваться для выполнения методов библиотеки как параметр **URL**. Необязательный параметр **Токен** в данном случае будет всегда оставаться пустым
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/><br/>
|
|
||||||
|
|
||||||
## Для работы через Локальное приложение
|
|
||||||
|
|
||||||
1. Выберите пункт **Локальное приложение**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Выберите путь обработчика (если приложение не подразумевает авторизацию других пользователей, но только управление Bitrix через один аккаунт администратора, то можно выбрать любой адрес, например https://localhost), поставьте галочку **Использует только API** (если необходим только функционал вызова методов библиотеки) и заполните необходимые права
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Сохраните **ключ** и **код** приложения
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. При помощи ключа приложения вызовите функцию **ПолучитьСсылкуАвторизацииПриложения** и перейдите по полученной ссылке в браузере. После авторизации, скопируйте полученный код из адресной строки (или получите его на обработчик, адрес которого был указан в пункте 2)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Передайте полученный код, вместе с ключом и секретом приложения, в функцию **ПолучитьТокен**. Сохраните полученные **access** и **refresh токены**
|
|
||||||
|
|
||||||
6. Время жизни токенов ограничено. Для получение нового токена можно воспользоваться функцией **ОбновитьТокен**, передав туда refresh токен, ключ и секрет приложения. При обновлении создается не только новый access токен, но и refresh токен тоже
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
15
docs/ru/md/Instructions/CDEK.md
vendored
15
docs/ru/md/Instructions/CDEK.md
vendored
@@ -6,17 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/CDEK.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/CDEK.png').default} width='64px' />
|
||||||
|
|
||||||
# CDEK
|
# CDEK
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с CDEK API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
1. Оформите договор со СДЭК или используйте тестовые учетные данные для начала работы. Подробнее [на странице документации](https://api-docs.cdek.ru/29923849.html)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Используйте полученные **Account** и **Secure password** для создания Токена при помощи метода *ПолучитьТокен()*
|
|
||||||
|
|
||||||
|
|
||||||
**Токен** существует ограниченное время, в течении которого может быть использован в вызовах других методов библиотеки. После истечения срока его существовании, получить новый можно снова передав Account и Secure password в метод *ПолучитьТокен()*
|
|
||||||
34
docs/ru/md/Instructions/Dropbox.md
vendored
34
docs/ru/md/Instructions/Dropbox.md
vendored
@@ -6,36 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/Dropbox.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Dropbox.png').default} width='64px' />
|
||||||
|
|
||||||
# Dropbox
|
# Dropbox
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с Dropbox API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
1. Войдите в свой аккаунт на сайте [Dropbox Developers](https://www.dropbox.com/developers)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
1. Перейдите к **App Console**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Нажмите **Create app**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Введите имя нового приложения и выберите **Full Dropbox**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. После создания, на странице приложения нажмите **Scoped app** и выберите разрешения, которые необходимы для решения ваших задач. Сохраните **AppKey** и **AppSecret**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
6. Получите ссылку авторизации при помощи функции *ПолучитьСсылкуАвторизации(Знач КлючПриложения)* и перейдите по ней в браузере
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
7. Передайте **полученный код**, **AppKey** и **AppSecret** в функцию *ПолучитьТокен(Знач КлючПриложения, Знач СекретПриложения, Знач Код)*, сохраните полученные **access_token** и **refresh_token**
|
|
||||||
|
|
||||||
8. По истечении времени жизни access_token, его можно обновить при помощи функции *ОбновитьТокен(Знач КлючПриложения, Знач СекретПриложения, Знач РефрешТокен)*
|
|
||||||
62
docs/ru/md/Instructions/FTP.md
vendored
62
docs/ru/md/Instructions/FTP.md
vendored
@@ -1,67 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: FTP
|
id: FTP
|
||||||
sidebar_class_name: FTP
|
sidebar_class_name: FTP
|
||||||
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, FTP, FTPS]
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, FTP]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/FTP.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/FTP.png').default} width='64px' />
|
||||||
|
|
||||||
# FTP(s)
|
# FTP
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с протоколом FTP(s) в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для реализации некоторых функции в этой библиотеке используется внешняя компонента <br/>
|
|
||||||
Пожалуйста, ознакомьтесь с разделом ["О внешних компонентах"](/docs/Start/Component-requirements) перед началом работы</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
Данная библиотека предоставляет различные методы работы с FTP(s) на стороне клиента. Каждый из них принимает в качестве первого параметра `Соединение`, значение которого может быть получено одним из двух способов:
|
|
||||||
|
|
||||||
1. При помощи функции `ОткрытьСоединение`. В этом случае возвращается объект компоненты, поддерживающий единое соединение для множества запросов
|
|
||||||
2. При помощи функции `ПолучитьКонфигурациюСоединения`. В этом случае возвращается лишь структура описания соединения. Каждая функция, в которую эта структура будет передана в качестве `Соединения`, будет создавать новое подключение внутри себя и закрывать его по окончании работы
|
|
||||||
|
|
||||||
При выполнении множественных последовательных запросов к серверу FTP рекомендуется использовать полноценное соединение, получаемое при помощи функции `ОткрытьСоединение`
|
|
||||||
|
|
||||||
## Использование прокси
|
|
||||||
|
|
||||||
Данный клиент поддерживает создание соединения через прокси сервер. Получить структуру настроек прокси можно при помощи функции `ПолучитьНастройкиПрокси`. Полученная структура, далее, должна быть передана в функцию `ОткрытьСоединение` или `ПолучитьКонфигурациюСоединения` при начале работы
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
ТипПрокси = "http"; // http, socks5, socks4
|
|
||||||
|
|
||||||
АдресПрокси = "127.0.0.1";
|
|
||||||
ПортПрокси = "8071";
|
|
||||||
ЛогинПрокси = "proxyuser";
|
|
||||||
ПарольПрокси = "12we...";
|
|
||||||
|
|
||||||
НастройкиПрокси = OPI_FTP.ПолучитьНастройкиПрокси(АдресПрокси, ПортПрокси, ТипПрокси, ЛогинПрокси, ПарольПрокси);
|
|
||||||
|
|
||||||
Соединение = OPI_FTP.ОткрытьСоединение(НастройкиFTP, НастройкиПрокси, НастройкиTLS);
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Поддерживается работа через SOCKS4, SOCKS5 и HTTP-прокси серверы
|
|
||||||
|
|
||||||
:::warning
|
|
||||||
Работа через http-прокси является экспериментальной и может быть нестабильной в зависимости от реализации прокси-сервера, его настроек и возможностей. Рекомендуется по возможности использовать SOCKS-прокси для стабильной передачи трафика
|
|
||||||
:::
|
|
||||||
|
|
||||||
## FTPS (TLS)
|
|
||||||
|
|
||||||
Также клиент поддерживает защищенное соединение через FTPS (FTP over TLS). Для его включения необходимо передать структуру настроек в функцию `ОткрытьСоединение` или `ПолучитьКонфигурациюСоединения` при начале работы. Структура настроек может быть получена при помощи функции `ПолучитьНастройкиTls`
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
НастройкиTLS = OPI_FTP.ПолучитьНастройкиTLS(Истина);
|
|
||||||
Соединение = OPI_FTP.ОткрытьСоединение(НастройкиFTP, НастройкиПрокси, НастройкиTLS);
|
|
||||||
|
|
||||||
```
|
|
||||||
98
docs/ru/md/Instructions/GoogleCalendar.md
vendored
98
docs/ru/md/Instructions/GoogleCalendar.md
vendored
@@ -1,103 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: GoogleCalendar
|
id: GoogleCalendar
|
||||||
sidebar_class_name: GoogleCalendar
|
sidebar_class_name: GoogleCalendar
|
||||||
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, Google Calendar]
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, GoogleCalendar]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/GoogleCalendar.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/GoogleCalendar.png').default} width='64px' />
|
||||||
|
|
||||||
# Google Календарь
|
# GoogleCalendar
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с API Google Calendar в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
:::important
|
|
||||||
Если вы уже используете ОПИ для работы с другими сервисами Google Workspaсe и выполняли стартовую настройку, то пункты **Создание проекта** и **Настройка OAuth** можно пропустить. Необходимо лишь **включить сервис Google Drive** в своем проекте и **заново получить токен** (последние два пункта инструкции).
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Создание проекта
|
|
||||||
|
|
||||||
1. Перейдите на [главную страницу Google Cloud](https://console.cloud.google.com) и создайте проект
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Выберите созданный проект и в боковом меню перейдите APIs and Services -> OAuth consent screen
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Выберите пункт External
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Заполните поля App name, User support email и Email addresses (все поля со звездочками)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Нажимайте далее и Save and continue на последней вкладке
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
6. Нажмите Publish App
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Настройка OAuth
|
|
||||||
|
|
||||||
1. В боковом меню выберите пункт Credentials -> Create Credentials -> OAuth client ID
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Введите имя и выберите Application type - Desktop app
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Сохраните ClientID и Client Secret
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Включение сервиса Google Calendar
|
|
||||||
|
|
||||||
1. Перейдите на [страницу Календаря в Marketplace](https://console.cloud.google.com/marketplace/product/google/calendar-json.googleapis.com)
|
|
||||||
|
|
||||||
2. Нажмите Enable
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Получение Токена
|
|
||||||
|
|
||||||
1. Передайте ClientID в функцию OPI_GoogleWorkspace.СформироватьСсылкуПолученияКода() с булево параметрами используемых вами сервисов. Результатом функции будет URL, который необходимо открыть в браузере. Авторизуйтесь при помощи своего аккаунта Google
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Скопируйте код из URL после авторизации
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
:::important
|
|
||||||
**Время жизни кода крайне мало.** После его получения нужно выполнить шаг 3 максимально быстро. Лучше всего заранее подготовить обработку с полем для ввода и кнопкой (в 1С), либо же использовать CLI версию ОПИ. В случае истечения срока жизни кода до выполнения пункта 3, будет получена ошибка `invalid_grant`
|
|
||||||
:::
|
|
||||||
|
|
||||||
3. Используйте полученный код, ClientID и Client Secret для вызова функции OPI_GoogleWorkspace.ПолучитьТокенПоКоду(ClientID, ClientSecret, Code)
|
|
||||||
|
|
||||||
```json title="Результат функции ПолучитьТокенПоКоду(), если перевести его в JSON"
|
|
||||||
|
|
||||||
{
|
|
||||||
"token_type": "Bearer",
|
|
||||||
"refresh_token": "1//09au6OES3JN9oCgYIARAAGAkSNwF-L9Ir1B7uawfwafT1wE0FKO519Xj6JxawfawfyjMyJ_QlUZYLHZqw",
|
|
||||||
"scope": "https://www.googleapis.com/auth/calendar",
|
|
||||||
"expires_in": 3599,
|
|
||||||
"access_token": "ya29.a0AfB_byA344tXkIawdawdwadadhyZQV8bSZn_snNXtY2HLb7l71awdawdawdad-ASgpzyOSWIvEmPruhUa_1yCCq6jvoD0r_q-fNEsARrH8zpJ3c6LNGWvwdg8CXsSxYaCgYKAWkSawfwafawfrCK0EP5kZY_A0171"
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Используйте **access_token** для передачи в качестве параметра Токен при вызове функций библиотеки, а refresh_token - для получения нового access_token (функция OPI_GoogleWorkspace.ОбновитьТокен(ClientID, ClientSecret, RefreshToken)), когда время жизни старого истечет. При обновлении токена refresh_token не обновляется - вы можете использовать его один и тот же для получения нового access_token каждый раз.
|
|
||||||
98
docs/ru/md/Instructions/GoogleDrive.md
vendored
98
docs/ru/md/Instructions/GoogleDrive.md
vendored
@@ -1,103 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: GoogleDrive
|
id: GoogleDrive
|
||||||
sidebar_class_name: GoogleDrive
|
sidebar_class_name: GoogleDrive
|
||||||
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, Google Drive]
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, GoogleDrive]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/GoogleDrive.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/GoogleDrive.png').default} width='64px' />
|
||||||
|
|
||||||
# Google Drive
|
# GoogleDrive
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с API Google Drive в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
:::important
|
|
||||||
Если вы уже используете ОПИ для работы с другими сервисами Google Workspaсe и выполняли стартовую настройку, то пункты **Создание проекта** и **Настройка OAuth** можно пропустить. Необходимо лишь **включить сервис Google Drive** в своем проекте и **заново получить токен** (последние два пункта инструкции).
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Создание проекта
|
|
||||||
|
|
||||||
1. Перейдите на [главную страницу Google Cloud](https://console.cloud.google.com) и создайте проект
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Выберите созданный проект и в боковом меню перейдите APIs and Services -> OAuth consent screen
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Выберите пункт External
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Заполните поля App name, User support email и Email addresses (все поля со звездочками)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Нажимайте далее и Save and continue на последней вкладке
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
6. Нажмите Publish App
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Настройка OAuth
|
|
||||||
|
|
||||||
1. В боковом меню выберите пункт Credentials -> Create Credentials -> OAuth client ID
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Введите имя и выберите Application type - Desktop app
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Сохраните ClientID и Client Secret
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Включение сервиса Google Drive
|
|
||||||
|
|
||||||
1. Перейдите на [страницу Drive в Marketplace](https://console.cloud.google.com/marketplace/product/google/drive.googleapis.com)
|
|
||||||
|
|
||||||
2. Нажмите Enable
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Получение Токена
|
|
||||||
|
|
||||||
1. Передайте ClientID в функцию OPI_GoogleWorkspace.СформироватьСсылкуПолученияКода() с булево параметрами используемых вами сервисов. Результатом функции будет URL, который необходимо открыть в браузере. Авторизуйтесь при помощи своего аккаунта Google
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Скопируйте код из URL после авторизации
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
:::important
|
|
||||||
**Время жизни кода крайне мало.** После его получения нужно выполнить шаг 3 максимально быстро. Лучше всего заранее подготовить обработку с полем для ввода и кнопкой (в 1С), либо же использовать CLI версию ОПИ. В случае истечения срока жизни кода до выполнения пункта 3, будет получена ошибка `invalid_grant`
|
|
||||||
:::
|
|
||||||
|
|
||||||
3. Используйте полученный код, ClientID и Client Secret для вызова функции OPI_GoogleWorkspace.ПолучитьТокенПоКоду(ClientID, ClientSecret, Code)
|
|
||||||
|
|
||||||
```json title="Результат функции ПолучитьТокенПоКоду(), если перевести его в JSON"
|
|
||||||
|
|
||||||
{
|
|
||||||
"token_type": "Bearer",
|
|
||||||
"refresh_token": "1//09au6OES3JN9oCgYIARAAGAkSNwF-L9Ir1B7uawfwafT1wE0FKO519Xj6JxawfawfyjMyJ_QlUZYLHZqw",
|
|
||||||
"scope": "https://www.googleapis.com/auth/...",
|
|
||||||
"expires_in": 3599,
|
|
||||||
"access_token": "ya29.a0AfB_byA344tXkIawdawdwadadhyZQV8bSZn_snNXtY2HLb7l71awdawdawdad-ASgpzyOSWIvEmPruhUa_1yCCq6jvoD0r_q-fNEsARrH8zpJ3c6LNGWvwdg8CXsSxYaCgYKAWkSawfwafawfrCK0EP5kZY_A0171"
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Используйте **access_token** для передачи в качестве параметра Токен при вызове функций библиотеки, а refresh_token - для получения нового access_token (функция OPI_GoogleWorkspace.ОбновитьТокен(ClientID, ClientSecret, RefreshToken)), когда время жизни старого истечет. При обновлении токена refresh_token не обновляется - вы можете использовать его один и тот же для получения нового access_token каждый раз.
|
|
||||||
98
docs/ru/md/Instructions/GoogleSheets.md
vendored
98
docs/ru/md/Instructions/GoogleSheets.md
vendored
@@ -1,103 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: GoogleSheets
|
id: GoogleSheets
|
||||||
sidebar_class_name: GoogleSheets
|
sidebar_class_name: GoogleSheets
|
||||||
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, Google Sheets]
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, GoogleSheets]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/GoogleSheets.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/GoogleSheets.png').default} width='64px' />
|
||||||
|
|
||||||
# Google Sheets
|
# GoogleSheets
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с API Google Sheets в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
:::important
|
|
||||||
Если вы уже используете ОПИ для работы с другими сервисами Google Workspaсe и выполняли стартовую настройку, то пункты **Создание проекта** и **Настройка OAuth** можно пропустить. Необходимо лишь **включить сервис Google Sheets** в своем проекте и **заново получить токен** (последние два пункта инструкции).
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Создание проекта
|
|
||||||
|
|
||||||
1. Перейдите на [главную страницу Google Cloud](https://console.cloud.google.com) и создайте проект
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Выберите созданный проект и в боковом меню перейдите APIs and Services -> OAuth consent screen
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Выберите пункт External
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Заполните поля App name, User support email и Email addresses (все поля со звездочками)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Нажимайте далее и Save and continue на последней вкладке
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
6. Нажмите Publish App
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Настройка OAuth
|
|
||||||
|
|
||||||
1. В боковом меню выберите пункт Credentials -> Create Credentials -> OAuth client ID
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Введите имя и выберите Application type - Desktop app
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Сохраните ClientID и Client Secret
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Включение сервиса Google Sheets
|
|
||||||
|
|
||||||
1. Перейдите на [страницу Sheets в Marketplace](https://console.cloud.google.com/marketplace/product/google/sheets.googleapis.com)
|
|
||||||
|
|
||||||
2. Нажмите Enable
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
### Получение Токена
|
|
||||||
|
|
||||||
1. Передайте ClientID в функцию OPI_GoogleWorkspace.СформироватьСсылкуПолученияКода() с булево параметрами используемых вами сервисов. Результатом функции будет URL, который необходимо открыть в браузере. Авторизуйтесь при помощи своего аккаунта Google
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Скопируйте код из URL после авторизации
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
:::important
|
|
||||||
**Время жизни кода крайне мало.** После его получения нужно выполнить шаг 3 максимально быстро. Лучше всего заранее подготовить обработку с полем для ввода и кнопкой (в 1С), либо же использовать CLI версию ОПИ. В случае истечения срока жизни кода до выполнения пункта 3, будет получена ошибка `invalid_grant`
|
|
||||||
:::
|
|
||||||
|
|
||||||
3. Используйте полученный код, ClientID и Client Secret для вызова функции OPI_GoogleWorkspace.ПолучитьТокенПоКоду(ClientID, ClientSecret, Code)
|
|
||||||
|
|
||||||
```json title="Результат функции ПолучитьТокенПоКоду(), если перевести его в JSON"
|
|
||||||
|
|
||||||
{
|
|
||||||
"token_type": "Bearer",
|
|
||||||
"refresh_token": "1//09au6OES3JN9oCgYIARAAGAkSNwF-L9Ir1B7uawfwafT1wE0FKO519Xj6JxawfawfyjMyJ_QlUZYLHZqw",
|
|
||||||
"scope": "https://www.googleapis.com/auth/...",
|
|
||||||
"expires_in": 3599,
|
|
||||||
"access_token": "ya29.a0AfB_byA344tXkIawdawdwadadhyZQV8bSZn_snNXtY2HLb7l71awdawdawdad-ASgpzyOSWIvEmPruhUa_1yCCq6jvoD0r_q-fNEsARrH8zpJ3c6LNGWvwdg8CXsSxYaCgYKAWkSawfwafawfrCK0EP5kZY_A0171"
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Используйте **access_token** для передачи в качестве параметра Токен при вызове функций библиотеки, а refresh_token - для получения нового access_token (функция OPI_GoogleWorkspace.ОбновитьТокен(ClientID, ClientSecret, RefreshToken)), когда время жизни старого истечет. При обновлении токена refresh_token не обновляется - вы можете использовать его один и тот же для получения нового access_token каждый раз.
|
|
||||||
34
docs/ru/md/Instructions/GreenAPI.md
vendored
34
docs/ru/md/Instructions/GreenAPI.md
vendored
@@ -6,36 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/GreenAPI.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/GreenAPI.png').default} width='64px' />
|
||||||
|
|
||||||
# WhatsApp (GreenAPI)
|
# GreenAPI
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с WhatsApp через Green API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
1. Перейдите в [Личный кабинет Green API](https://console.green-api.com/registration) и пройдите процедуру регистрации
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Перейдите к [списку инстансов](https://console.green-api.com/instanceList) и создайте новый
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Выберите новый инстанс и свяжите его с аккаунтом WhatsApp по QR-коду или номеру телефона
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Сохраните учетные данны инстанса. Для работы с библиотекой необходимы `apiUrl`, `mediaUrl`, `idInstance` и `apiTokenInstance`
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Полученные данные необходимо передать в функцию `СформироватьПараметрыДоступа`. Полученная в ее результате структура будет использоваться для авторизации во всех остальных функциях работы с GreenAPI
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
ApiUrl = "https://7105.api.greenapi.com";
|
|
||||||
MediaUrl = "https://7105.media.greenapi.com";
|
|
||||||
IdInstance = "71051...";
|
|
||||||
ApiTokenInstance = "425010d90e114aa6b78f0969e...";
|
|
||||||
|
|
||||||
Результат = OPI_GreenAPI.СформироватьПараметрыДоступа(ApiUrl, MediaUrl, IdInstance, ApiTokenInstance);
|
|
||||||
```
|
|
||||||
|
|
||||||
36
docs/ru/md/Instructions/GreenMax.md
vendored
36
docs/ru/md/Instructions/GreenMax.md
vendored
@@ -1,41 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: GreenMax
|
id: GreenMax
|
||||||
sidebar_class_name: GreenMax
|
sidebar_class_name: GreenMax
|
||||||
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, GreenAPI, Max]
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, GreenMax]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/GreenMax.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/GreenMax.png').default} width='64px' />
|
||||||
|
|
||||||
# Max (GreenAPI)
|
# GreenMax
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с Max через Green API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
1. Перейдите в [Личный кабинет Green API](https://console.green-api.com/registration) и пройдите процедуру регистрации
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Перейдите к [списку инстансов](https://console.green-api.com/instanceList) и создайте новый
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Выберите новый инстанс и свяжите его с аккаунтом Max по номеру телефона
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Сохраните учетные данны инстанса. Для работы с библиотекой необходимы `apiUrl`, `mediaUrl`, `idInstance` и `apiTokenInstance`
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Полученные данные необходимо передать в функцию `СформироватьПараметрыДоступа`. Полученная в ее результате структура будет использоваться для авторизации во всех остальных функциях работы с GreenAPI
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
ApiUrl = "https://3100.api.green-api.com/v3";
|
|
||||||
MediaUrl = "https://3100.api.green-api.com/v3";
|
|
||||||
IdInstance = "71051...";
|
|
||||||
ApiTokenInstance = "425010d90e114aa6b78f0969e...";
|
|
||||||
|
|
||||||
Результат = OPI_GreenMax.СформироватьПараметрыДоступа(ApiUrl, MediaUrl, IdInstance, ApiTokenInstance);
|
|
||||||
```
|
|
||||||
|
|
||||||
67
docs/ru/md/Instructions/MSSQL.md
vendored
67
docs/ru/md/Instructions/MSSQL.md
vendored
@@ -1,72 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: MSSQL
|
id: MSSQL
|
||||||
sidebar_class_name: MSSQL
|
sidebar_class_name: MSSQL
|
||||||
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, MSSQL, Microsoft SQL Server]
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, MSSQL]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/MSSQL.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/MSSQL.png').default} width='64px' />
|
||||||
|
|
||||||
# MS SQL Server
|
# MSSQL
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с базами данных MSSQL в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для реализации некоторых функции в этой библиотеке используется внешняя компонента <br/>
|
|
||||||
Пожалуйста, ознакомьтесь с разделом ["О внешних компонентах"](/docs/Start/Component-requirements) перед началом работы</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для работы этой библиотеки на Linux необходим **OpenSSL 3.x** <br/>
|
|
||||||
Узнать больше: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Об использовании OpenSSL во внешних компонентах"</a></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## О реализованных методах
|
|
||||||
|
|
||||||
Данная библиотека состоит из двух частей: основных методов, вроде подключения и выполнения SQL-запросов, и небольшой ORM для часто встречающихся операций, вроде CREATE, SELECT, INSERT, DELETE и пр. Работа через ORM и через тексты запросов, выполняемые функцией `ВыполнитьЗапросSQL()`, технически не отличается: ORM просто формирует текст SQL-запроса на основе макетов, но далее также выполняет их этой функцией
|
|
||||||
|
|
||||||
По умолчанию, все запросы SELECT возвращают массив выбранных данных, а остальные запросы - только `true` в поле `result` при успехе, либо `false` и текст ошибки в полях `result` и `error` соответственно. Для выполнения запросов, требующих возврата данных, но не являющихся запросами SELECT, в функции `ВыполнитьЗапросSQL()` есть параметр `ФорсироватьРезультат`
|
|
||||||
|
|
||||||
## Параметры запросов
|
|
||||||
|
|
||||||
Коннектор MSSQL поддерживает использование позиционных параметров. Все значения, передаваемые как при прямом выполнении запросов через функцию `ВыполнитьЗапросSQL()`, так и в ORM методах с установкой значений, вроде `ДобавитьЗаписи` и `ОбновитьЗаписи`, должный представлять из себя структуру вида `{'Тип данных': 'Значение'}`. Поддерживаются следующие типы данных\*:
|
|
||||||
|
|
||||||
> \* В перечне типов MSSQL перечислены только некоторые подходящие типы
|
|
||||||
|
|
||||||
| Имя типа (ключ структуры) | Тип значения 1С | Подходит для типов MSSQL |
|
|
||||||
|-|-|-|
|
|
||||||
| TINYINT | Число | tinyint |
|
|
||||||
| SMALLINT | Число | smallint |
|
|
||||||
| INT | Число | int |
|
|
||||||
| BIGINT | Число | bigint |
|
|
||||||
| FLOAT24 | Число | float(24), real |
|
|
||||||
| FLOAT53 | Число | float(53) |
|
|
||||||
| NUMERIC | Число | decimal, numeric |
|
|
||||||
| DECIMAL | Число | decimal, numeric |
|
|
||||||
| BIT | Булево | bit |
|
|
||||||
| NVARCHAR | Строка | nvarchar, varchar, nchar, char, ntext, text |
|
|
||||||
| UUID | Строка, УникальныйИдентификатор | uniqueidentifier |
|
|
||||||
| XML | Строка | xml |
|
|
||||||
| DATE | Дата, Строка | date |
|
|
||||||
| TIME | Дата, Строка | time |
|
|
||||||
| DATETIME | Дата, Строка | datetime, datetime2 |
|
|
||||||
| DATETIMEOFFSET | Дата, Строка | datetimeoffset |
|
|
||||||
| BYTES | ДвоичныеДанные | varbinary |
|
|
||||||
|
|
||||||
## Получение двоичных данных
|
|
||||||
|
|
||||||
Двоичные данные при получении из БД будут представлены как объект (структура) вида `{"BYTES": "Base64 строка"}` и должны быть преобразованы из Base64 вручную
|
|
||||||
|
|
||||||
## TLS
|
|
||||||
|
|
||||||
Библиотека поддерживает работу в режиме TLS. Для его включения необходимо сформировать настройки TLS при помощи функции `ПолучитьНастройкиTls`, и передать их как соответствующий параметр в функцию `ОткрытьСоединение` или одну из функций ORM, поддерживающих данный параметр. Если параметр TLS при вызове этих функций не передан, соединение инициализируется в незащищенном режиме
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
Настройки Tls могут быть установлены только в момент создания соединения: явного, при использовании функции `ОткрытьСоединение` или неявного, при передаче строки подключения в методы ORM.
|
|
||||||
|
|
||||||
Передача настроек Tls совместно с передачей уже созданного соединения в параметр Соединение будет проигнорирована
|
|
||||||
:::
|
|
||||||
9
docs/ru/md/Instructions/MongoDB.md
vendored
Normal file
9
docs/ru/md/Instructions/MongoDB.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
id: MongoDB
|
||||||
|
sidebar_class_name: MongoDB
|
||||||
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, MongoDB]
|
||||||
|
---
|
||||||
|
|
||||||
|
<img src={require('../../static/img/APIs/MongoDB.png').default} width='64px' />
|
||||||
|
|
||||||
|
# MongoDB
|
||||||
56
docs/ru/md/Instructions/MySQL.md
vendored
56
docs/ru/md/Instructions/MySQL.md
vendored
@@ -6,58 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/MySQL.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/MySQL.png').default} width='64px' />
|
||||||
|
|
||||||
# MySQL
|
# MySQL
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с базами данных MySQL в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для реализации некоторых функции в этой библиотеке используется внешняя компонента <br/>
|
|
||||||
Пожалуйста, ознакомьтесь с разделом ["О внешних компонентах"](/docs/Start/Component-requirements) перед началом работы</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для работы этой библиотеки на Linux необходим **OpenSSL 3.x** <br/>
|
|
||||||
Узнать больше: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Об использовании OpenSSL во внешних компонентах"</a></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## О реализованных методах
|
|
||||||
|
|
||||||
Данная библиотека состоит из двух частей: основных методов, вроде подключения и выполнения SQL-запросов, и небольшой ORM для часто встречающихся операций, вроде CREATE, SELECT, INSERT, DELETE и пр. Работа через ORM и через тексты запросов, выполняемые функцией `ВыполнитьЗапросSQL()`, технически не отличается: ORM просто формирует текст SQL-запроса на основе макетов, но далее также выполняет их этой функцией
|
|
||||||
|
|
||||||
По умолчанию, все запросы SELECT возвращают массив выбранных данных, а остальные запросы - только `true` в поле `result` при успехе, либо `false` и текст ошибки в полях `result` и `error` соответственно. Для выполнения запросов, требующих возврата данных, но не являющихся запросами SELECT, в функции `ВыполнитьЗапросSQL()` есть параметр `ФорсироватьРезультат`
|
|
||||||
|
|
||||||
## Параметры запросов
|
|
||||||
|
|
||||||
Коннектор MySQL поддерживает использование позиционных параметров. Все значения, передаваемые как при прямом выполнении запросов через функцию `ВыполнитьЗапросSQL()`, так и в ORM методах с установкой значений, вроде `ДобавитьЗаписи` и `ОбновитьЗаписи`, должный представлять из себя структуру вида `{'Тип данных': 'Значение'}`. Поддерживаются следующие типы данных\*:
|
|
||||||
|
|
||||||
> \* В перечне типов MySQL перечислены только некоторые подходящие типы
|
|
||||||
|
|
||||||
| Имя типа (ключ структуры) | Тип значения 1С | Подходит для типов MySQL |
|
|
||||||
|-|-|-|
|
|
||||||
| BYTES | Строка (путь к файлу), ДвоичныеДанные| TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB |
|
|
||||||
| UINT | Число (целое, без знака) | TINYINT UNSIGNED, SMALLINT UNSIGNED, MEDIUMINT UNSIGNED, INT UNSIGNED, BIGINT UNSIGNED |
|
|
||||||
| INT | Число (целое) | TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT |
|
|
||||||
| FLOAT | Число | FLOAT |
|
|
||||||
| DOUBLE | Число | DOUBLE (REAL, DOUBLE PRECISION) |
|
|
||||||
| DATE | Дата, Строка (дата в формате RFC 3339) | DATE, DATETIME, TIMESTAMP |
|
|
||||||
| TIME | Дата, Строка (дата в формате RFC 3339) | TIME |
|
|
||||||
| TEXT | Строка | CHAR, VARCHAR, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT, SET |
|
|
||||||
|
|
||||||
## Получение двоичных данных
|
|
||||||
|
|
||||||
Двоичные данные при получении из БД будут представлены как объект (структура) вида `{"BYTES": "Base64 строка"}` и должны быть преобразованы из Base64 вручную
|
|
||||||
|
|
||||||
## TLS
|
|
||||||
|
|
||||||
Библиотека поддерживает работу в режиме TLS. Для его включения необходимо сформировать настройки TLS при помощи функции `ПолучитьНастройкиTls`, и передать их как соответствующий параметр в функцию `ОткрытьСоединение` или одну из функций ORM, поддерживающих данный параметр. Если параметр TLS при вызове этих функций не передан, соединение инициализируется в незащищенном режиме
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
Настройки Tls могут быть установлены только в момент создания соединения: явного, при использовании функции `ОткрытьСоединение` или неявного, при передаче строки подключения в методы ORM.
|
|
||||||
|
|
||||||
Передача настроек Tls совместно с передачей уже созданного соединения в параметр Соединение будет проигнорирована
|
|
||||||
:::
|
|
||||||
20
docs/ru/md/Instructions/Neocities.md
vendored
20
docs/ru/md/Instructions/Neocities.md
vendored
@@ -6,22 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/Neocities.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Neocities.png').default} width='64px' />
|
||||||
|
|
||||||
# Neocities
|
# Neocities
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с Neocities API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
1. Авторизуйтесь на портале [Neocities](https://neocities.org) и перейдите в настройки
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Выберите необходимый сайт из списка и нажмите **Manage Site Settings**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Перейдите на вкладку **API**, сгенерируйте и сохраните **API KEY**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
API Key используется в каждом методе работы с API в качестве параметра Токен. Также вы можете сгенерировать токен на основе своего логина и пароля методом *ПолучитьТокен*
|
|
||||||
32
docs/ru/md/Instructions/Notion.md
vendored
32
docs/ru/md/Instructions/Notion.md
vendored
@@ -6,34 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/Notion.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Notion.png').default} width='64px' />
|
||||||
|
|
||||||
# Notion
|
# Notion
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с Notion API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
1. Перейдите **[в раздел интеграций портала для разработчиков](https://www.notion.so/my-integrations)**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Введите название вашей интеграции
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. После завершения создания интеграции, нажмите *Show* и скопируйте **Токен (Secret)**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Перейдите в **[основной интерфейс Notion](https://notion.so)** и создайте новую страницу. Эта страница будет родительской для всех остальных объектов, создаваемых через API
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Нажмите три точки в правом верхнем углу и в самом низу найдите пункт *Add connections*. Выберите там свою интеграцию из пунктов 1-3
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
6. Получите ID этой страницы. Это можно сделать нажав Share -> Copy link или просто скопировав из URL
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
**Токен** и **ID страницы** - два параметра, необходимые для работы через API
|
|
||||||
83
docs/ru/md/Instructions/PostgreSQL.md
vendored
83
docs/ru/md/Instructions/PostgreSQL.md
vendored
@@ -1,88 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: PostgreSQL
|
id: PostgreSQL
|
||||||
sidebar_class_name: PostgreSQL
|
sidebar_class_name: PostgreSQL
|
||||||
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, PostgreSQL, postgres]
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, PostgreSQL]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/PostgreSQL.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/PostgreSQL.png').default} width='64px' />
|
||||||
|
|
||||||
# PostgreSQL
|
# PostgreSQL
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с базами данных PostgreSQL в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для реализации некоторых функции в этой библиотеке используется внешняя компонента <br/>
|
|
||||||
Пожалуйста, ознакомьтесь с разделом ["О внешних компонентах"](/docs/Start/Component-requirements) перед началом работы</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для работы этой библиотеки на Linux необходим **OpenSSL 3.x** <br/>
|
|
||||||
Узнать больше: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Об использовании OpenSSL во внешних компонентах"</a></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## О реализованных методах
|
|
||||||
|
|
||||||
Данная библиотека состоит из двух частей: основных методов, вроде подключения и выполнения SQL-запросов, и небольшой ORM для часто встречающихся операций, вроде CREATE, SELECT, INSERT, DELETE и пр. Работа через ORM и через тексты запросов, выполняемые функцией `ВыполнитьЗапросSQL()`, технически не отличается: ORM просто формирует текст SQL-запроса на основе макетов, но далее также выполняет их этой функцией
|
|
||||||
|
|
||||||
По умолчанию, все запросы SELECT возвращают массив выбранных данных, а остальные запросы - только `true` в поле `result` при успехе, либо `false` и текст ошибки в полях `result` и `error` соответственно. Для выполнения запросов, требующих возврата данных, но не являющихся запросами SELECT, в функции `ВыполнитьЗапросSQL()` есть параметр `ФорсироватьРезультат`
|
|
||||||
|
|
||||||
## Параметры запросов
|
|
||||||
|
|
||||||
Коннектор PostgreSQL поддерживает использование позиционных параметров. Все значения, передаваемые как при прямом выполнении запросов через функцию `ВыполнитьЗапросSQL()`, так и в ORM методах с установкой значений, вроде `ДобавитьЗаписи` и `ОбновитьЗаписи`, должный представлять из себя структуру вида `{'Тип данных': 'Значение'}`. Поддерживаются следующие типы данных:
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
🟢 - Реализовано, проверено; 🟡 - Реализовано, не проверено
|
|
||||||
:::
|
|
||||||
|
|
||||||
| Тип | Поддержка | Синонимы | Допустимые нативные типы |
|
|
||||||
|-|-|-|-|
|
|
||||||
| BOOL | 🟢 | - | Булево |
|
|
||||||
| "char" | 🟢 | OLDCHAR | Число |
|
|
||||||
| SMALLINT | 🟢 | - | Число |
|
|
||||||
| SMALLSERIAL | 🟢 | - | Число |
|
|
||||||
| INT | 🟢 | - | Число |
|
|
||||||
| SERIAL | 🟢 | - | Число |
|
|
||||||
| BIGINT | 🟢 | - | Число |
|
|
||||||
| BIGSERIAL | 🟢 | - | Число |
|
|
||||||
| OID | 🟢 | - | Число |
|
|
||||||
| REAL | 🟢 | - | Число |
|
|
||||||
| DOUBLE PRECISION | 🟢 | DOUBLE_PRECISION | Число |
|
|
||||||
| VARCHAR | 🟢 | - | Строка |
|
|
||||||
| TEXT | 🟢 | - | Строка |
|
|
||||||
| CHAR | 🟢 | - | Строка |
|
|
||||||
| CITEXT | 🟢 | - | Строка |
|
|
||||||
| NAME | 🟢 | - | Строка |
|
|
||||||
| INET | 🟢 | - | Строка |
|
|
||||||
| UUID | 🟢 | - | Строка, УникальныйИдентификатор |
|
|
||||||
| TIMESTAMP | 🟢 | - | Дата, Строка (ISO 8601, RFC 3339) |
|
|
||||||
| TIMESTAMP WITH TIME ZONE | 🟢 | TIMESTAMP_WITH_TIME_ZONE | Дата (часовой пояс будет указан как UTC), Строка (RFC 3339) |
|
|
||||||
| DATE | 🟢 | - | Дата (с любым временем), Строка (ISO 8601, RFC 3339) |
|
|
||||||
| TIME | 🟢 | - | Дата (с любой датой), Строка (ISO 8601, RFC 3339) |
|
|
||||||
| BYTEA | 🟢 | - | ДвоичныеДанные, Путь к файлу, Base64 строка (все приводится к Base64 строке) |
|
|
||||||
| JSON | 🟢 | - | Массив, Структура, Соответствие, Строка (в JSON формате) |
|
|
||||||
| JSONB | 🟢 | - | Массив, Структура, Соответствие, Строка (в JSON формате) |
|
|
||||||
| LTREE | 🟡 | - | Строка |
|
|
||||||
| LQUERY | 🟡 | - | Строка |
|
|
||||||
| LTXTQUERY | 🟡 | - | Строка |
|
|
||||||
| HSTORE | 🟡 | - | Структура, Соответствие |
|
|
||||||
|
|
||||||
Аналогичный список типов доступен и для получения в качестве результатов запросов из PostgreSQL
|
|
||||||
|
|
||||||
## Получение двоичных данных
|
|
||||||
|
|
||||||
Двоичные данные при получении из БД будут представлены как объект (структура) вида `{"BYTES": "Base64 строка"}` и должны быть преобразованы из Base64 вручную
|
|
||||||
|
|
||||||
## TLS
|
|
||||||
|
|
||||||
Библиотека поддерживает работу в режиме TLS. Для его включения необходимо сформировать настройки TLS при помощи функции `ПолучитьНастройкиTls`, и передать их как соответствующий параметр в функцию `ОткрытьСоединение` или одну из функций ORM, поддерживающих данный параметр. Если параметр TLS при вызове этих функций не передан, соединение инициализируется в незащищенном режиме
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
Настройки Tls могут быть установлены только в момент создания соединения: явного, при использовании функции `ОткрытьСоединение` или неявного, при передаче строки подключения в методы ORM.
|
|
||||||
|
|
||||||
Передача настроек Tls совместно с передачей уже созданного соединения в параметр Соединение будет проигнорирована
|
|
||||||
:::
|
|
||||||
27
docs/ru/md/Instructions/RCON.md
vendored
27
docs/ru/md/Instructions/RCON.md
vendored
@@ -6,29 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/RCON.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/RCON.png').default} width='64px' />
|
||||||
|
|
||||||
# RCON (Клиент)
|
# RCON
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с протоколом RCON в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для реализации некоторых функции в этой библиотеке используется внешняя компонента <br/>
|
|
||||||
Пожалуйста, ознакомьтесь с разделом ["О внешних компонентах"](/docs/Start/Component-requirements) перед началом работы</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## О библиотеке
|
|
||||||
|
|
||||||
RCON (Remote Console) — это протокол, используемый для удаленного управления серверами, чаще всего игровыми. Он позволяет администраторам или владельцам серверов выполнять команды на сервере извне, без необходимости физического доступа к машине, где запущен сервер.
|
|
||||||
|
|
||||||
Как правило, управление через RCON доступно на серверах для таких игр как:
|
|
||||||
- Minecraft
|
|
||||||
- Counter Strike
|
|
||||||
- ARK
|
|
||||||
- Rust
|
|
||||||
- SAMP
|
|
||||||
- MTA
|
|
||||||
- и пр.
|
|
||||||
|
|
||||||
Данная библиотека предоставляет две основные функции для работы: `ОткрытьСоединение` для подключения и авторизации на сервере, и `ВыполнитьКоманду` для непосредственного выполнения действий. Также доступно выполнение одиночных команд без создания предварительного подключения, с передачей параметров подключения в метод `ВыполнитьКоманду` (в этом случае соединение будет открыто и закрыто в рамках функции, единственный вариант для CLI версии)
|
|
||||||
|
|
||||||
9
docs/ru/md/Instructions/ReportPortal.md
vendored
Normal file
9
docs/ru/md/Instructions/ReportPortal.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
id: ReportPortal
|
||||||
|
sidebar_class_name: ReportPortal
|
||||||
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, ReportPortal]
|
||||||
|
---
|
||||||
|
|
||||||
|
<img src={require('../../static/img/APIs/ReportPortal.png').default} width='64px' />
|
||||||
|
|
||||||
|
# ReportPortal
|
||||||
67
docs/ru/md/Instructions/S3.md
vendored
67
docs/ru/md/Instructions/S3.md
vendored
@@ -1,72 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: S3
|
id: S3
|
||||||
sidebar_class_name: S3
|
sidebar_class_name: S3
|
||||||
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, S3, AWS]
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, S3]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/S3.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/S3.png').default} width='64px' />
|
||||||
|
|
||||||
# AWS S3 (MinIO)
|
# S3
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с AWS S3 API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
:::important
|
|
||||||
|
|
||||||
**S3** - это стандарт, используемый различными программными продуктами. Это означает, что доступность методов, а также их параметры, могут отличаться в зависимости от того, какое ПО вы используете. Для разработки и тестирования данной библиотеки используется объектное хранилище на базе MinIO
|
|
||||||
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
1. Получите следующие авторизационные данные для работы с S3:
|
|
||||||
|
|
||||||
+ Access key
|
|
||||||
+ Secret key
|
|
||||||
+ Region
|
|
||||||
+ URL сервера
|
|
||||||
+ Тип сервиса (по умолчанию - S3)
|
|
||||||
|
|
||||||
2. Полученные данные передайте в функцию `ПолучитьСтруктуруДанных` и получите структуру основных данных
|
|
||||||
|
|
||||||
```bsl title="1С:Предприятие/OneScript"
|
|
||||||
|
|
||||||
URL = "storage-155.s3hoster.by";
|
|
||||||
AccessKey = "BRN5RKJE67...";
|
|
||||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
|
||||||
Region = "BTC";
|
|
||||||
|
|
||||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash title="CLI"
|
|
||||||
|
|
||||||
oint s3 ПолучитьСтруктуруДанных
|
|
||||||
--url "storage-155.s3hoster.by"
|
|
||||||
--access "BRN5RKJE67..."
|
|
||||||
--secret "NNhv+i9PrytpT8Tu0C1N..."
|
|
||||||
--region "BTC"
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Полученную структуру (или JSON файл) нужно использовать для вызова других методов работы с S3 API (параметр `ОсновныеДанные`) - авторизационные данные и дополнительные настройки запросов будут определяться на ее основе
|
|
||||||
|
|
||||||
## Формат ответа
|
|
||||||
|
|
||||||
Данная библиотека использует собственный формат ответа для предоставления данных, полученных от сервера. Он выглядит следующим образом:
|
|
||||||
|
|
||||||
```json
|
|
||||||
|
|
||||||
{
|
|
||||||
"status": 200,
|
|
||||||
"response": {},
|
|
||||||
"headers": {}
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
+ В поле **status** записывается код состояния HTTP-ответа
|
|
||||||
+ В поле **response** помещается тело оригинального ответа S3, предварительно преобразованное из XML в JSON
|
|
||||||
+ В поле **headers** помещаются заголовки из оригинального ответа
|
|
||||||
|
|
||||||
Это сделано для упрощения работы с библиотекой, так как формат XML более громоздок и сложен в работе, по сравнению с JSON
|
|
||||||
62
docs/ru/md/Instructions/SFTP.md
vendored
62
docs/ru/md/Instructions/SFTP.md
vendored
@@ -6,64 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/SFTP.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/SFTP.png').default} width='64px' />
|
||||||
|
|
||||||
# SFTP
|
# SFTP
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с протоколом SFTP в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для реализации некоторых функции в этой библиотеке используется внешняя компонента <br/>
|
|
||||||
Пожалуйста, ознакомьтесь с разделом ["О внешних компонентах"](/docs/Start/Component-requirements) перед началом работы</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для работы этой библиотеки на Linux необходим **OpenSSL 3.x** <br/>
|
|
||||||
Узнать больше: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Об использовании OpenSSL во внешних компонентах"</a></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
Данная библиотека предоставляет различные методы работы с SFTP на стороне клиента. Каждый из них принимает в качестве первого параметра `Соединение`, значение которого может быть получено одним из двух способов:
|
|
||||||
|
|
||||||
1. При помощи функции `ОткрытьСоединение`. В этом случае возвращается объект компоненты, поддерживающий единое соединение для множества запросов
|
|
||||||
2. При помощи функции `ПолучитьКонфигурациюСоединения`. В этом случае возвращается лишь структура описания соединения. Каждая функция, в которую эта структура будет передана в качестве `Соединения`, будет создавать новое подключение внутри себя и закрывать его по окончании работы
|
|
||||||
|
|
||||||
При выполнении множественных последовательных запросов к серверу FTP рекомендуется использовать полноценное соединение, получаемое при помощи функции `ОткрытьСоединение`
|
|
||||||
|
|
||||||
После формирования соединения, оно может быть использовано при работе с остальными методами библиотеки для выполнения конкретных задач
|
|
||||||
|
|
||||||
## Использование прокси
|
|
||||||
|
|
||||||
Данный клиент поддерживает создание соединения через прокси сервер. Получить структуру настроек прокси можно при помощи функции `ПолучитьНастройкиПрокси`. Полученная структура, далее, должна быть передана в функцию `ОткрытьСоединение` или `ПолучитьКонфигурациюСоединения` при начале работы
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
ТипПрокси = "http"; // http, socks5, socks4
|
|
||||||
|
|
||||||
АдресПрокси = "127.0.0.1";
|
|
||||||
ПортПрокси = "8071";
|
|
||||||
ЛогинПрокси = "proxyuser";
|
|
||||||
ПарольПрокси = "12we...";
|
|
||||||
|
|
||||||
НастройкиПрокси = OPI_SFTP.ПолучитьНастройкиПрокси(АдресПрокси, ПортПрокси, ТипПрокси, ЛогинПрокси, ПарольПрокси);
|
|
||||||
|
|
||||||
Соединение = OPI_SFTP.ОткрытьСоединение(НастройкиSFTP, НастройкиПрокси);
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Поддерживается работа через SOCKS4, SOCKS5 и HTTP-прокси серверы
|
|
||||||
|
|
||||||
:::warning
|
|
||||||
Работа через http-прокси является экспериментальной и может быть нестабильной в зависимости от реализации прокси-сервера, его настроек и возможностей. Рекомендуется по возможности использовать SOCKS-прокси для стабильной передачи трафика
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Совместимость с библиотекой SSH
|
|
||||||
|
|
||||||
Библиотеки SFTP и SSH имеют общий формат соединения. Это значит, что при работе с SFTP вы также можете вызывать команды `sh`, передавая в методы библиотеки SSH уже существующий объект соединения
|
|
||||||
|
|
||||||
21
docs/ru/md/Instructions/SQLite.md
vendored
21
docs/ru/md/Instructions/SQLite.md
vendored
@@ -6,23 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/SQLite.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/SQLite.png').default} width='64px' />
|
||||||
|
|
||||||
# SQLite
|
# SQLite
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с базами данных SQLite в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для реализации некоторых функции в этой библиотеке используется внешняя компонента <br/>
|
|
||||||
Пожалуйста, ознакомьтесь с разделом ["О внешних компонентах"](/docs/Start/Component-requirements) перед началом работы</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## О реализованных методах
|
|
||||||
|
|
||||||
Данная библиотека состоит из двух частей: основных методов, вроде подключения и выполнения SQL-запросов, и небольшой ORM для часто встречающихся операций, вроде CREATE, SELECT, INSERT, DELETE и пр. Работа через ORM и через тексты запросов, выполняемые функцией `ВыполнитьЗапросSQL()`, технически не отличается: ORM просто формирует текст SQL-запроса на основе макетов, но далее также выполняет их этой функцией
|
|
||||||
|
|
||||||
По умолчанию, все запросы SELECT возвращают массив выбранных данных, а остальные запросы - только `true` в поле `result` при успехе, либо `false` и текст ошибки в полях `result` и `error` соответственно. Для выполнения запросов, требующих возврата данных, но не являющихся запросами SELECT, в функции `ВыполнитьЗапросSQL()` есть параметр `ФорсироватьРезультат`
|
|
||||||
|
|
||||||
## Поля типа "BLOB"
|
|
||||||
|
|
||||||
Данная библиотека умеет обрабатывать поля типа BLOB (Двоичные данные). Для помещения значения в поле такого типа при INSERT или UPDATE оно может быть передано либо как переменная с типом `ДвоичныеДанные` (в 1С и OneScript), либо как структура вида `{"blob":Путь к файлу}` (в 1С, OneScript и CLI версиях). Возвращаются двоичные данные всегда в виде `{"blob":Base64 строка}`
|
|
||||||
60
docs/ru/md/Instructions/SSH.md
vendored
60
docs/ru/md/Instructions/SSH.md
vendored
@@ -6,62 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/SSH.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/SSH.png').default} width='64px' />
|
||||||
|
|
||||||
# SSH
|
# SSH
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с протоколом SSH в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для реализации некоторых функции в этой библиотеке используется внешняя компонента <br/>
|
|
||||||
Пожалуйста, ознакомьтесь с разделом ["О внешних компонентах"](/docs/Start/Component-requirements) перед началом работы</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для работы этой библиотеки на Linux необходим **OpenSSL 3.x** <br/>
|
|
||||||
Узнать больше: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Об использовании OpenSSL во внешних компонентах"</a></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
Данная библиотека предоставляет различные методы работы с SSH на стороне клиента. Каждый из них принимает в качестве первого параметра `Соединение`, значение которого может быть получено одним из двух способов:
|
|
||||||
|
|
||||||
1. При помощи функции `ОткрытьСоединение`. В этом случае возвращается объект компоненты, поддерживающий единое соединение для множества запросов
|
|
||||||
2. При помощи функции `ПолучитьКонфигурациюСоединения`. В этом случае возвращается лишь структура описания соединения. Каждая функция, в которую эта структура будет передана в качестве `Соединения`, будет создавать новое подключение внутри себя и закрывать его по окончании работы
|
|
||||||
|
|
||||||
При выполнении множественных последовательных запросов к серверу SSH рекомендуется использовать полноценное соединение, получаемое при помощи функции `ОткрытьСоединение`
|
|
||||||
|
|
||||||
После установки соединения, вызов команд `sh` можно осуществлять при помощи `ВыполнитьКоманду`
|
|
||||||
|
|
||||||
:::important
|
|
||||||
Команды выполняются в режиме `execute`, а не в режиме `shell`. Это означает, что контекст выполнения, вроде смены текущей директории или переменных окружения, не сохраняется между вызовами. Для выполнения нескольких последовательных команд они должны находится в одном вызове функции `ВыполнитьКоманду`
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Использование прокси
|
|
||||||
|
|
||||||
Данный клиент поддерживает создание соединения через прокси сервер. Получить структуру настроек прокси можно при помощи функции `ПолучитьНастройкиПрокси`. Полученная структура, далее, должна быть передана в функцию `ОткрытьСоединение` или `ПолучитьКонфигурациюСоединения` при начале работы
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
ТипПрокси = "http"; // http, socks5, socks4
|
|
||||||
|
|
||||||
АдресПрокси = "127.0.0.1";
|
|
||||||
ПортПрокси = "8071";
|
|
||||||
ЛогинПрокси = "proxyuser";
|
|
||||||
ПарольПрокси = "12we...";
|
|
||||||
|
|
||||||
НастройкиПрокси = OPI_SSH.ПолучитьНастройкиПрокси(АдресПрокси, ПортПрокси, ТипПрокси, ЛогинПрокси, ПарольПрокси);
|
|
||||||
|
|
||||||
Соединение = OPI_SSH.ОткрытьСоединение(НастройкиSSH, НастройкиПрокси);
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Поддерживается работа через SOCKS4, SOCKS5 и HTTP-прокси серверы
|
|
||||||
|
|
||||||
:::warning
|
|
||||||
Работа через http-прокси является экспериментальной и может быть нестабильной в зависимости от реализации прокси-сервера, его настроек и возможностей. Рекомендуется по возможности использовать SOCKS-прокси для стабильной передачи трафика
|
|
||||||
:::
|
|
||||||
58
docs/ru/md/Instructions/Slack.md
vendored
58
docs/ru/md/Instructions/Slack.md
vendored
@@ -6,60 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/Slack.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Slack.png').default} width='64px' />
|
||||||
|
|
||||||
# Slack
|
# Slack
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы со Slack Web API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
1. Войдите в свой аккаунт и перейдите на страницу **Your Apps** на сайте [Slack API](https://api.slack.com)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
2. Нажмите **Create App** и выберите пункт **From scratch**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Выберите название и рабочую область, в которой необходимо создать приложение
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
4. Создайте новый токен, нажав **Generate Token and Scopes** ниже на странице приложения
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
5. Выберите имя и добавьте разрешения
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
6. Перейдите в раздел **Premission scope** из пункта установки приложения
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
7. Добавьте необходимые для ваших целей разрешения
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
8. Установите приложение
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
9. Сохраните сгенерированный токен
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br/>
|
|
||||||
36
docs/ru/md/Instructions/TCP.md
vendored
36
docs/ru/md/Instructions/TCP.md
vendored
@@ -6,38 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/TCP.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/TCP.png').default} width='64px' />
|
||||||
|
|
||||||
# TCP (Клиент)
|
# TCP
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с протоколом TCP в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для реализации некоторых функции в этой библиотеке используется внешняя компонента <br/>
|
|
||||||
Пожалуйста, ознакомьтесь с разделом ["О внешних компонентах"](/docs/Start/Component-requirements) перед началом работы</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
|
||||||
|
|
||||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
|
||||||
<div class="addin">Для работы этой библиотеки на Linux необходим **OpenSSL 3.x** <br/>
|
|
||||||
Узнать больше: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Об использовании OpenSSL во внешних компонентах"</a></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## О реализованных методах
|
|
||||||
|
|
||||||
Данная библиотека предоставляет несколько готовых методов для работы в качестве TCP клиента. Стандартная схема взаимодействия с сервером выглядит следующим образом:
|
|
||||||
|
|
||||||
1. Создание объекта и подключение к серверу производится при помощи функции `ОткрытьСоединение`. Туда передается строка подключения в формате `<адрес>:<порт>`
|
|
||||||
2. При необходимости, серверу можно отправить сообщение при помощи функций `ОтправитьДвоичныеДанные` и `ОтправитСтроку`
|
|
||||||
3. Для получения данных от сервера, используются функции `ПрочитатьДвоичныеДанные` и `ПрочитатьСтроку`. Они имеют различные параметры для ограничения получаемых данных по размеру, маркеру и ожиданию ввода (таймауту)
|
|
||||||
4. При окончании работы желательно явно завершать соединение при помощи функции `ЗакрытьСоединение`
|
|
||||||
|
|
||||||
Для простого сценария со стандартными настройками, также существует функция `ОбработатьЗапрос` - она отправляет данные на указанный адрес и ждет ответа, завершая чтение при нахождении стандартного маркера `\\n`. Также это единственная функция, которая доступна в CLI версии ОПИ
|
|
||||||
|
|
||||||
## TLS
|
|
||||||
|
|
||||||
Библиотека поддерживает работу в режиме TLS. Для его включения необходимо сформировать настройки TLS при помощи функции `ПолучитьНастройкиTls`, и передать их как соответствующий параметр в функцию `ОткрытьСоединение` или `ОбработатьЗапрос`. Если параметр TLS при вызове этих функций не передан, соединение инициализируется в незащищенном режиме
|
|
||||||
35
docs/ru/md/Instructions/Telegram.md
vendored
35
docs/ru/md/Instructions/Telegram.md
vendored
@@ -6,37 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/Telegram.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Telegram.png').default} width='64px' />
|
||||||
|
|
||||||
# Telegram
|
# Telegram
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с Telegram API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
- Создайте бота Telegram
|
|
||||||
|
|
||||||
1. Все действия при работе с Telegram API осуществляются посредством ботов. Для создания нового бота необходимо в мессенджере начать диалог с [@BotFather](https://t.me/BotFather)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Выбрать в меню команду */newbot*
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. BotFather предложит вам выбрать имя и никнейм бота, после чего процедура создания будет завершена
|
|
||||||
|
|
||||||
- Сохраните **токен**, который вам прислал BotFather после завершения создания бота
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- (Дополнительно) Определитесь с целью взаимодействия
|
|
||||||
|
|
||||||
Созданного вами бота теперь можно применить двумя способами
|
|
||||||
|
|
||||||
- В качестве чат-бота
|
|
||||||
- Для автоматизации ведения канала
|
|
||||||
|
|
||||||
В зависимости от выбранного способа применения будет отличаться способ получения **ID чата** - параметра, отвечающего за определение объекта взаимодействия.
|
|
||||||
|
|
||||||
В случае с чат-ботом, ID чата будет являться ID пользователя, с которым бот осуществляет диалог. Если же бота необходимо использовать для ведения канала, то, после добавления его в качестве администратора, вместо ID чата можно использовать имя канала через @ (@MyChannel)
|
|
||||||
|
|
||||||
Токен и ID чата являются основными параметрами всех методов работы с Telegram API
|
|
||||||
114
docs/ru/md/Instructions/Twitter.md
vendored
114
docs/ru/md/Instructions/Twitter.md
vendored
@@ -6,116 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/Twitter.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Twitter.png').default} width='64px' />
|
||||||
|
|
||||||
# Twitter | X
|
# Twitter
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с Twitter API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы. Данная библиотека позволяет работать с функционалом бесплатного плана, т.е. создавать твиты.
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
|
|
||||||
Работа с Twitter подразумевает работу с двумя API - v1 (1.1) и v2, которые, при этом, не относятся к разным видам действий, но просто являются версиями друг друга. Несмотря на то, что Twitter настаивает на использовании v2, вышло так, что некоторые механизмы (в частности механизм загрузки файлов) в ней так и не появились. Поэтому, даже для создания обычного твита с картинкой необходима работа с обеими версиями API, а, как следствие, двойной набор авторизационных данны. Этот набор описан в функции *ПолучитьСтандартныеПараметры()*
|
|
||||||
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
|
|
||||||
Параметры_.Вставить("redirect_uri" , "");
|
|
||||||
Параметры_.Вставить("scope" , "");
|
|
||||||
Параметры_.Вставить("client_id" , "");
|
|
||||||
Параметры_.Вставить("client_secret" , "");
|
|
||||||
Параметры_.Вставить("access_token" , "");
|
|
||||||
Параметры_.Вставить("refresh_token" , "");
|
|
||||||
Параметры_.Вставить("oauth_token" , "");
|
|
||||||
Параметры_.Вставить("oauth_token_secret" , "");
|
|
||||||
Параметры_.Вставить("oauth_consumer_key" , "");
|
|
||||||
Параметры_.Вставить("oauth_consumer_secret", "");
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Вы можете определить эти параметры прямо в структуре внутри данной функции или передавать непосредственно при вызове функций уже для работы с API - каждая из них принимает параметры последним необязательным параметром. При такой передаче стандартные параметры будут перезаписаны по ключам. Рассмотрим создание приложения и получение каждого поля
|
|
||||||
|
|
||||||
|
|
||||||
### Создание приложения
|
|
||||||
Для работы с Twitter API необходимо перейти по адресу [https://developer.twitter.com/](https://developer.twitter.com/), зарегистрироваться и создать новое приложение
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### Определение полей
|
|
||||||
После создания приложения можно заполнить необходимые данные в 1С
|
|
||||||
|
|
||||||
|
|
||||||
- **redirect_uri**
|
|
||||||
|
|
||||||
redirect_uri - адрес обработчика http-запросов, указанный при регистрации. Авторизация API v2 требует подтверждения входа через браузер, после которого запрос со специальным кодом на данный обработчик должен будет прийти. Далее об этом будет в пункте access_token и refresh_token.
|
|
||||||
|
|
||||||
|
|
||||||
- **scope**
|
|
||||||
|
|
||||||
scope определяет доступные для работы функции. В *ПолучитьСтандартныеПараметры()* список scope определен по умолчанию.
|
|
||||||
|
|
||||||
- **client_id**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- **client_secret**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- **access_token** и **refresh_token**
|
|
||||||
|
|
||||||
Эти токены необходимо получить http запросом с указанием кода, который приходит при авторизации на http-сервис redirect_uri. Порядок действий:
|
|
||||||
1. Создать ссылку для авторизации в браузере при помощи функции *ПолучитьСсылкуАвторизации*
|
|
||||||
2. Добавить в модуль http-сервиса (GET) вызов функции *ОбработкаВходящегоЗапросаПослеАвторизации*, передавая HTTPСервисЗапрос как параметр.
|
|
||||||
3. Авторизоваться в браузере по ссылке из п.1.
|
|
||||||
3. Сохранить access_token и refresh_token, полученный из функции *ОбработкаВходящегоЗапросаПослеАвторизации* п. 2, в константы или другое хранилище
|
|
||||||
|
|
||||||
|
|
||||||
```bsl title="Получение"
|
|
||||||
|
|
||||||
Функция Twitterget(Запрос)
|
|
||||||
|
|
||||||
Код = Запрос.ПараметрыЗапроса["code"];
|
|
||||||
ОтветТокен = OPI_Twitter.ПолучитьТокен(Код, Параметры);
|
|
||||||
|
|
||||||
Константы.TwitterRefresh.Установить(ОтветТокен["refresh_token"]);
|
|
||||||
Константы.TwitterToken.Установить(ОтветТокен["access_token"]);
|
|
||||||
|
|
||||||
Ответ = Новый HTTPСервисОтвет(200);
|
|
||||||
Возврат Ответ;
|
|
||||||
|
|
||||||
КонецФункции
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
```bsl title="Обновление"
|
|
||||||
|
|
||||||
Процедура ОбновлятьТокенКаждыеДваЧаса(Знач Параметры)
|
|
||||||
|
|
||||||
Ответ = OPI_Twitter.ОбновитьТокен(Параметры);
|
|
||||||
Константы.TwitterToken.Установить(Ответ["access_token"]);
|
|
||||||
Константы.TwitterRefresh.Установить(Ответ["refresh_token"]);
|
|
||||||
|
|
||||||
КонецПроцедуры
|
|
||||||
```
|
|
||||||
|
|
||||||
Хардкодить данные токены нельзя, так как access_token действует всего 2 часа. По истечении этого времени, токен необходимо обновить функцией *ОбновитьТокен*. При этом обновляется как access_token, так и refresh_token. Т.е. при следующем обновлении сгоревшего access_token токена, refresh_token должен быть из предыдущего запроса.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
- **oauth_token** и **oauth_token_secret**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- **oauth_consumer_key** и **oauth_consumer_secret**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
После заполнения данных полей можно приступать к работе с методами API
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
88
docs/ru/md/Instructions/VK.md
vendored
88
docs/ru/md/Instructions/VK.md
vendored
@@ -6,90 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/VK.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/VK.png').default} width='64px' />
|
||||||
|
|
||||||
# ВКонтакте
|
# VK
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с VK API в 1С:Предприятие, OneScript и CLI. Она заточена для работы с сообществами и выполнением действий от их имени. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
Для начала работы необходимо получить некоторые параметры для VK API.
|
|
||||||
|
|
||||||
<br/><br/>
|
|
||||||
Перечень необходимых данных в виде структуры содержится в функции *ПолучитьСтандартныеПараметры()*. Вы можете указывать значения параметров прямо в ней или же передавать их структурой при вызове любых других методов библиотеки в качестве необязательного параметра *Параметры* (последний во всех методах библиотеки). В последнем случае стандартные параметры будут перезаписаны по ключам теми, которые переданы при вызове метода. Перезаписаны будут только совпадающие по ключам данные. Если какой то параметр есть в наборе стандартных, но не был передан при вызове метода, то он сохранит стандартное значение.
|
|
||||||
<br/><br/>
|
|
||||||
|
|
||||||
```bsl
|
|
||||||
_Параметры = Новый Структура;
|
|
||||||
|
|
||||||
_Параметры.Вставить("v" , "5.131");
|
|
||||||
_Параметры.Вставить("from_group" , "1");
|
|
||||||
_Параметры.Вставить("group_id" , "123456789");
|
|
||||||
_Параметры.Вставить("owner_id" , "-123456789");
|
|
||||||
_Параметры.Вставить("app_id" , "87654321");
|
|
||||||
_Параметры.Вставить("access_token" , "vk1.a.E-byuFeG1qcN7...");
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Рассмотрим получение каждого значения:
|
|
||||||
|
|
||||||
**1. v**
|
|
||||||
|
|
||||||
Параметр `v` означает версию VK API. Тестирование проводилось на 5.131, рекомендуется его таким и оставить
|
|
||||||
|
|
||||||
**2. from_group**
|
|
||||||
|
|
||||||
От лица группы. Должен быть 1
|
|
||||||
|
|
||||||
**3. group_id и owner_id**
|
|
||||||
|
|
||||||
ID группы. Если у вас стандартный адрес группы, то id можно найти в URL. В противном случае он будет на вкладке "Управление" в группе, под полем Адрес. owner_id - тоже самое, но со знаком '-' впереди
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
**4. app_id**
|
|
||||||
|
|
||||||
app_id - ID приложения. Для создания приложения необходимо:
|
|
||||||
|
|
||||||
* Перейти по адресу https://id.vk.com/about/business/go, авторизоваться и ввести свои данные физ. или юр. лица
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
* Ввести название приложения и выбрать пункт **Web**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
* Ввести доменное имя и URL обработчика перенаправлений. Тут нужно отметить, что данный механизм создания приложений - новый. Еще недавно приложения VK создавались иначе и иметь redirect_url для них было не нужно. На данный момент не совсем понятно, зачем он нужен нам для серверного приложения - просто такого понятия как серверное приложение у VK теперь нет. Теоретически, туда можно вписать что угодно - для работы с библиотекой в получении обратных данных нет необходимости. Однако, с течением времени, это может измениться.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
* Ввести паспортные данные или данные об организации, включить доступ к сообществам (короче, если у вас уже было приложение до этого, то вам крупно повезло, а если нет российского паспорта - придется писать в поддержку)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
* Получить app_id на странице приложения
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
**5. access_token**
|
|
||||||
|
|
||||||
Ссылку на получение access_token можно получить при помощи функции *СоздатьСсылкуПолученияТокена* или склеить вручную:
|
|
||||||
|
|
||||||
https://oauth.vk.com/authorize?client_id= + *app_id* + &scope=offline,wall,groups,photos,stats,stories,ads&v=5.131&response_type=token&redirect_uri=https://api.vk.com/blank.html
|
|
||||||
|
|
||||||
* По этой ссылке необходимо перейти в браузере
|
|
||||||
* Авторизоваться через ВК и подтвердить доступ
|
|
||||||
* Забрать токен из параметра URL в адресной строке
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
**(Дополнительно) communitytoken**
|
|
||||||
|
|
||||||
Некоторые методы, например для работы с чат-ботом сообщества, принимают в качестве параметра communitytoken - в этих методах он заменяет access_token. Для его получения необходимо:
|
|
||||||
|
|
||||||
* Зайти в раздел "Управление" в группе ВК
|
|
||||||
* Найти вкладку "Работа с API"
|
|
||||||
* Нажать "Создать ключ" и забрать его
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Пока вам не нужно использовать такие методы, получать communitytoken не обязательно
|
|
||||||
43
docs/ru/md/Instructions/VKTeams.md
vendored
43
docs/ru/md/Instructions/VKTeams.md
vendored
@@ -1,48 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: VKTeams
|
id: VKTeams
|
||||||
sidebar_class_name: VKTeams
|
sidebar_class_name: VKTeams
|
||||||
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, VKTeams, VK Teams]
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, VKTeams]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/VKTeams.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/VKTeams.png').default} width='64px' />
|
||||||
|
|
||||||
# VK Teams
|
# VKTeams
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с VK Teams API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
1. Зарегистрируйтесь, оформите тариф и скачайте приложение VK Teams [на главной странице](https://biz.mail.ru/teams)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Войдите в приложении при помощи одноразового пароля, который должен прийти на почту. Просмотреть почту необходимого пользователя можно в панели администрирования
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Начните диалог с [@metabot](http://teams.vk.com/profile/70001) и пройдите процедуру создания нового бота
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Сгенерируйте новый **токен** и включите возможность добавлять бота в группу (если необходимо)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Сохраните ID бота, получив его при помощи кнопки "Показать моих ботов"
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
6. Сформируйте ссылку и перейдите по ней в браузере
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
На конце URL должен быть ваш ID бота
|
|
||||||
https://teams.vk.com/profile/1234567890
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
7. Начните диалог с ботом
|
|
||||||
|
|
||||||
Теперь вы сможете добавлять бота в группы и управлять им при помощи **Токена** и **ID необходимого диалога** (группы или пользователя)
|
|
||||||
|
|
||||||

|
|
||||||
57
docs/ru/md/Instructions/Viber.md
vendored
57
docs/ru/md/Instructions/Viber.md
vendored
@@ -6,59 +6,4 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
|||||||
|
|
||||||
<img src={require('../../static/img/APIs/Viber.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/Viber.png').default} width='64px' />
|
||||||
|
|
||||||
# Viber
|
# Viber
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с Viber API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
:::warning
|
|
||||||
Начиная с 05.02.2024 данный способ создания ботов более недействителен: Rakuten отменил возможность создавать ботов бесплатно и теперь для работы с API необходимо проходить верификацию по коммерческой модели. Подробнее [тут](https://help.viber.com/hc/en-us/articles/15247629658525-Bot-commercial-model)
|
|
||||||
:::
|
|
||||||
|
|
||||||
:::caution
|
|
||||||
Методы данной библиотеки не проходят тестирование с 10.01.2025
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
У Viber есть два REST API: один для работы с каналами, а второй - для чат-ботов. В обоих случаях основными параметрами служат **Токен** и **IDПользователя**
|
|
||||||
|
|
||||||
- Если вам необходимо управлять каналом:
|
|
||||||
1. Зайдите в приложение Viber и создайте новый канал
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. После создания, перейдите в настройки канала -> Для разработчиков, и скопируйте **Токен**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Установите Webhook. См. Установить Webhook
|
|
||||||
4. **IDПользователя** - ваш ID (администратора канала). См. Получить информацию о канале
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
- Если вам необходим чат-бот:
|
|
||||||
1. Перейдите по ссылке [https://partners.viber.com/account/create-bot-account](https://partners.viber.com/account/create-bot-account) и авторизуйтесь с вашим номером телефона, который привязан к Viber
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Выберите пункт создания нового бота
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. В меню создания бота заполните все необходимые поля
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Скопируйте **Токен**
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Найти своего нового бота вы можете отсканировав QR на странице создания или в настройках (пункт чат-боты) в приложении Viber.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Сейчас вы не можете начать диалог с ботом, сначала необходимо установить Webhook. См. Установить Webhook
|
|
||||||
6. После запуска **IDПользователя** будет ID конкретного человека, ведущего диалог с ботом. Получить можно из обработки входящих сообщения по Webhook
|
|
||||||
|
|
||||||
|
|
||||||
**Важно:** ID одного и того же пользователя у чата и канала - это разные значения. Нельзя использовать ID, полученный из сообщения боту для вызова методов управления каналом и наоборот
|
|
||||||
58
docs/ru/md/Instructions/YandexDisk.md
vendored
58
docs/ru/md/Instructions/YandexDisk.md
vendored
@@ -1,63 +1,9 @@
|
|||||||
---
|
---
|
||||||
id: YandexDisk
|
id: YandexDisk
|
||||||
sidebar_class_name: YandexDisk
|
sidebar_class_name: YandexDisk
|
||||||
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, YandexDisk, Yandex.Disk, Yandex Disk]
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, YandexDisk]
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={require('../../static/img/APIs/YandexDisk.png').default} width='64px' />
|
<img src={require('../../static/img/APIs/YandexDisk.png').default} width='64px' />
|
||||||
|
|
||||||
# Яндекс Диск
|
# YandexDisk
|
||||||
|
|
||||||
Этот раздел посвящен библиотеке для работы с Яндекс Диск API в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
|
||||||
|
|
||||||
## Начало работы
|
|
||||||
|
|
||||||
Для начала работы необходимо получить токен доступа к диску:
|
|
||||||
|
|
||||||
1. Перейдите на [страницу создания приложения](https://oauth.yandex.ru/client/new/)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. Введите название сервиса, выберите *Веб-сервисы* в качестве платформы. Redirect URI можно указать любой или выбрать пункт *Подставить URL для отладки* - для работы с библиотекой он не понадобится.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. В поле *Доступ к данным* добавьте разрешения как на скриншоте ниже, после чего нажмите *Создать приложение*
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. Сохраните **ClientID** и **Client secret** со страницы приложения
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. Вызовите функцию *OPI_YandexID.ПолучитьКодПодтверждения()*, передав ClientID в качестве параметра. Она вернет ответ сервера Yandex, где будут поля:
|
|
||||||
- **user_code** - необходимо будет ввести в браузере
|
|
||||||
- **device_code** - необходимо будет передать в другую функцию
|
|
||||||
- **verification_url** - URL, который нужно открыть в браузере
|
|
||||||
<br/>
|
|
||||||
```json title="Результат функции ПолучитьКодПодтверждения(), если перевести его в JSON"
|
|
||||||
{
|
|
||||||
"verification_url": "https://ya.ru/device",
|
|
||||||
"user_code": "gjehyruw",
|
|
||||||
"interval": 5,
|
|
||||||
"expires_in": 300,
|
|
||||||
"device_code": "12207cafec1b40ad8d0052af3faf0d12"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
6. Откройте URL из **verification_url** в браузере. Скорее всего это будет https://ya.ru/device. В появившееся поле введите **user_code** из пункта 5
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
7. После ввода кода в пункте 6, вызовите функцию *OPI_YandexID.ПреобразоватьКодВТокен()*, передав туда **ClientID** и **ClientSecret** из пункта 4, а также **device_code** из пункта 5. Сохраните полученные **access_token** и **refresh_token**
|
|
||||||
|
|
||||||
```json title="Результат функции ПреобразоватьКодВТокен(), если перевести его в JSON"
|
|
||||||
{
|
|
||||||
"token_type": "bearer",
|
|
||||||
"refresh_token": "1:Tj6nD2vgE2L8jwSm:YgWjQXPv6_y3e07GW70ig2AOyEXoRVsKKpApGHq2EOg7pfx0MKrXiCrfLBFtzgQawdawdwadad3Sasa9z2H0vSeZKNmZmA",
|
|
||||||
"expires_in": 31535956,
|
|
||||||
"access_token": "y0_AgAAAABWxxdkAAs0QgAAAAD59cawdawdwadadVKIiwGK__crw"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**access_token** используется во всех остальных функциях библиотеки, а при помощи **refresh_token** его можно обновить, когда срок жизни будет подходить к концу (при помощи функции *ОбновитьТокен()*)
|
|
||||||
36
docs/ru/md/MongoDB/Collection-management/Create-collection.mdx
vendored
Normal file
36
docs/ru/md/MongoDB/Collection-management/Create-collection.mdx
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 1
|
||||||
|
description: Создать коллекцию и другие функции для работы с MongoDB в Открытом пакете интеграций - бесплатной open-source библиотеке интеграций для 1С:Предприятие 8, OneScript и CLI
|
||||||
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, MongoDB]
|
||||||
|
---
|
||||||
|
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# Создать коллекцию
|
||||||
|
Создает новую коллекцию с указанными параметрами
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`Функция СоздатьКоллекцию(Знач Соединение, Знач Наименование, Знач База = Неопределено, Знач Параметры = Неопределено) Экспорт`
|
||||||
|
|
||||||
|
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||||
|
|-|-|-|-|-|
|
||||||
|
| Соединение | --dbc | Строка, Произвольный | ✔ | Соединение или строка подключения |
|
||||||
|
| Наименование | --name | Строка | ✔ | Имя новой коллекции |
|
||||||
|
| База | --db | Строка | ✖ | Имя базы. Текущая база, если не указано |
|
||||||
|
| Параметры | --params | Структура Из КлючИЗначение | ✖ | Дополнительные параметры создания |
|
||||||
|
|
||||||
|
|
||||||
|
Возвращаемое значение: Соответствие Из КлючИЗначение - Результат выполнения операции
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
35
docs/ru/md/MongoDB/Collection-management/Delete-collection.mdx
vendored
Normal file
35
docs/ru/md/MongoDB/Collection-management/Delete-collection.mdx
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 2
|
||||||
|
description: Удалить коллекцию и другие функции для работы с MongoDB в Открытом пакете интеграций - бесплатной open-source библиотеке интеграций для 1С:Предприятие 8, OneScript и CLI
|
||||||
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, MongoDB]
|
||||||
|
---
|
||||||
|
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# Удалить коллекцию
|
||||||
|
Удаляет выбранную коллекцию базы
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`Функция УдалитьКоллекцию(Знач Соединение, Знач Коллекция, Знач База = Неопределено) Экспорт`
|
||||||
|
|
||||||
|
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||||
|
|-|-|-|-|-|
|
||||||
|
| Соединение | --dbc | Строка, Произвольный | ✔ | Соединение или строка подключения |
|
||||||
|
| Коллекция | --coll | Строка | ✔ | Имя коллекции |
|
||||||
|
| База | --db | Строка | ✖ | Имя базы. Текущая база, если не указано |
|
||||||
|
|
||||||
|
|
||||||
|
Возвращаемое значение: Соответствие Из КлючИЗначение - Результат выполнения операции
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
4
docs/ru/md/MongoDB/Collection-management/_category_.json
vendored
Normal file
4
docs/ru/md/MongoDB/Collection-management/_category_.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"label": "Работа с коллекциями",
|
||||||
|
"position": "4"
|
||||||
|
}
|
||||||
42
docs/ru/md/MongoDB/Common-methods/Execute-command.mdx
vendored
Normal file
42
docs/ru/md/MongoDB/Common-methods/Execute-command.mdx
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 5
|
||||||
|
description: Выполнить команду и другие функции для работы с MongoDB в Открытом пакете интеграций - бесплатной open-source библиотеке интеграций для 1С:Предприятие 8, OneScript и CLI
|
||||||
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, MongoDB]
|
||||||
|
---
|
||||||
|
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# Выполнить команду
|
||||||
|
Выполняет команду по ее описанию
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`Функция ВыполнитьКоманду(Знач Соединение, Знач Комманда, Знач Аргумент = 1, Знач База = Неопределено, Знач Данные = Неопределено) Экспорт`
|
||||||
|
|
||||||
|
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||||
|
|-|-|-|-|-|
|
||||||
|
| Соединение | --dbc | Строка, Произвольный | ✔ | Соединение или строка подключения |
|
||||||
|
| Комманда | --comm | Строка | ✔ | Имя команды для выполнения |
|
||||||
|
| Аргумент | --arg | Произвольный | ✖ | Аргумент команды |
|
||||||
|
| База | --db | Строка | ✖ | База данных, в которой необходимо провести операцию |
|
||||||
|
| Данные | --data | Структура Из КлючИЗначение | ✖ | Основные поля данных для выполнения операции |
|
||||||
|
|
||||||
|
|
||||||
|
Возвращаемое значение: Соответствие Из КлючИЗначение - Результат выполнения операции
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||||
|
Адрес = "127.0.0.1:1234";
|
||||||
|
Логин = "bayselonarrend";
|
||||||
|
Пароль = "12we...";
|
||||||
|
База = "main";
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -34,6 +34,9 @@ import TabItem from '@theme/TabItem';
|
|||||||
Логин = "bayselonarrend";
|
Логин = "bayselonarrend";
|
||||||
Пароль = "12we...";
|
Пароль = "12we...";
|
||||||
База = "main";
|
База = "main";
|
||||||
|
|
||||||
|
ПараметрыПодключения = Новый Структура("authSource", "admin");
|
||||||
|
Результат = OPI_MongoDB.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль, ПараметрыПодключения);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
34
docs/ru/md/MongoDB/Working-with-databases/Delete-database.mdx
vendored
Normal file
34
docs/ru/md/MongoDB/Working-with-databases/Delete-database.mdx
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 3
|
||||||
|
description: Удалить базу данных и другие функции для работы с MongoDB в Открытом пакете интеграций - бесплатной open-source библиотеке интеграций для 1С:Предприятие 8, OneScript и CLI
|
||||||
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, MongoDB]
|
||||||
|
---
|
||||||
|
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# Удалить базу данных
|
||||||
|
Удаляет базу данных
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`Функция УдалитьБазуДанных(Знач Соединение, Знач База = Неопределено) Экспорт`
|
||||||
|
|
||||||
|
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||||
|
|-|-|-|-|-|
|
||||||
|
| Соединение | --dbc | Строка, Произвольный | ✔ | Соединение или строка подключения |
|
||||||
|
| База | --db | Строка | ✖ | Имя базы. Текущая база, если не указано |
|
||||||
|
|
||||||
|
|
||||||
|
Возвращаемое значение: Соответствие Из КлючИЗначение - Результат выполнения операции
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
39
docs/ru/md/MongoDB/Working-with-databases/Get-database.mdx
vendored
Normal file
39
docs/ru/md/MongoDB/Working-with-databases/Get-database.mdx
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 2
|
||||||
|
description: Получить базу данных и другие функции для работы с MongoDB в Открытом пакете интеграций - бесплатной open-source библиотеке интеграций для 1С:Предприятие 8, OneScript и CLI
|
||||||
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, MongoDB]
|
||||||
|
---
|
||||||
|
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# Получить базу данных
|
||||||
|
Получает информацию о базе данных
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`Функция ПолучитьБазуДанных(Знач Соединение, Знач База = Неопределено) Экспорт`
|
||||||
|
|
||||||
|
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||||
|
|-|-|-|-|-|
|
||||||
|
| Соединение | --dbc | Строка, Произвольный | ✔ | Соединение или строка подключения |
|
||||||
|
| База | --db | Строка | ✖ | Имя базы. Текущая база, если не указано |
|
||||||
|
|
||||||
|
|
||||||
|
Возвращаемое значение: Соответствие Из КлючИЗначение - Результат выполнения операции
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||||
|
Адрес = "127.0.0.1:1234";
|
||||||
|
Логин = "bayselonarrend";
|
||||||
|
Пароль = "12we...";
|
||||||
|
База = "main";
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
33
docs/ru/md/MongoDB/Working-with-databases/Get-list-of-bases.mdx
vendored
Normal file
33
docs/ru/md/MongoDB/Working-with-databases/Get-list-of-bases.mdx
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 1
|
||||||
|
description: Получить список баз и другие функции для работы с MongoDB в Открытом пакете интеграций - бесплатной open-source библиотеке интеграций для 1С:Предприятие 8, OneScript и CLI
|
||||||
|
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, MongoDB]
|
||||||
|
---
|
||||||
|
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# Получить список баз
|
||||||
|
Получает список баз данных
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`Функция ПолучитьСписокБаз(Знач Соединение) Экспорт`
|
||||||
|
|
||||||
|
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||||
|
|-|-|-|-|-|
|
||||||
|
| Соединение | --dbc | Строка, Произвольный | ✔ | Соединение или строка подключения |
|
||||||
|
|
||||||
|
|
||||||
|
Возвращаемое значение: Соответствие Из КлючИЗначение - Результат выполнения операции
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
4
docs/ru/md/MongoDB/Working-with-databases/_category_.json
vendored
Normal file
4
docs/ru/md/MongoDB/Working-with-databases/_category_.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"label": "Работа с базами",
|
||||||
|
"position": "3"
|
||||||
|
}
|
||||||
2
media/catalogs/Catalog.md
vendored
2
media/catalogs/Catalog.md
vendored
@@ -10,7 +10,7 @@
|
|||||||
|| `Google Sheets`| googlesheets, google sheets, spreadsheets |
|
|| `Google Sheets`| googlesheets, google sheets, spreadsheets |
|
||||||
|| `GreenAPI`| greenapi, whatsapp |
|
|| `GreenAPI`| greenapi, whatsapp |
|
||||||
|| `GreenMax`| greenapi, max |
|
|| `GreenMax`| greenapi, max |
|
||||||
|| `MongoDB (в разработке)`| mongodb, mongo, nosql |
|
|| `MongoDB`| mongodb, mongo, nosql |
|
||||||
|| `MSSQL`| mssql, ms sql |
|
|| `MSSQL`| mssql, ms sql |
|
||||||
|| `MySQL`| mysql, my sql |
|
|| `MySQL`| mysql, my sql |
|
||||||
|| `Neocities`| neocities |
|
|| `Neocities`| neocities |
|
||||||
|
|||||||
32
media/catalogs/names.json
vendored
Normal file
32
media/catalogs/names.json
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
[
|
||||||
|
"Airtable",
|
||||||
|
"Bitrix24",
|
||||||
|
"CDEK",
|
||||||
|
"Dropbox",
|
||||||
|
"FTP",
|
||||||
|
"GoogleCalendar",
|
||||||
|
"GoogleDrive",
|
||||||
|
"GoogleSheets",
|
||||||
|
"GreenAPI",
|
||||||
|
"GreenMax",
|
||||||
|
"MongoDB",
|
||||||
|
"MSSQL",
|
||||||
|
"MySQL",
|
||||||
|
"Neocities",
|
||||||
|
"Notion",
|
||||||
|
"PostgreSQL",
|
||||||
|
"RCON",
|
||||||
|
"ReportPortal",
|
||||||
|
"S3",
|
||||||
|
"SFTP",
|
||||||
|
"Slack",
|
||||||
|
"SQLite",
|
||||||
|
"SSH",
|
||||||
|
"TCP",
|
||||||
|
"Telegram",
|
||||||
|
"Twitter",
|
||||||
|
"Viber",
|
||||||
|
"VK",
|
||||||
|
"VKTeams",
|
||||||
|
"YandexDisk"
|
||||||
|
]
|
||||||
18710
service/dictionaries/en.json
vendored
18710
service/dictionaries/en.json
vendored
File diff suppressed because it is too large
Load Diff
2
service/last_build_hash.txt
vendored
2
service/last_build_hash.txt
vendored
@@ -1 +1 @@
|
|||||||
20B882C7B524C090B4A5C46334314340FC1818BF7F33C612FA00D03607369322
|
8FA439AD7E1536B2A9AB8C7B8FFA79E5FC8039F2477EA39A1F621596D65C21BD
|
||||||
15
service/tests_en.json
vendored
15
service/tests_en.json
vendored
@@ -6443,5 +6443,20 @@
|
|||||||
"lib": "MongoDB",
|
"lib": "MongoDB",
|
||||||
"name": "CreateConnection",
|
"name": "CreateConnection",
|
||||||
"variant": "Closing"
|
"variant": "Closing"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lib": "MongoDB",
|
||||||
|
"name": "ExecuteCommand",
|
||||||
|
"variant": "Connection"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lib": "MongoDB",
|
||||||
|
"name": "ExecuteCommand",
|
||||||
|
"variant": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lib": "MongoDB",
|
||||||
|
"name": "GetDatabase",
|
||||||
|
"variant": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
15
service/tests_ru.json
vendored
15
service/tests_ru.json
vendored
@@ -6443,5 +6443,20 @@
|
|||||||
"lib": "MongoDB",
|
"lib": "MongoDB",
|
||||||
"name": "ОткрытьСоединение",
|
"name": "ОткрытьСоединение",
|
||||||
"variant": "Закрытие"
|
"variant": "Закрытие"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lib": "MongoDB",
|
||||||
|
"name": "ВыполнитьКоманду",
|
||||||
|
"variant": "Подключение"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lib": "MongoDB",
|
||||||
|
"name": "ВыполнитьКоманду",
|
||||||
|
"variant": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lib": "MongoDB",
|
||||||
|
"name": "ПолучитьБазуДанных",
|
||||||
|
"variant": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
2
src/en/OInt/.versionhash
vendored
2
src/en/OInt/.versionhash
vendored
@@ -1 +1 @@
|
|||||||
20B882C7B524C090B4A5C46334314340FC1818BF7F33C612FA00D03607369322
|
8FA439AD7E1536B2A9AB8C7B8FFA79E5FC8039F2477EA39A1F621596D65C21BD
|
||||||
265
src/en/OInt/core/Modules/OPI_MongoDB.os
vendored
265
src/en/OInt/core/Modules/OPI_MongoDB.os
vendored
@@ -184,8 +184,249 @@ Function GenerateConnectionString(Val Address
|
|||||||
|
|
||||||
EndFunction
|
EndFunction
|
||||||
|
|
||||||
|
// Execute command
|
||||||
|
// Executes the command according to its description
|
||||||
|
//
|
||||||
|
// Parameters:
|
||||||
|
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||||
|
// Command - String - Command name to execute - comm
|
||||||
|
// Argument - Arbitrary - Command argument - arg
|
||||||
|
// Base - String - Database in which the operation needs to be performed - db
|
||||||
|
// Data - Structure Of KeyAndValue - Main data fields for performing the operation - data
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
// Map Of KeyAndValue - Operation result
|
||||||
|
Function ExecuteCommand(Val Connection
|
||||||
|
, Val Command
|
||||||
|
, Val Argument = 1
|
||||||
|
, Val Base = Undefined
|
||||||
|
, Val Data = Undefined) Export
|
||||||
|
|
||||||
|
If IsConnector(Connection) Then
|
||||||
|
CloseConnection = False;
|
||||||
|
Connector = Connection;
|
||||||
|
Else
|
||||||
|
CloseConnection = True;
|
||||||
|
Connector = CreateConnection(Connection);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
If Not IsConnector(Connector) Then
|
||||||
|
Return Connector;
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
OperationStructure = New Structure();
|
||||||
|
|
||||||
|
OPI_Tools.AddField("operation", Command, "String", OperationStructure);
|
||||||
|
|
||||||
|
If Base <> Undefined Then
|
||||||
|
OPI_Tools.AddField("database", Base, "String", OperationStructure);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
If Argument <> Undefined Then
|
||||||
|
ProcessedArgument = ProcessDataForOperation(Argument);
|
||||||
|
OperationStructure.Insert("argument", ProcessedArgument);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
If Data <> Undefined Then
|
||||||
|
ProcessedData = ProcessDataForOperation(Data);
|
||||||
|
OperationStructure.Insert("data", ProcessedData);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
OperationsJSON = OPI_Tools.JSONString(OperationStructure);
|
||||||
|
|
||||||
|
Result = Connector.Execute(OperationsJSON);
|
||||||
|
Result = OPI_Tools.JsonToStructure(Result);
|
||||||
|
|
||||||
|
If CloseConnection Then
|
||||||
|
CloseConnection(Connector);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
Return Result;
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
#EndRegion
|
#EndRegion
|
||||||
|
|
||||||
|
#Region WorkingWithDatabases
|
||||||
|
|
||||||
|
// Get list of bases
|
||||||
|
// Gets the list of databases
|
||||||
|
//
|
||||||
|
// Parameters:
|
||||||
|
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
// Map Of KeyAndValue - Operation result
|
||||||
|
Function GetListOfBases(Val Connection) Export
|
||||||
|
|
||||||
|
Result = ExecuteCommand(Connection, "listDatabases");
|
||||||
|
Return Result;
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
// Get database
|
||||||
|
// Gets information about the database
|
||||||
|
//
|
||||||
|
// Parameters:
|
||||||
|
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||||
|
// Base - String - Database name. Current database if not specified - db
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
// Map Of KeyAndValue - Operation result
|
||||||
|
Function GetDatabase(Val Connection, Val Base = Undefined) Export
|
||||||
|
|
||||||
|
OPI_TypeConversion.GetLine(Base);
|
||||||
|
|
||||||
|
Result = ExecuteCommand(Connection, "dbStats", , Base);
|
||||||
|
Return Result;
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
// Drop database
|
||||||
|
// Deletes the database
|
||||||
|
//
|
||||||
|
// Parameters:
|
||||||
|
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||||
|
// Base - String - Database name. Current database if not specified - db
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
// Map Of KeyAndValue - Operation result
|
||||||
|
Function DeleteDatabase(Val Connection, Val Base = Undefined) Export
|
||||||
|
|
||||||
|
OPI_TypeConversion.GetLine(Base);
|
||||||
|
|
||||||
|
Result = ExecuteCommand(Connection, "dropDatabase", , Base);
|
||||||
|
Return Result;
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
#EndRegion
|
||||||
|
|
||||||
|
#Region CollectionManagement
|
||||||
|
|
||||||
|
// Create collection
|
||||||
|
// Creates a new collection with the specified parameters
|
||||||
|
//
|
||||||
|
// Parameters:
|
||||||
|
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||||
|
// Name - String - Collection name - name
|
||||||
|
// Base - String - Database name. Current database if not specified - db
|
||||||
|
// Parameters - Structure Of KeyAndValue - Additional creation parameters - params
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
// Map Of KeyAndValue - Operation result
|
||||||
|
Function CreateCollection(Val Connection
|
||||||
|
, Val Name
|
||||||
|
, Val Base = Undefined
|
||||||
|
, Val Parameters = Undefined) Export
|
||||||
|
|
||||||
|
OPI_TypeConversion.GetLine(Name);
|
||||||
|
|
||||||
|
If Parameters <> Undefined Then
|
||||||
|
OPI_TypeConversion.GetKeyValueCollection(Parameters);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
If Base <> Undefined Then
|
||||||
|
OPI_TypeConversion.GetLine(Base);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
Result = ExecuteCommand(Connection, "createCollection", Name, Base, Parameters);
|
||||||
|
Return Result;
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
// Delete collection
|
||||||
|
// Deletes the selected database collection
|
||||||
|
//
|
||||||
|
// Parameters:
|
||||||
|
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||||
|
// Collection - String - Collection name - coll
|
||||||
|
// Base - String - Database name. Current database if not specified - db
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
// Map Of KeyAndValue - Operation result
|
||||||
|
Function DeleteCollection(Val Connection, Val Collection, Val Base = Undefined) Export
|
||||||
|
|
||||||
|
OPI_TypeConversion.GetLine(Collection);
|
||||||
|
|
||||||
|
If Base <> Undefined Then
|
||||||
|
OPI_TypeConversion.GetLine(Base);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
Result = ExecuteCommand(Connection, "drop", Collection, Base);
|
||||||
|
Return Result;
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
#EndRegion
|
||||||
|
|
||||||
|
#EndRegion
|
||||||
|
|
||||||
|
#Region Private
|
||||||
|
|
||||||
|
Function ProcessDataForOperation(Val Data)
|
||||||
|
|
||||||
|
Try
|
||||||
|
|
||||||
|
ProcessedData = Data;
|
||||||
|
OPI_TypeConversion.GetKeyValueCollection(ProcessedData);
|
||||||
|
ProcessedData = ProcessCollectionForOperation(ProcessedData);
|
||||||
|
|
||||||
|
Except
|
||||||
|
|
||||||
|
ProcessedData = Data;
|
||||||
|
|
||||||
|
If OPI_Tools.ThisIsCollection(ProcessedData) Then
|
||||||
|
|
||||||
|
ProcessedData = ProcessCollectionForOperation(ProcessedData);
|
||||||
|
|
||||||
|
ElsIf TypeOf(ProcessedData) = Type("BinaryData") Then
|
||||||
|
|
||||||
|
ProcessedData = New Structure("__OPI_BINARY__", GetBase64StringFromBinaryData(ProcessedData));
|
||||||
|
|
||||||
|
ElsIf TypeOf(ProcessedData) = Type("Date") Then
|
||||||
|
|
||||||
|
ProcessedData = New Structure("__OPI_DATE__", OPI_Tools.DateRFC3339(ProcessedData));
|
||||||
|
|
||||||
|
ElsIf Not TypeOf(ProcessedData) = Type("Number") And Not TypeOf(ProcessedData) = Type("Boolean") Then
|
||||||
|
|
||||||
|
OPI_TypeConversion.GetLine(ProcessedData);
|
||||||
|
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
EndTry;
|
||||||
|
|
||||||
|
Return ProcessedData;
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
Function ProcessCollectionForOperation(Val Data)
|
||||||
|
|
||||||
|
ProcessedData = Type(TypeOf(Data));
|
||||||
|
|
||||||
|
If OPI_Tools.ThisIsCollection(ProcessedData) Then
|
||||||
|
|
||||||
|
For Each DataPart In Data Do
|
||||||
|
|
||||||
|
CurrentKey = String(DataPart.Key);
|
||||||
|
CurrentValue = ProcessDataForOperation(DataPart.Value);
|
||||||
|
|
||||||
|
ProcessedData.Insert(CurrentKey, CurrentValue);
|
||||||
|
|
||||||
|
EndDo;
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
For Each Element In Data Do
|
||||||
|
ProcessedData.Add(ProcessDataForOperation(Element));
|
||||||
|
EndDo;
|
||||||
|
|
||||||
|
EndIf;
|
||||||
|
|
||||||
|
Return ProcessedData;
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
#EndRegion
|
#EndRegion
|
||||||
|
|
||||||
#Region Alternate
|
#Region Alternate
|
||||||
@@ -206,4 +447,28 @@ Function СформироватьСтрокуПодключения(Val Адре
|
|||||||
Return GenerateConnectionString(Адрес, База, Логин, Пароль, Параметры);
|
Return GenerateConnectionString(Адрес, База, Логин, Пароль, Параметры);
|
||||||
EndFunction
|
EndFunction
|
||||||
|
|
||||||
|
Function ВыполнитьКоманду(Val Соединение, Val Комманда, Val Аргумент = 1, Val База = Undefined, Val Данные = Undefined) Export
|
||||||
|
Return ExecuteCommand(Соединение, Комманда, Аргумент, База, Данные);
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
Function ПолучитьСписокБаз(Val Соединение) Export
|
||||||
|
Return GetListOfBases(Соединение);
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
Function ПолучитьБазуДанных(Val Соединение, Val База = Undefined) Export
|
||||||
|
Return GetDatabase(Соединение, База);
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
Function УдалитьБазуДанных(Val Соединение, Val База = Undefined) Export
|
||||||
|
Return DeleteDatabase(Соединение, База);
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
Function СоздатьКоллекцию(Val Соединение, Val Наименование, Val База = Undefined, Val Параметры = Undefined) Export
|
||||||
|
Return CreateCollection(Соединение, Наименование, База, Параметры);
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
Function УдалитьКоллекцию(Val Соединение, Val Коллекция, Val База = Undefined) Export
|
||||||
|
Return DeleteCollection(Соединение, Коллекция, База);
|
||||||
|
EndFunction
|
||||||
|
|
||||||
#EndRegion
|
#EndRegion
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user