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

fix(api-client): Fix Facet types to match API v2.1 #198

Merged
merged 1 commit into from
Oct 12, 2023
Merged

Conversation

richterb
Copy link
Contributor

@richterb richterb commented Oct 11, 2023

Summary

The goal for this PR is to fix a mismatch between Facet type and the reality of what the API provides.

(Internal for Opendatasoft only) Associated Shortcut ticket: sc-44362.

Changes

The changes are made to match the current structure of both facets endpoint in the API.

Changelog

Facet types has been fixed to properly match Opendatasoft's API responses.

Open discussion

I added state as a very simple type without an enum. I don't think it's worth adding an enum here.

Review checklist

  • Description is complete
  • Commits respect the Conventional Commits Specification
  • 2 reviewers (1 if trivial)
  • Tests coverage has improved
  • Code is ready for a release on NPM

@github-actions
Copy link

Total Coverage: 95.18%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
src
   index.ts100%100%100%
src/client
   error.ts100%100%100%
   index.ts73.97%100%96.83%116, 13, 138, 140, 140, 141, 143, 15, 15, 154, 161, 161, 163, 168, 17, 17, 171, 174, 176, 50, 75
   types.ts100%100%100%
src/odsql
   clauses.ts71.43%80%90.91%14, 32, 42
   index.ts83.72%95.65%94.12%111, 140, 25, 28, 56, 57, 57, 57, 58, 68, 78, 79

Copy link
Contributor

@KevinFabre-ods KevinFabre-ods left a comment

Choose a reason for hiding this comment

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

LGTM ✅

@richterb richterb merged commit 40ba134 into main Oct 12, 2023
@richterb richterb deleted the fix/facet-types branch October 12, 2023 08:01
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