-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor app contracts and add documentation for use cases #398
refactor app contracts and add documentation for use cases #398
Commits on Jul 2, 2024
-
Remove Bitrix24Account contracts
Deleted the Bitrix24Account contracts: Bitrix24AccountInterface, Bitrix24AccountRepositoryInterface, and Bitrix24AccountStatus. This is part of a broader refactor of the Bitrix24\SDK\Application\Contracts as noted in the changelog. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 074556e - Browse repository at this point
Copy the full SHA 074556eView commit details
Commits on Jul 3, 2024
-
Add Bitrix24AccountInterface and Bitrix24AccountStatus
Added two new PHP classes under the directory src/Application/Contracts/Bitrix24Accounts/Entity. `Bitrix24AccountInterface` provides an interface for handling Bitrix24 account related operations. `Bitrix24AccountStatus` is an enumeration that defines possible statuses for a Bitrix24 account. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ec85cca - Browse repository at this point
Copy the full SHA ec85ccaView commit details
Commits on Jul 4, 2024
-
Remove numerous obsolete documentation files
The commit involves the deletion of several redundant files related to the documentation of the project. The files were scattered across different sections like Core, Results, Events, and Application. They consisted of guidelines for adding new functionality, usage of different features, and instructions for tasks like Authorization on the portal. These files were not serving any purpose and cluttering the repository, hence removed. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 86ab8a2 - Browse repository at this point
Copy the full SHA 86ab8a2View commit details -
Add Bitrix24AccountRepositoryInterface and update exceptions in Bitri…
…x24AccountInterface A new file, Bitrix24AccountRepositoryInterface, has been created which defines the methods to interact with Bitrix24 account data in a data store. Additionally, the Bitrix24AccountInterface has been updated to throw an InvalidArgumentException where needed to make error handling more explicit and robust. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1494ffe - Browse repository at this point
Copy the full SHA 1494ffeView commit details -
Rename AccessToken to AuthToken and refactor related codes
The AccessToken class has been renamed to AuthToken. This was accompanied by the renaming and modification of related methods, variables, and usages across multiple files. A new file was created, RenewedAuthToken.php, while the old RenewedAccessToken.php was deleted. WebhookUrl usage has also been adjusted. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4f36a8c - Browse repository at this point
Copy the full SHA 4f36a8cView commit details -
Update import paths and references in ServiceBuilderFactory
This commit adjusts various import paths in the ServiceBuilderFactory class and updates the corresponding references in the code. The AccessToken import and references have been changed to AuthToken. The Bitrix24AccountInterface has been moved to another directory and the changes have been reflected. Certain use statements for exceptions have also been added. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a8cd3ae - Browse repository at this point
Copy the full SHA a8cd3aeView commit details -
Replace AccessToken with AuthToken
The AccessToken class has been replaced with the AuthToken class across several modules. This includes changes in method arguments, object initializations, and class properties. The goal is to maintain consistency throughout the application by using the newly introduced AuthToken class. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9a8c297 - Browse repository at this point
Copy the full SHA 9a8c297View commit details -
Replace AccessToken with AuthToken in tests
The code changes replace the usage of AccessToken with AuthToken in the Core and Credentials test files. The AccessToken class is replaced globally with the AuthToken class to reflect changes or improvements in the authorization process. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 757a7aa - Browse repository at this point
Copy the full SHA 757a7aaView commit details -
Refactor authToken parameters in Core classes
The authToken parameters in the Core classes 'RenewedAuthToken' and 'Credentials' have been refactored. In 'RenewedAuthToken', unnecessary authToken and applicationStatus parameters were removed. In 'Credentials', variable name 'accessToken' was changed to 'authToken' for consistency and clarity. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 26e3a34 - Browse repository at this point
Copy the full SHA 26e3a34View commit details -
Add Bitrix24AccountInterface test entity implementation
A new file containing a test implementation of the Bitrix24AccountInterface has been added, which includes methods for checking user status, managing authentication tokens, updating domain URL, and handling application installation and upgrade cases. The created tests help ensure the functionality and reliability of the system with Bitrix24Accounts. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b60fbd1 - Browse repository at this point
Copy the full SHA b60fbd1View commit details
Commits on Jul 6, 2024
-
Update bitrix24 account interface and other related tests
Renamed the testing and reference implementation classes of Bitrix24AccountInterface and adjusted the methods due to changes in their behavior. Also added new methods for ApplicationStatus testing. This refactoring is important to ensure accurate testing and representation of our Bitrix24Accounts and their statuses. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c8612c9 - Browse repository at this point
Copy the full SHA c8612c9View commit details -
Update method in ApplicationStatusTest
The test method in ApplicationStatusTest.php has been updated from checking if the application status is local to checking if it is a subscription. This change will ensure that the unit tests are accurately reflecting the application's subscription status. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e4e36a8 - Browse repository at this point
Copy the full SHA e4e36a8View commit details -
Add sorting and equality function to Scope
The commit includes the addition of a sorting step in the Scope constructor that ensures that the order of scope values is consistent. Also, a new method 'equal' has been added to compare if two scope instances are equal based on their values. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b460b22 - Browse repository at this point
Copy the full SHA b460b22View commit details -
Add new test case and refactor ScopeTest
Added test case 'testEqual' to enhance the coverage of code in ScopeTest. Simplified the occurrences of UnknownScopeCodeException in all test cases, and corrected the order of scope codes inside the 'testInitFromString' test case. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5da2ef1 - Browse repository at this point
Copy the full SHA 5da2ef1View commit details -
Add additional tests and improve account status change
This update adds more unit tests to validate application behavior. Particularly, tests for methods like 'isApplicationTokenValid', 'getCreatedAt', and 'getUpdatedAt' have been included. Also, the account status change from 'active' to 'blocked' has been corrected. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d04c08a - Browse repository at this point
Copy the full SHA d04c08aView commit details -
Refactor tests and classes to use PHP attributes
This commit updates all test cases to use native PHP8 attribute syntax instead of comments for PHPUnit annotations. The method visibility has also been adjusted to be compliant with the PHPUnit v9. Additionally, multiple unnecessary comment blocks have been removed from the source codes for better readability. All changes have been made across various classes and test cases. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2afc7d6 - Browse repository at this point
Copy the full SHA 2afc7d6View commit details
Commits on Jul 7, 2024
-
Refactor AccessToken to AuthToken in SDK tests
The AccessToken and related classes and interfaces have been replaced with AuthToken and relevant entities across the SDK tests. The main aim was to unify the nomenclature and make it more expressive and intuitive. For instance, the AccessTokenFileStorage has been renamed to AuthTokenFileStorage, and methods and variables have been renamed accordingly. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ed0aeda - Browse repository at this point
Copy the full SHA ed0aedaView commit details -
Add AuthTokenRepositoryInterface
An interface AuthTokenRepositoryInterface has been added under the ApplicationBridge in tests. At the same time, an unnecessary use statement, AccessTokenFileStorage, has been removed from Fabric.php in Integration tests. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 02e9278 - Browse repository at this point
Copy the full SHA 02e9278View commit details -
Add Bitrix24Accounts documentation
Created a new documentation file for the Bitrix24Accounts in the Application Contracts. This documentation includes an account state diagram and a detailed breakdown of repository methods. Each method is explained with its associated use cases to aid in understanding and implementation. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 075a612 - Browse repository at this point
Copy the full SHA 075a612View commit details -
Add Bitrix24Accounts documentation
Created a new documentation file for the Bitrix24Accounts in the Application Contracts. This documentation includes an account state diagram and a detailed breakdown of repository methods. Each method is explained with its associated use cases to aid in understanding and implementation. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c98cbd7 - Browse repository at this point
Copy the full SHA c98cbd7View commit details -
Update Bitrix24AccountRepositoryInterface with new methods
This commit expands the Bitrix24AccountRepositoryInterface with new methods for handling Bitrix24 accounts. It includes methods for saving and deleting Bitrix24 accounts, and for fetching accounts by id or specific characteristics. This update provides enhanced functionality to interact with Bitrix24 account data, from basic CRUD operations to more granular lookups based on account status and attributes. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6998a36 - Browse repository at this point
Copy the full SHA 6998a36View commit details -
Update Bitrix24Accounts documentation
The documentation for Bitrix24Accounts has been revised. A summary line has been added to better provide context and understandability to its content. It now contains a clear brief about storing auth tokens and methods for working with a Bitrix24 account. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 93bf2aa - Browse repository at this point
Copy the full SHA 93bf2aaView commit details
Commits on Jul 10, 2024
-
Add Bitrix24Account Events and update documentation
Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a362fa3 - Browse repository at this point
Copy the full SHA a362fa3View commit details
Commits on Jul 13, 2024
-
Add contact person entities and interface, update dependencies
Added new entities for "FullName" and "ContactPersonStatus", alongside an interface for "ContactPerson" under the Contracts namespace. Also, sample entity implementation has been added for testing purposes only. Dependencies in composer.json have also been updated to include necessary libraries and tools for these new implementations. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 60bac53 - Browse repository at this point
Copy the full SHA 60bac53View commit details
Commits on Jul 21, 2024
-
Update DemoDataGenerator and ContactPerson entity methods
Expanded the DemoDataGenerator class to improve test data variety. Added additional methods to generate random but realistic data. Created a new ContactPerson entity method for marking a user as deleted, enhancing the functionality for manipulations with user status. Updated corresponding tests to cover new features. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for cca7f46 - Browse repository at this point
Copy the full SHA cca7f46View commit details -
Add InMemoryContactPersonRepositoryImplementation and tests
This commit introduces the InMemoryContactPersonRepositoryImplementation class, which provides an in-memory implementation of the ContactPersonRepositoryInterface. It also includes associated unit test cases to ensure that the implementation behaves as expected. This mainly assists developers in the process of testing without needing a real database. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 269db81 - Browse repository at this point
Copy the full SHA 269db81View commit details -
Update method calls in InfoCallTest
Updated method calls in InfoCall tests to use `getNationalNumber()` from `DemoDataGenerator::getMobilePhone()`. This change ensures we're passing the correct format of mobile phone number to `startWithText` and `startWithSound` methods. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9985327 - Browse repository at this point
Copy the full SHA 9985327View commit details -
Refactor code for improved readability and consistency
A variety of changes have been made across several files to enhance readability and optimize semantics. This includes implementing the Stringable interface in the FullName class and cleaning up variable names to be more descriptive. Additionally, unnecessary comments have been removed and elements in the Scope class are now transformed to lowercase in a more concise way. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0e9e091 - Browse repository at this point
Copy the full SHA 0e9e091View commit details -
Refactor variable names for better clarity
This commit refactors several variable names across multiple methods in the codebase to increase readability. Changes include renaming "item" to "contactPerson", "userRepository" to "userRepo", "mobilePhone" to "phoneNumber" among others. The objective is to ensure that the names are meaningful and accurately reflect their purpose within the code. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 48d9e99 - Browse repository at this point
Copy the full SHA 48d9e99View commit details -
Update ContactPersonRepository findByExternalId method
The method findByExternalId within the ContactPersonRepository has been expanded to account for various scenarios. It now checks for empty ExternalId input and returns an array, instead of a single output, because a contact person can have multiple installations across different portals. Associated tests have been added or updated accordingly. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 85a0ab7 - Browse repository at this point
Copy the full SHA 85a0ab7View commit details -
Update variable names for clarity
Updated variable names in various telephony test files for a better understanding of the return value being reflected. The new names specifically indicate the action taken and the result received, making the purpose of each test step clearer. This change upholds the quality of the codebase by promoting readability and maintainability. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c8631b5 - Browse repository at this point
Copy the full SHA c8631b5View commit details -
Add PHPStan ignore line to test
A line to ignore PHPStan analysis was added to the `findByExternalId('')` method call in the `ContactPersonRepositoryInterfaceTest.php` test. This annotative change helps to suppress the PHPStan error that's triggered by this particular line of testing code. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5707f4c - Browse repository at this point
Copy the full SHA 5707f4cView commit details -
The settings for failOnRisky and failOnWarning within PHPUnit configurations have been updated from true to false. This change allows tests to continue running even if there are risks or warnings, giving the opportunity to see a comprehensive list of all issues rather than stopping at the first one encountered. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 94cb6d5 - Browse repository at this point
Copy the full SHA 94cb6d5View commit details -
Refactor test files and update phpunit configuration
Test file renaming and reorganizing has been done to streamline namespaces. Additionally, the phpunit configuration has been updated to fail on risky tests. Unused imports have also been removed from various test files, improving code readability. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b94e677 - Browse repository at this point
Copy the full SHA b94e677View commit details
Commits on Jul 22, 2024
-
Add ContactPerson event classes and documentation
Created new event classes for the ContactPerson entity in the Application Contracts layer, aimed to deal with various situations such as contact creation, block, unblock, or deletion. Also included is the full documentation file describing ContactPerson's methods, states, repository methods, and events. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 00a3f89 - Browse repository at this point
Copy the full SHA 00a3f89View commit details
Commits on Jul 23, 2024
-
Add application installation interface and Bitrix24 ID to contact person
This update adds an application installation interface for setting up interactions between the application and the Bitrix24 API. A Bitrix24 user ID field is also added to the contact person interface. This modification extends the functionality of the contact person, enabling more advanced data tracking. The new ID field maps a Bitrix24 user with a contact person, if there is any association. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e6ff656 - Browse repository at this point
Copy the full SHA e6ff656View commit details
Commits on Jul 24, 2024
-
Add application installation status handling
Implemented detailed application installation status management in the `ApplicationInstallationInterface` with corresponding methods. Introduced `ApplicationInstallationStatus` enum to define possible states. Included updates to contact person handling and external ID management. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e4ec9ba - Browse repository at this point
Copy the full SHA e4ec9baView commit details
Commits on Jul 26, 2024
-
Add Bitrix24 partner ID handling to contact persons
Introduced the ability to set and get the Bitrix24 partner ID for contact persons. Updated tests and documentation to support this new functionality, ensuring comprehensive test coverage and proper documentation. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5225c39 - Browse repository at this point
Copy the full SHA 5225c39View commit details -
Add bitrix24PartnerId/Uuid to ContactPerson entities
Extended the ContactPerson entities and their respective tests to include the bitrix24PartnerId/UUid field. This change ensures that we can store and retrieve Bitrix24 partner UUIDs for contact persons, enhancing our data handling capabilities. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 002cb45 - Browse repository at this point
Copy the full SHA 002cb45View commit details
Commits on Jul 27, 2024
-
Add ApplicationInstallation reference entity implementation
Implemented ApplicationInstallationReferenceEntityImplementation for testing ApplicationInstallationInterface. Updated ApplicationInstallationInterface with new methods for managing portal license family and users count. Added tests to validate the new implementation and methods. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 072522b - Browse repository at this point
Copy the full SHA 072522bView commit details -
Add validation and update tests for application status
Introduce validation logic to check the status before changing application installation status to active or deleted. Also, added extensive unit tests to cover these new behaviors for better reliability and clarity. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a90c5b8 - Browse repository at this point
Copy the full SHA a90c5b8View commit details
Commits on Jul 28, 2024
-
Implement stricter status checks and extend test coverage
Added precondition checks for application status changes. Enhanced documentation for clarity in interface methods with new constraints. Comprehensive tests for `markAsActive`, `markAsBlocked`, and other status-related methods were introduced to ensure correct behavior. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6ac7071 - Browse repository at this point
Copy the full SHA 6ac7071View commit details -
Add validation and repository interface for installations
Initialize 'comment' to null, validate 'externalId' input, and introduce ApplicationInstallationRepositoryInterface for persistence operations. Added new exception handling for application installation not found scenarios. Includes in-memory repository implementation and associated tests. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f837d4c - Browse repository at this point
Copy the full SHA f837d4cView commit details -
Add repository interface and tests for installations
Added a new method `getById` to `ApplicationInstallationRepositoryInterface`. Renamed the test path prefix to `Unit`. Included various new tests for application installations, updating and reorganizing the existing structure. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9abee5e - Browse repository at this point
Copy the full SHA 9abee5eView commit details
Commits on Jul 30, 2024
-
Add Bitrix24Partner status and interface
Introduced the `Bitrix24PartnerStatus` enum to define partner statuses, and a `Bitrix24PartnerInterface` to standardize partner management operations, including partner creation, status changes, and retrieving partner information. This standardization aims to streamline interactions with Bitrix24 partner entities. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4da0f91 - Browse repository at this point
Copy the full SHA 4da0f91View commit details
Commits on Aug 6, 2024
-
Add Bitrix24 Partners Repository and Entity Implementation
Introduce Bitrix24 Partner entity classes and a repository interface with in-memory implementations for testing. Added tests cover save, delete, getById, and associated functions to ensure data persistence operations work correctly. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 35f136d - Browse repository at this point
Copy the full SHA 35f136dView commit details -
Bump phpstan version to 1.11.7
Locking the phpstan version to 1.11.7 ensures stable and consistent builds. This change avoids potential issues from future updates to the phpstan package. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 509f3de - Browse repository at this point
Copy the full SHA 509f3deView commit details -
Switch to NullLogger for InMemory repository implementations
Replaced Fabric::getLogger with Psr\Log\NullLogger in multiple InMemory repository implementations for consistent logging behavior in unit tests. Adjusted test suite configuration to display warnings. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 64e7577 - Browse repository at this point
Copy the full SHA 64e7577View commit details -
Enhance README with formatting and additional details
Updated README for better clarity and readability by adjusting formatting and adding new sections. Improved instructions for running tests and included additional examples for application setup in Bitrix24. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b890fc4 - Browse repository at this point
Copy the full SHA b890fc4View commit details