Skip to content

fix(style-guides): simplify dual-platform models with optional groupId#639

Merged
andrii-bodnar merged 1 commit intomasterfrom
fix/style-guides-simplify-models
Mar 19, 2026
Merged

fix(style-guides): simplify dual-platform models with optional groupId#639
andrii-bodnar merged 1 commit intomasterfrom
fix/style-guides-simplify-models

Conversation

@YHorodyskyi
Copy link
Collaborator

fix(style-guides): simplify dual-platform models with optional groupId

Summary

Simplifies Style Guides API models to use a single interface with optional groupId instead of separate Crowdin/Enterprise interfaces. Aligns with the pattern used in machineTranslation and other dual-platform modules.

Changes

  • StyleGuide: Added optional groupId?: number (Enterprise only) instead of StyleGuideEnterprise interface
  • CreateStyleGuideRequest: Added optional groupId?: number | null (Enterprise only) instead of CreateStyleGuideEnterpriseRequest
  • Method signatures: Removed union types (StyleGuide | StyleGuideEnterprise), now return StyleGuide directly
  • Tests: Updated assertions to use direct groupId access

Rationale

Style Guides API serves both Crowdin and Crowdin Enterprise. The only platform-specific difference is groupId (Enterprise). Using optional groupId keeps the API surface simpler and consistent.

@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.85%. Comparing base (8595f57) to head (0e4cbac).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #639   +/-   ##
=======================================
  Coverage   89.85%   89.85%           
=======================================
  Files          41       41           
  Lines        2126     2126           
  Branches      254      254           
=======================================
  Hits         1910     1910           
  Misses         82       82           
  Partials      134      134           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andrii-bodnar andrii-bodnar merged commit 477a249 into master Mar 19, 2026
10 checks passed
@andrii-bodnar andrii-bodnar deleted the fix/style-guides-simplify-models branch March 19, 2026 10:26
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.

2 participants