Skip to content

feat: Support for new file reference api#585

Merged
andrii-bodnar merged 2 commits into
crowdin:masterfrom
Ribas160:support_for_new_file_reference_api
Oct 31, 2025
Merged

feat: Support for new file reference api#585
andrii-bodnar merged 2 commits into
crowdin:masterfrom
Ribas160:support_for_new_file_reference_api

Conversation

@Ribas160

@Ribas160 Ribas160 commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

Closes #578


Note

Add SourceFiles client support for file asset references (list/get/create/delete) with corresponding models and tests.

  • API client (src/sourceFiles/index.ts):
    • Add listAssetReferences, getAssetReference, addAssetReference, deleteAssetReference for projects/{projectId}/files/{fileId}/references endpoints.
    • Define models: SourceFilesModel.User, AssetReference, AssetReferenceRequest.
  • Tests (tests/sourceFiles/api.test.ts):
    • Mock and assert new references endpoints (list/get/post/delete) with nock.
    • Add related fixtures (referenceId, assetName).

Written by Cursor Bugbot for commit 5ba061f. This will update automatically on new commits. Configure here.

@Ribas160 Ribas160 changed the title Support for new file reference api feat: Support for new file reference api Oct 31, 2025
@codecov

codecov Bot commented Oct 31, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.90%. Comparing base (a58c89e) to head (5ba061f).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/sourceFiles/index.ts 91.67% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #585      +/-   ##
==========================================
+ Coverage   89.89%   89.90%   +0.02%     
==========================================
  Files          40       40              
  Lines        2017     2029      +12     
  Branches      213      214       +1     
==========================================
+ Hits         1813     1824      +11     
  Misses         82       82              
- Partials      122      123       +1     

☔ 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.

Comment thread src/sourceFiles/index.ts
@andrii-bodnar andrii-bodnar requested a review from Copilot October 31, 2025 12:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for asset reference management in source files by introducing four new API methods: list, get, add, and delete asset references.

  • Added listAssetReferences, getAssetReference, addAssetReference, and deleteAssetReference methods to the SourceFiles API class
  • Introduced AssetReference, AssetReferenceRequest, and User interface types in the SourceFilesModel namespace
  • Added comprehensive test coverage for all four new asset reference operations

Reviewed Changes

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

File Description
src/sourceFiles/index.ts Implements four CRUD methods for asset references and defines the necessary TypeScript interfaces
tests/sourceFiles/api.test.ts Adds mock HTTP endpoints and test cases for all four asset reference operations

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

Comment thread src/sourceFiles/index.ts
Comment thread src/sourceFiles/index.ts
Comment thread src/sourceFiles/index.ts
Comment thread src/sourceFiles/index.ts
Comment thread src/sourceFiles/index.ts

@andrii-bodnar andrii-bodnar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Ribas160 thank you!

@andrii-bodnar andrii-bodnar merged commit 4313341 into crowdin:master Oct 31, 2025
17 of 20 checks passed
@Ribas160 Ribas160 mentioned this pull request Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for new File References API

3 participants