Skip to content

Releases: bitrix24/b24phpsdk

1.2.0

04 Dec 19:41
67d8b0c
Compare
Choose a tag to compare

Added

  • Added service CRM\Company\Service with support methods, see add crm.company.* methods:
    • get get company by id
    • add add new company with batch support
    • delete delete company by id with batch support
    • list get list of companies with batch support
    • update update companies with batch support
    • countByFilter count companies count with filter
  • Added service CRM\Company\Service\CompanyUserfield with support methods, see add crm.company.* methods:
    • add add userfield to company
    • get get userfield to company
    • list list userfields
    • delete delete userfield
    • update update userfield
  • Added service CRM\Company\Service\CompanyCompanyContact with support methods, see add crm.company.* methods:
    • fields get fiels for company contact connection
    • setItems set contacts related with company
    • get get contacts related to company
    • deleteItems delete all relations for company
    • add add contact relation with company
    • delete delete contact relation with company
  • Added service CRM\Company\Service\CompanyDetailsConfiguration with support methods, see add crm.company.* methods:
    • getPersonal method retrieves the settings of company cards for personal user
    • getGeneral method retrieves the settings of company cards for all users
    • resetPersonal method reset for item user settings
    • resetGeneral method reset all card settings for all users
    • setPersonal method set card configuration
    • setGeneral method set card configuration for all company
    • setForceCommonConfigForAll method set common detail form for All Users
  • Added support for events:
    • OnCrmCompanyAdd
    • OnCrmCompanyDelete
    • OnCrmCompanyUpdate
    • OnCrmCompanyUserFieldAdd
    • OnCrmCompanyUserFieldDelete
    • OnCrmCompanyUserFieldSetEnumValues
    • OnCrmCompanyUserFieldUpdate
  • Added service CRM\Enum\Service\Enum with support methods:
    • activityStatus
    • activityNotifyType
    • activityPriority
    • activityDirection
    • activityType
    • addressType
    • contentType
    • orderOwnerTypes
    • settingsMode
    • fields
    • ownerType
  • Added enums:
    • Bitrix24\SDK\Services\CRM\Enum\AddressType
    • Bitrix24\SDK\Services\CRM\Enum\ContentType
    • Bitrix24\SDK\Services\CRM\Enum\CrmSettingsMode
  • Added methods for filtration entity fields in Bitrix24\SDK\Core\Fields\FieldsFilter:
    • Bitrix24\SDK\Core\Fields\FieldsFilter::filterUserFields
    • Bitrix24\SDK\Core\Fields\FieldsFilter::filterSmartProcessFields
  • Added method Bitrix24AccountRepositoryInterface::findByApplicationToken in contracts for
    support «Delete Application» use case
  • Added Bitrix24\SDK\Application\Contracts\Bitrix24Accounts\Exceptions\MultipleBitrix24AccountsFoundException
  • Added nullable comments in events Bitrix24AccountBlockedEvent and Bitrix24AccountUnblockedEvent,
    see add comment to events.
  • Add result type Bitrix24\SDK\Services\CRM\Common\Result\SystemFields\Types\File
  • Add exception Bitrix24\SDK\Core\Exceptions\ItemNotFoundException
  • In ApiLevelErrorHandler added processing API response error_not_found error code.
  • Added fields for Bitrix24\SDK\Services\CRM\Deal\Result\DealItemResult:
    • int|null $ASSIGNED_BY_ID
    • array|null $CONTACT_IDS
    • int|null $CREATED_BY_ID
    • CarbonImmutable $DATE_CREATE
    • CarbonImmutable $DATE_MODIFY
    • int|null $LAST_ACTIVITY_BY
    • CarbonImmutable $LAST_ACTIVITY_TIME
    • int|null $MODIFY_BY_ID
    • int|null $MOVED_BY_ID
    • CarbonImmutable $MOVED_TIME
  • Added service Bitrix24\SDK\Services\CRM\Userfield\Service\UserfieldConstraints for check userfield naming rules.
  • Developer experience: added example /examples/local-app-workflows for demonstrate work
    with workflows.
  • Developer experience: added cli make command make dev-show-fields-description for show typehints for methods arguments from bitrix24 types from *.fields method
  • Developer experience: added in CI pipeline check for allowed licenses in composer package dependencies: only MIT,
    BSD-3-Clause, Apache.
  • Developer experience: added in CI pipeline unit-tests on Windows Server 2022 in GitHub actions and updated
    installation instructions for Windows-based systems.
  • Developer experience: start move make commands to docker
  • Developer experience: added attribute Bitrix24\SDK\Attributes\ApiServiceBuilderMetadata for document service builders per scope
  • Developer experience: added trait with asserts Bitrix24\SDK\Tests\CustomAssertions\CustomBitrix24Assertions for additional checks in php-unit with methods:
    • assertBitrix24AllResultItemFieldsAnnotated - for check phpdoc annotations and result of *.fields command
    • assertBitrix24AllResultItemFieldsHasValidTypeAnnotation - for check phpdoc annotations and bitrix24 custom types
      mapping
  • Developer experience: added file .gitattributes with config to export data when you use composer flags
    --prefer-source and --prefer-dist
  • Developer experience: start use PhpCsFixer in some project folders.

Changed

  • Added nullable argument bitrix24UserId in method Bitrix24AccountRepositoryInterface::findByMemberId in contracts
    for support use case «RenewAuthToken»
  • Developer experience: moved CLI-command GenerateCoverageDocumentationCommand to namespace
    Bitrix24\SDK\Infrastructure\Console\Commands\Documentation

Fixed

  • Fixed errors in Bitrix24\SDK\Services\Workflows\Common\WorkflowDocumentId, see parsing errors.
  • Fixed the problem with mismatch Deals fields in API and SDK, see Increasing code coverage with annotations.
  • Fixed error in Bitrix24\SDK\Core\Fields\FieldsFilter::filterSystemFields, see filtration errors.
  • Fixed error in contract tests design, see bitrix24AccountRepositoryInterface has problem with contract tests design - can't add flusher.
  • Fixed error in bitrix24 account contract test data provider, see incorrect data in data provider.
  • ❗️BC Fixed typehints and return types in ActivityItemResult, ContactItemResult, see wrong type hints in ActivityItemResult
  • Fixed error in method Bitrix24\SDK\Core\Fields\FieldsFilter::filterSystemFields for product user fields case.
  • ❗️BC Fixed typehints and return types in Bitrix24\SDK\Services\CRM\Lead\Result\LeadItemResult
    see wrong typehints in LeadItemResult:
    • CURRENCY_ID stringCurrency|null
    • OPPORTUNITY stringMoney|null
    • IS_MANUAL_OPPORTUNITY stringbool|null
    • OPENED stringbool|null
    • HAS_PHONE stringbool|null
    • HAS_EMAIL stringbool|null
    • HAS_IMOL stringbool|null
    • ASSIGNED_BY_ID stringint|null
    • CREATED_BY_ID stringint|null
    • MODIFY_BY_ID stringint|null
    • MOVED_BY_ID stringint|null
    • DATE_CREATE stringCarbonImmutable|null
    • DATE_MODIFY stringCarbonImmutable|null
    • MOVED_TIME stringCarbonImmutable|null
    • COMPANY_ID stringint|null
    • CONTACT_ID stringint|null
    • CONTACT_IDS stringarray|null
    • IS_RETURN_CUSTOMER stringbool|null
    • DATE_CLOSED stringCarbonImmutable|null
    • LAST_ACTIVITY_BY stringint|null
    • LAST_ACTIVITY_TIME stringCarbonImmutable|null
  • ❗️BC Fixed typehints and return types in Bitrix24\SDK\Services\CRM\Product\Result\ProductItemResult:
    • PRICE stringMoney
    • CURRENCY_ID stringCurrency
    • ACTIVE stringbool
    • VAT_INCLUDED stringbool
    • DATE_CREATE stringCarbonImmutable
    • TIMESTAMP_X stringCarbonImmutable
  • ❗️BC Fixed typehints and return types in Bitrix24\SDK\Services\CRM\Userfield\Result\AbstractUserfieldItemResult:
    • ID stringint
    • SORT stringint
    • MULTIPLE stringbool
    • MANDATORY stringbool
    • SHOW_FILTER stringbool
    • SHOW_IN_LIST stringbool
    • EDIT_IN_LIST stringbool
    • IS_SEARCHABLE stringbool

Deprecated

  • Deprecated class RemoteEventsFabric use RemoteEventsFactory
  • Deprecated class ApplicationLifeCycleEventsFabric use ApplicationLifeCycleEventsFactory
  • Deprecated class TelephonyEventsFabric use TelephonyEventsFactory

Statistics

Bitrix24 API-methods count: 1135
Supported in bitrix24-php-sdk methods count: 191
Coverage percentage: 16.83% 🚀
Supported in bitrix24-php-sdk methods with batch wrapper count: 22

Contributors

1.1.0

24 Sep 19:45
8ad158f
Compare
Choose a tag to compare

What's Changed

Added

  • Added class Bitrix24\SDK\Services\RemoteEventsFabric for simple work with builtin Bitrix24 events. You can create
    Bitrix24 events from Symfony\Component\HttpFoundation\Request object. If event is not supported in SDK, fabric will
    create Bitrix24\SDK\Core\Requests\Events\UnsupportedRemoteEvent with generic interface
    Bitrix24\SDK\Core\Contracts\Events\EventInterface without typehints. Every event checked with valid
    application_token signature.
  • Added method Bitrix24\SDK\Services\ServiceBuilderFactory::createServiceBuilderFromWebhook for simple work with
    webhook, see add super-simple kick-off guide.
  • Added method Bitrix24\SDK\Services\ServiceBuilderFactory::createServiceBuilderFromPlacementRequest for simple work
    with placement request, see add super-simple kick-off guide.
  • Added Bitrix24\SDK\Core\Contracts\Events\EventsFabricInterface for scope-based event fabrics.
  • Added Bitrix24\SDK\Core\Requests\Events\UnsupportedEvent as a default event container object for unsupported in SDK
    Bitrix24 events.
  • Added helpers for build local application in namespace Bitrix24\SDK\Application\Local:
    • Local\Entity\LocalAppAuth: auth data for local application. Contains: AuthToken, domainUrl and
      applicationToken.
    • Local\Infrastructure\Filesystem\AppAuthFileStorage: class for store LocalAppAuth in file
    • Local\Repository\LocalAppAuthRepositoryInterface: interface for LocalAppAuthRepository.
  • Developer experience: added example /examples/local-app-with-token-storage for demonstrate all options for work with SDK and created local application skeleton.
  • Developer experience: added example /examples/webhook-error-handling for demonstrate exceptions handling.
  • Developer experience: added example /examples/local-app-placement for demonstrate work with placements.
  • Added WrongClientException for handle errors with wrong application client configuration.
  • Added PaymentRequiredException for handle errors with expired subscription.
  • Added WrongConfigurationException for handle errors with wrong application infrastructure configuration.
  • Added WrongSecuritySignatureException for handle errors with wrong signature events with application_token.
  • Added checks for empty string in args for constructor Bitrix24\SDK\Core\Credentials\ApplicationProfile
  • Added class Bitrix24\SDK\Application\Requests\Events\ApplicationLifeCycleEventsFabric
  • Documentation: added section Basic necessary knowledge in SDK documentation
  • Documentation: added section Call unsupported methods in SDK documentation
  • Developer experience: add issue template Ship new SDK release

Changed

  • ❗️moved interface EventInterface from Bitrix24\SDK\Application\Requests\Events to
    Bitrix24\SDK\Core\Contracts\Events
  • Changed order in expired_token case:
    • old: get new auth token → repeat api-call → emit event Bitrix24\SDK\Events\AuthTokenRenewedEvent for store token
    • new: get new auth token → emit event Bitrix24\SDK\Events\AuthTokenRenewedEvent for store token → repeat api-call
  • Changed dependencies for Bitrix24\SDK\Core\ApiClient - added class Bitrix24\SDK\Core\ApiLevelErrorHandler
  • Changed scope for properties Bitrix24\SDK\Core\Credentials\ApplicationProfile - mark as public
  • Changed scope for properties Bitrix24\SDK\Core\Credentials\AuthToken - mark as public
  • Changed example for work with webhook in README.md file and directory /examples/webhook/
  • Changed example for work with local application in README.md file and directory
    /examples/local-application/
  • Changed bitrix24-php-sdk version in headers in class Bitrix24\SDK\Core\ApiClient,
    see wrong API-client and sdk version in headers.
  • Changed scope for property core in Bitrix24\SDK\Services\AbstractServiceBuilder - for better DX,
    see Make core public in service builder.
  • Changed method name Bitrix24\SDK\Services\ServiceBuilderFactory::initFromRequest to
    Bitrix24\SDK\Services\ServiceBuilderFactory::init

Fixed

  • Fixed variable names in Bitrix24\SDK\Services\ServiceBuilderFactory::initFromRequest,
    see wrong variable name.
  • Fixed some corner cases in Bitrix24\SDK\Core\ApiLevelErrorHandler

1.0

04 Sep 20:32
b8b9216
Compare
Choose a tag to compare
1.0

What's Changed

  • Add issue and PR templates by @mesilov in #2
  • Add GitHub Actions workflow for PHPUnit tests by @mesilov in #5
  • Update SECURITY.md for supported versions and formatting by @mesilov in #6
  • Add development section and update method list in docs by @mesilov in #8
  • Update project details and dependencies in composer.json by @mesilov in #10

New Contributors

Full Changelog: https://github.com/bitrix24/b24phpsdk/commits/1.0