Skip to content

feat: added User Report Settings Templates support#265

Merged
andrii-bodnar merged 2 commits intomasterfrom
user-report-settings-templates
Mar 26, 2026
Merged

feat: added User Report Settings Templates support#265
andrii-bodnar merged 2 commits intomasterfrom
user-report-settings-templates

Conversation

@bhdnb
Copy link
Copy Markdown
Collaborator

@bhdnb bhdnb commented Mar 19, 2026

No description provided.

@bhdnb bhdnb self-assigned this Mar 19, 2026
@bhdnb bhdnb linked an issue Mar 19, 2026 that may be closed by this pull request
@bhdnb bhdnb marked this pull request as draft March 19, 2026 15:57
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.06%. Comparing base (8e24d5c) to head (036fb92).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #265      +/-   ##
============================================
+ Coverage     92.75%   93.06%   +0.31%     
- Complexity     1722     1787      +65     
============================================
  Files           163      169       +6     
  Lines          4644     4850     +206     
============================================
+ Hits           4307     4513     +206     
  Misses          337      337              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bhdnb bhdnb force-pushed the user-report-settings-templates branch from cc602d3 to 03cc944 Compare March 19, 2026 16:08
@bhdnb bhdnb force-pushed the user-report-settings-templates branch from 03cc944 to 2771256 Compare March 23, 2026 14:58
@bhdnb bhdnb marked this pull request as ready for review March 23, 2026 15:08
@bhdnb bhdnb requested a review from andrii-bodnar March 23, 2026 15:08
@andrii-bodnar andrii-bodnar requested a review from Copilot March 23, 2026 15:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for User Report Settings Templates to the Crowdin API PHP client, including new models for user-scoped templates and hourly-based rate configurations, plus corresponding API methods and tests.

Changes:

  • Introduce UserReportSettingsTemplate model and UserApi methods to list/create/get/update/delete user report settings templates.
  • Add hourly-specific config models (HourlyReportSettingsTemplateConfig, HourlyBaseRates, HourlyIndividualRates) and enable hours as a supported report unit.
  • Extend ReportSettingsTemplateConfig with additional boolean configuration flags and update test coverage accordingly.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/CrowdinApiClient/Model/UserReportSettingsTemplateTest.php New tests covering user template model hydration, setters, validation, and toArray().
tests/CrowdinApiClient/Model/ReportSettingsTemplateTest.php Updates fixture/config expectations and inlines assertions for loading.
tests/CrowdinApiClient/Model/ReportSettingsTemplateConfigTest.php Adds coverage for new boolean config flags and updates setter/load assertions.
tests/CrowdinApiClient/Model/HourlyReportSettingsTemplateConfigTest.php New tests for hourly config model (load/set/exception/toArray).
tests/CrowdinApiClient/Model/HourlyIndividualRatesTest.php New tests for hourly individual rates model behavior and validation.
tests/CrowdinApiClient/Model/HourlyBaseRatesTest.php New tests for hourly base rates model behavior and toArray().
tests/CrowdinApiClient/Api/UserApiTest.php Adds API tests for the new user report settings templates endpoints.
src/CrowdinApiClient/Model/UserReportSettingsTemplate.php New model representing a user report settings template with unit-dependent config.
src/CrowdinApiClient/Model/ReportSettingsTemplateConfig.php Adds new boolean config fields with getters/setters and includes them in toArray().
src/CrowdinApiClient/Model/Report.php Adds UNIT_HOURS and includes it in supported units.
src/CrowdinApiClient/Model/IndividualRates.php Docblock tightening (string[]) for setLanguageIds() parameter.
src/CrowdinApiClient/Model/HourlyReportSettingsTemplateConfig.php New hourly settings template config model (base + individual rates).
src/CrowdinApiClient/Model/HourlyIndividualRates.php New hourly individual rates model with validation and serialization.
src/CrowdinApiClient/Model/HourlyBaseRates.php New hourly base rates model with serialization.
src/CrowdinApiClient/Api/UserApi.php Adds user report settings templates CRUD methods.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bhdnb bhdnb force-pushed the user-report-settings-templates branch from 75de829 to 036fb92 Compare March 25, 2026 18:05
@andrii-bodnar andrii-bodnar merged commit a094315 into master Mar 26, 2026
13 checks passed
@andrii-bodnar andrii-bodnar deleted the user-report-settings-templates branch March 26, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add 'User Report Settings Templates' endpoints support

3 participants