Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
af6a265
This is the first implementation for biconnector.connector methods
Algonexys May 7, 2026
0f38abe
Fix list method parameters and uses lowercase id
Algonexys May 8, 2026
a03f5b5
Fix the fields for the add connector method
Algonexys May 8, 2026
d5ff82d
Fix adding connector
Algonexys May 13, 2026
6eb3143
Done biconnector.connector
Algonexys May 13, 2026
87a8298
Change author email
Algonexys May 13, 2026
51fb4bb
This is the first implementation for biconnector.source methods
Algonexys May 14, 2026
64cbcc1
Add the page parameter to the list method, and minor fix
Algonexys May 14, 2026
0f48813
Change parameters of connector and source tests
Algonexys May 15, 2026
bebede0
Fix biconnector.source.update test. Done biconnector.source
Algonexys May 18, 2026
3d867ad
Add Dataset service for biconnector.dataset.* support (#469)
Algonexys May 19, 2026
9f8c651
Remove biconnector task plan
Algonexys May 19, 2026
ceaa9cc
Fix list method parameters and use lowercase id for biconnector.datas…
Algonexys May 19, 2026
61f7dcc
Add the values to the fields of the source and dataset methods
Algonexys May 20, 2026
c80b2a0
Change the values to the fields of the dataset methods
Algonexys May 20, 2026
19d0d85
Skip biconnector tests that require additional external services
Algonexys May 20, 2026
ae0c8e7
Merge branch 'v3-dev' into feature/469-add-biconnector-v3
Algonexys May 21, 2026
699428c
Minor fix
Algonexys May 21, 2026
b5f9815
Merge branch 'v3-dev' into feature/469-add-biconnector-v3
Algonexys May 25, 2026
8f0a4f9
Move AbstractItem to AbstractAnnotatedItem
Algonexys May 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,39 @@

### Added

- Added service `Services\Biconnector\Dataset` with support methods,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to. 3.3.0 release

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

see [biconnector.dataset.* methods](https://apidocs.bitrix24.com/api-reference/biconnector/dataset/index.html) ([#469](https://github.com/bitrix24/b24phpsdk/issues/469)):
- `add` adds a new dataset, with batch calls support
- `update` updates an existing dataset description, with batch calls support
- `get` gets information about the dataset by its identifier
- `list` gets the list of datasets, with batch calls support
- `delete` deletes a dataset, with batch calls support
- `fields` returns the fields description
- `updateFields` adds, updates visibility of, or deletes individual dataset columns (`biconnector.dataset.fields.update`)
- `count` counts datasets
- Added `dataset()` accessor to `BiconnectorServiceBuilder` ([#469](https://github.com/bitrix24/b24phpsdk/issues/469))
- Added service `Services\Biconnector\Source` with support methods,
see [biconnector.source.* methods](https://apidocs.bitrix24.com/api-reference/biconnector/source/index.html) ([#469](https://github.com/bitrix24/b24phpsdk/issues/469)):
- `add` adds a new data source, with batch calls support
- `update` updates an existing data source, with batch calls support
- `get` gets information about the data source by its identifier
- `list` gets the list of data sources, with batch calls support
- `delete` deletes a data source, with batch calls support
- `fields` returns the fields description
- `count` counts data sources
- Added `source()` accessor to `BiconnectorServiceBuilder` ([#469](https://github.com/bitrix24/b24phpsdk/issues/469))
- Added service `Services\Biconnector\Connector` with support methods,
see [biconnector.connector.* methods](https://github.com/bitrix24/b24phpsdk/issues/469):
- `add` adds a new connector, with batch calls support
- `update` updates an existing connector, with batch calls support
- `get` gets information about the connector by its identifier
- `list` gets the list of connectors, with batch calls support
- `delete` deletes a connector, with batch calls support
- `fields` returns the fields description
- `count` counts connectors
- Added `Bitrix24\SDK\Services\Biconnector\BiconnectorServiceBuilder` with `connector()` accessor ([#469](https://github.com/bitrix24/b24phpsdk/issues/469))
- Added `Bitrix24\SDK\Services\ServiceBuilder::getBiconnectorScope()` method ([#469](https://github.com/bitrix24/b24phpsdk/issues/469))

### Changed

### Fixed
Expand Down
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,22 @@ integration_tests_crm_documentgenerator_document:
integration_tests_crm_documentgenerator_template:
docker compose run --rm php-cli vendor/bin/phpunit --testsuite integration_tests_crm_documentgenerator_template

.PHONY: test-integration-scope-biconnector
test-integration-scope-biconnector:
docker compose run --rm php-cli vendor/bin/phpunit --testsuite integration_tests_scope_biconnector

.PHONY: test-integration-biconnector-connector
test-integration-biconnector-connector:
docker compose run --rm php-cli vendor/bin/phpunit --testsuite integration_tests_biconnector_connector

.PHONY: test-integration-biconnector-source
test-integration-biconnector-source:
docker compose run --rm php-cli vendor/bin/phpunit --testsuite integration_tests_biconnector_source

.PHONY: test-integration-biconnector-dataset
test-integration-biconnector-dataset:
docker compose run --rm php-cli vendor/bin/phpunit --testsuite integration_tests_biconnector_dataset

# work dev environment
.PHONY: php-dev-server-up
php-dev-server-up:
Expand Down
15 changes: 15 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,21 @@
<file>./tests/Integration/Services/Rest/Service/ScopeTest.php</file>
<file>./tests/Integration/Services/Rest/Result/ScopeMethodItemResultTest.php</file>
</testsuite>
<testsuite name="integration_tests_scope_biconnector">
<directory>./tests/Integration/Services/Biconnector/</directory>
</testsuite>
<testsuite name="integration_tests_biconnector_connector">
<directory>./tests/Integration/Services/Biconnector/Connector/Service/</directory>
<directory>./tests/Integration/Services/Biconnector/Connector/Result/</directory>
</testsuite>
<testsuite name="integration_tests_biconnector_source">
<directory>./tests/Integration/Services/Biconnector/Source/Service/</directory>
<directory>./tests/Integration/Services/Biconnector/Source/Result/</directory>
</testsuite>
<testsuite name="integration_tests_biconnector_dataset">
<directory>./tests/Integration/Services/Biconnector/Dataset/Service/</directory>
<directory>./tests/Integration/Services/Biconnector/Dataset/Result/</directory>
</testsuite>
</testsuites>
<source>
<include>
Expand Down
103 changes: 103 additions & 0 deletions src/Services/Biconnector/BiconnectorServiceBuilder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?php

/**
* This file is part of the bitrix24-php-sdk package.
*
* © Dmitriy Ignatenko <algonexys@gmail.com>
*
* For the full copyright and license information, please view the MIT-LICENSE.txt
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Bitrix24\SDK\Services\Biconnector;

use Bitrix24\SDK\Attributes\ApiServiceBuilderMetadata;
use Bitrix24\SDK\Core\Credentials\Scope;
use Bitrix24\SDK\Services\AbstractServiceBuilder;
use Bitrix24\SDK\Services\Biconnector\Connector\Batch as ConnectorBatch;
use Bitrix24\SDK\Services\Biconnector\Connector\Service\Batch;
use Bitrix24\SDK\Services\Biconnector\Connector\Service\Connector;
use Bitrix24\SDK\Services\Biconnector\Dataset\Batch as DatasetBatch;
use Bitrix24\SDK\Services\Biconnector\Dataset\Service\Batch as DatasetServiceBatch;
use Bitrix24\SDK\Services\Biconnector\Dataset\Service\Dataset;
use Bitrix24\SDK\Services\Biconnector\Source\Batch as SourceBatch;
use Bitrix24\SDK\Services\Biconnector\Source\Service\Batch as SourceServiceBatch;
use Bitrix24\SDK\Services\Biconnector\Source\Service\Source;

#[ApiServiceBuilderMetadata(new Scope(['biconnector']))]
class BiconnectorServiceBuilder extends AbstractServiceBuilder
{
/**
* Get the Connector service
*
* Uses a specialized ConnectorBatch to handle biconnector.connector.* REST API differences:
* - list uses 'page' parameter (page number) instead of standard 'start' (offset)
* - delete uses lowercase 'id' instead of 'ID'
*/
public function connector(): Connector
{
if (!isset($this->serviceCache[__METHOD__])) {
// Use specialized Batch for Connector to ensure correct REST parameter mapping
$connectorBatch = new ConnectorBatch(
$this->core,
$this->log
);
$this->serviceCache[__METHOD__] = new Connector(
new Batch($connectorBatch, $this->log),
$this->core,
$this->log
);
}

return $this->serviceCache[__METHOD__];
}

/**
* Get the Dataset service
*
* Uses a specialized DatasetBatch to handle biconnector.dataset.* REST API differences:
* - list uses 'page' parameter (page number) instead of standard 'start' (offset)
* - delete uses lowercase 'id' instead of 'ID'
*/
public function dataset(): Dataset
{
if (!isset($this->serviceCache[__METHOD__])) {
$datasetBatch = new DatasetBatch(
$this->core,
$this->log
);
$this->serviceCache[__METHOD__] = new Dataset(
new DatasetServiceBatch($datasetBatch, $this->log),
$this->core,
$this->log
);
}

return $this->serviceCache[__METHOD__];
}

/**
* Get the Source service
*
* Uses a specialized SourceBatch to handle biconnector.source.* REST API differences:
* - delete uses lowercase 'id' instead of 'ID'
*/
public function source(): Source
{
if (!isset($this->serviceCache[__METHOD__])) {
$sourceBatch = new SourceBatch(
$this->core,
$this->log
);
$this->serviceCache[__METHOD__] = new Source(
new SourceServiceBatch($sourceBatch, $this->log),
$this->core,
$this->log
);
}

return $this->serviceCache[__METHOD__];
}
}
Loading
Loading