Skip to content

Conversation

alexedme
Copy link
Contributor

feat(client): added angular, axios, fetch, next & nuxt client type export for external typing purposes;

Closes #2533

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

changeset-bot bot commented Aug 27, 2025

🦋 Changeset detected

Latest commit: efdeedc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hey-api/openapi-ts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Aug 27, 2025

@alexedme is attempting to deploy a commit to the Hey API Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. client Client package related feature 🚀 New feature or request labels Aug 27, 2025
Copy link

pkg-pr-new bot commented Aug 27, 2025

Open in StackBlitz

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/nuxt@2535
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/openapi-ts@2535
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/vite-plugin@2535

commit: efdeedc

Copy link

codecov bot commented Aug 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 24.00%. Comparing base (59ec7a0) to head (efdeedc).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2535   +/-   ##
=======================================
  Coverage   24.00%   24.00%           
=======================================
  Files         359      359           
  Lines       35540    35540           
  Branches     1540     1540           
=======================================
  Hits         8533     8533           
  Misses      26994    26994           
  Partials       13       13           
Flag Coverage Δ
unittests 24.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@@ -1,5 +1,6 @@
import type { DefinePlugin, Plugin } from '../../types';
import type { Client } from '../client-core/types';
export type { Client as AngularClient } from './bundle/types';
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need to re-export from both types and index?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My fault.

The change in the types file is redundant and not necessary. At first, I thought of creating a new type in the following way:

import type { Client } from './bundle/types';

export AxiosClient = Client

But opted afterwards to simply re-export the type with an alias to avoid conflict with Client namespace (packages/openapi-ts/src/plugins/@hey-api/client-core/types.d.ts line 17).

I will revert the changes in the types file.

Thank you for letting me know.

@mrlubos
Copy link
Member

mrlubos commented Aug 27, 2025

Open in StackBlitz

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/nuxt@2535
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/openapi-ts@2535
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/vite-plugin@2535

commit: 6757b16

@alexedme you can use the previews to verify it works as expected on your end once actually released

@alexedme alexedme force-pushed the feat/client-type-export branch from 6757b16 to efdeedc Compare August 27, 2025 18:04
Copy link
Member

@mrlubos mrlubos left a comment

Choose a reason for hiding this comment

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

Looking good – thank you!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 27, 2025
@mrlubos mrlubos merged commit 774435e into hey-api:main Aug 27, 2025
12 of 13 checks passed
This was referenced Aug 27, 2025
@alexedme
Copy link
Contributor Author

Looking good – thank you!

I should to be the one thanking you for allowing me to contribute to this great lib. It was a nice experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Client package related feature 🚀 New feature or request lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bring back the export of the type "Client" (from the now deprecated @hey-api/client-axios)
2 participants