Skip to content

[#335] Integrate HydroServer TS Client#21

Open
Maurier wants to merge 11 commits intodevelopfrom
335-integrate-ts-client
Open

[#335] Integrate HydroServer TS Client#21
Maurier wants to merge 11 commits intodevelopfrom
335-integrate-ts-client

Conversation

@Maurier
Copy link
Contributor

@Maurier Maurier commented Nov 19, 2025

Integrates HydroServer TypeScript client (https://www.npmjs.com/package/@hydroserver/client).

Copy link
Contributor

@daniel-slaugh daniel-slaugh left a comment

Choose a reason for hiding this comment

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

Looks good. A couple notes as I was reading through the files:

  1. hs.things.list() will return the response envelope for only the first page of items. If you want to get the full list use .listAll() to get it in a response envelope or .listAllItems() to unwrap it and get just the full list of items or null
  2. There's a TODO in the router/guards for thing.ownsThing. The thing schema no longer has ownsThing since all access control is handled on the workspace level now. Take a look at the router.ts file in the data-management-app for how to route based on AllAuth flows if you need this functionality before Ken and I implement OpenIDConnect here in 2 or 3 months.
  3. Optional personal preference but @hydroserver/client exposes a createHydroServer convenience function that will create a global hs instance for you and manage the a persisted session so you don't have to save hs in a Pinia store and import the store and pinia helpers in each component. See the data-management-app main.ts if you're interested

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