Skip to content
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

(feat): [types] require credentials when initializing HumeClient #190

Merged
merged 6 commits into from
Oct 7, 2024

Conversation

twitchard
Copy link
Contributor

@twitchard twitchard commented Oct 4, 2024

Makes two changes to the HumeClient defined In wrapper (i.e. it's controlled manually, not fern-generated).

  1. Remove expressionMeasurement override I removed the redefinition of expressionMeasurement and _expressionMeasurement. This is identical to what is in the parent FernClient class, so seemed needless to me. never mind, I was just confused.
  2. I redefined the HumeClient.Options type to always require either apiKey or accessToken. We want to prevent users from initializing the client without credentials because this will result in errors further downstream when they attempt to make requests / open connections.

Union of intersection can be confusing, I tested things out here.

@twitchard twitchard force-pushed the twitchard/require-apiKey-or-accessToken branch from 6d51fe3 to 6e62092 Compare October 4, 2024 18:27
@twitchard twitchard force-pushed the twitchard/require-apiKey-or-accessToken branch from 6e62092 to 0fc1e73 Compare October 4, 2024 18:28
@twitchard twitchard changed the title HumeClient.Options -> require types: require credentials when initializing HumeClient Oct 4, 2024
src/wrapper/HumeClient.ts Outdated Show resolved Hide resolved
@twitchard twitchard changed the title types: require credentials when initializing HumeClient (feat): require credentials when initializing HumeClient Oct 7, 2024
@twitchard twitchard changed the title (feat): require credentials when initializing HumeClient (feat): [types] require credentials when initializing HumeClient Oct 7, 2024
@twitchard twitchard merged commit ea43750 into main Oct 7, 2024
5 checks passed
@twitchard twitchard deleted the twitchard/require-apiKey-or-accessToken branch October 7, 2024 16:10
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