Skip to content

Commit

Permalink
Merge pull request #92 from NERSC/npm-packaging
Browse files Browse the repository at this point in the history
update frontend versions
  • Loading branch information
swelborn authored Feb 11, 2025
2 parents 9bb5301 + 2a106af commit 24a5388
Show file tree
Hide file tree
Showing 8 changed files with 658 additions and 740 deletions.
3 changes: 1 addition & 2 deletions frontend/interactEM/openapi-ts.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { defaultPlugins, defineConfig } from "@hey-api/openapi-ts"

export default defineConfig({
client: "@hey-api/client-axios",
input: "openapi.json",
output: {
format: "biome",
path: "src/client/generated",
},
plugins: [...defaultPlugins, "@tanstack/react-query", "zod"],
plugins: [...defaultPlugins, "@hey-api/client-axios", "@tanstack/react-query", "zod"],
})
1,250 changes: 563 additions & 687 deletions frontend/interactEM/package-lock.json

Large diffs are not rendered by default.

36 changes: 17 additions & 19 deletions frontend/interactEM/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,40 @@
},
"dependencies": {
"@dagrejs/dagre": "^1.1.4",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@hey-api/client-axios": "^0.5.0",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@hey-api/client-axios": "^0.6.1",
"@hookform/resolvers": "^3.10.0",
"@mui/icons-material": "^6.1.4",
"@mui/material": "^6.1.4",
"@nats-io/jetstream": "^3.0.0-27",
"@nats-io/kv": "^3.0.0-21",
"@nats-io/nats-core": "^3.0.0-40",
"@mui/icons-material": "^6.4.3",
"@mui/material": "^6.4.3",
"@nats-io/jetstream": "^3.0.0-37",
"@nats-io/kv": "^3.0.0-31",
"@nats-io/nats-core": "^3.0.0-50",
"@radix-ui/react-icons": "^1.3.0",
"@xyflow/react": "^12.3.0",
"jwt-decode": "^4.0.0",
"@xyflow/react": "^12.4.2",
"react-hook-form": "^7.54.2",
"react-toastify": "^11.0.3",
"uuid": "^10.0.0"
"uuid": "^11.0.5"
},
"peerDependencies": {
"@tanstack/react-query": "^5.64.2",
"@tanstack/react-query": "^5.66.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"zod": "^3.24.1"
},
"license": "MIT",
"devDependencies": {
"@biomejs/biome": "^1.9.3",
"@hey-api/openapi-ts": "^0.62.1",
"@tanstack/react-query-devtools": "^5.59.15",
"@hey-api/openapi-ts": "^0.64.3",
"@tanstack/react-query-devtools": "^5.66.0",
"@types/react": "^18.2.53",
"@types/react-dom": "^18.2.18",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"@vitejs/plugin-react": "^4.2.1",
"@typescript-eslint/eslint-plugin": "^8.24.0",
"@typescript-eslint/parser": "^8.24.0",
"@vitejs/plugin-react": "^4.3.4",
"path": "^0.12.7",
"rollup-plugin-visualizer": "^5.14.0",
"typescript": "^5.3.3",
"typescript": "^5.7.3",
"vite": "^5.0.12",
"vite-plugin-dts": "^4.5.0"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// This file is auto-generated by @hey-api/openapi-ts

import type { Options } from "@hey-api/client-axios"
import {
type DefaultError,
type UseMutationOptions,
queryOptions,
} from "@tanstack/react-query"
import type { AxiosError } from "axios"
import { client as _heyApiClient } from "../client.gen"
import {
type Options,
agentsLaunchAgent,
client,
loginLoginAccessToken,
loginLoginWithExternalToken,
loginRecoverPassword,
Expand Down Expand Up @@ -111,7 +111,7 @@ const createQueryKey = <TOptions extends Options>(
): QueryKey<TOptions>[0] => {
const params: QueryKey<TOptions>[0] = {
_id: id,
baseURL: (options?.client ?? client).getConfig().baseURL,
baseURL: (options?.client ?? _heyApiClient).getConfig().baseURL,
} as QueryKey<TOptions>[0]
if (infinite) {
params._infinite = infinite
Expand Down
24 changes: 24 additions & 0 deletions frontend/interactEM/src/client/generated/client.gen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// This file is auto-generated by @hey-api/openapi-ts

import {
type Config,
type ClientOptions as DefaultClientOptions,
createClient,
createConfig,
} from "@hey-api/client-axios"
import type { ClientOptions } from "./types.gen"

/**
* The `createClientConfig()` function will be called on client initialization
* and the returned object will become the client's initial configuration.
*
* You may want to initialize your client this way instead of calling
* `setConfig()`. This is useful for example if you're using Next.js
* to ensure your client always has the correct values.
*/
export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> =
(
override?: Config<DefaultClientOptions & T>,
) => Config<Required<DefaultClientOptions> & T>

export const client = createClient(createConfig<ClientOptions>())
74 changes: 45 additions & 29 deletions frontend/interactEM/src/client/generated/sdk.gen.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// This file is auto-generated by @hey-api/openapi-ts

import {
type Options,
createClient,
createConfig,
type Client,
type Options as ClientOptions,
type TDataShape,
urlSearchParamsBodySerializer,
} from "@hey-api/client-axios"
import { client as _heyApiClient } from "./client.gen"
import type {
AgentsLaunchAgentData,
AgentsLaunchAgentError,
Expand Down Expand Up @@ -78,7 +79,22 @@ import type {
UtilsTestEmailResponse,
} from "./types.gen"

export const client = createClient(createConfig())
export type Options<
TData extends TDataShape = TDataShape,
ThrowOnError extends boolean = boolean,
> = ClientOptions<TData, ThrowOnError> & {
/**
* You can provide a client instance returned by `createClient()` instead of
* individual options. This might be also useful if you want to implement a
* custom client.
*/
client?: Client
/**
* You can pass arbitrary values through the `meta` object. This can be
* used to access values that aren't defined as part of the SDK function.
*/
meta?: Record<string, unknown>
}

/**
* Login Access Token
Expand All @@ -87,7 +103,7 @@ export const client = createClient(createConfig())
export const loginLoginAccessToken = <ThrowOnError extends boolean = false>(
options: Options<LoginLoginAccessTokenData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
return (options.client ?? _heyApiClient).post<
LoginLoginAccessTokenResponse,
LoginLoginAccessTokenError,
ThrowOnError
Expand All @@ -111,7 +127,7 @@ export const loginLoginWithExternalToken = <
>(
options?: Options<LoginLoginWithExternalTokenData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
return (options?.client ?? _heyApiClient).post<
LoginLoginWithExternalTokenResponse,
unknown,
ThrowOnError
Expand All @@ -134,7 +150,7 @@ export const loginLoginWithExternalToken = <
export const loginTestToken = <ThrowOnError extends boolean = false>(
options?: Options<LoginTestTokenData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
return (options?.client ?? _heyApiClient).post<
LoginTestTokenResponse,
unknown,
ThrowOnError
Expand All @@ -157,7 +173,7 @@ export const loginTestToken = <ThrowOnError extends boolean = false>(
export const loginRecoverPassword = <ThrowOnError extends boolean = false>(
options: Options<LoginRecoverPasswordData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
return (options.client ?? _heyApiClient).post<
LoginRecoverPasswordResponse,
LoginRecoverPasswordError,
ThrowOnError
Expand All @@ -174,7 +190,7 @@ export const loginRecoverPassword = <ThrowOnError extends boolean = false>(
export const loginResetPassword = <ThrowOnError extends boolean = false>(
options: Options<LoginResetPasswordData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
return (options.client ?? _heyApiClient).post<
LoginResetPasswordResponse,
LoginResetPasswordError,
ThrowOnError
Expand All @@ -197,7 +213,7 @@ export const loginRecoverPasswordHtmlContent = <
>(
options: Options<LoginRecoverPasswordHtmlContentData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
return (options.client ?? _heyApiClient).post<
LoginRecoverPasswordHtmlContentResponse,
LoginRecoverPasswordHtmlContentError,
ThrowOnError
Expand All @@ -221,7 +237,7 @@ export const loginRecoverPasswordHtmlContent = <
export const usersReadUsers = <ThrowOnError extends boolean = false>(
options?: Options<UsersReadUsersData, ThrowOnError>,
) => {
return (options?.client ?? client).get<
return (options?.client ?? _heyApiClient).get<
UsersReadUsersResponse,
UsersReadUsersError,
ThrowOnError
Expand All @@ -244,7 +260,7 @@ export const usersReadUsers = <ThrowOnError extends boolean = false>(
export const usersCreateUser = <ThrowOnError extends boolean = false>(
options: Options<UsersCreateUserData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
return (options.client ?? _heyApiClient).post<
UsersCreateUserResponse,
UsersCreateUserError,
ThrowOnError
Expand All @@ -271,7 +287,7 @@ export const usersCreateUser = <ThrowOnError extends boolean = false>(
export const usersDeleteUserMe = <ThrowOnError extends boolean = false>(
options?: Options<UsersDeleteUserMeData, ThrowOnError>,
) => {
return (options?.client ?? client).delete<
return (options?.client ?? _heyApiClient).delete<
UsersDeleteUserMeResponse,
unknown,
ThrowOnError
Expand All @@ -294,7 +310,7 @@ export const usersDeleteUserMe = <ThrowOnError extends boolean = false>(
export const usersReadUserMe = <ThrowOnError extends boolean = false>(
options?: Options<UsersReadUserMeData, ThrowOnError>,
) => {
return (options?.client ?? client).get<
return (options?.client ?? _heyApiClient).get<
UsersReadUserMeResponse,
unknown,
ThrowOnError
Expand All @@ -317,7 +333,7 @@ export const usersReadUserMe = <ThrowOnError extends boolean = false>(
export const usersUpdateUserMe = <ThrowOnError extends boolean = false>(
options: Options<UsersUpdateUserMeData, ThrowOnError>,
) => {
return (options?.client ?? client).patch<
return (options.client ?? _heyApiClient).patch<
UsersUpdateUserMeResponse,
UsersUpdateUserMeError,
ThrowOnError
Expand All @@ -344,7 +360,7 @@ export const usersUpdateUserMe = <ThrowOnError extends boolean = false>(
export const usersUpdatePasswordMe = <ThrowOnError extends boolean = false>(
options: Options<UsersUpdatePasswordMeData, ThrowOnError>,
) => {
return (options?.client ?? client).patch<
return (options.client ?? _heyApiClient).patch<
UsersUpdatePasswordMeResponse,
UsersUpdatePasswordMeError,
ThrowOnError
Expand All @@ -371,7 +387,7 @@ export const usersUpdatePasswordMe = <ThrowOnError extends boolean = false>(
export const usersRegisterUser = <ThrowOnError extends boolean = false>(
options: Options<UsersRegisterUserData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
return (options.client ?? _heyApiClient).post<
UsersRegisterUserResponse,
UsersRegisterUserError,
ThrowOnError
Expand All @@ -392,7 +408,7 @@ export const usersRegisterUser = <ThrowOnError extends boolean = false>(
export const usersDeleteUser = <ThrowOnError extends boolean = false>(
options: Options<UsersDeleteUserData, ThrowOnError>,
) => {
return (options?.client ?? client).delete<
return (options.client ?? _heyApiClient).delete<
UsersDeleteUserResponse,
UsersDeleteUserError,
ThrowOnError
Expand All @@ -415,7 +431,7 @@ export const usersDeleteUser = <ThrowOnError extends boolean = false>(
export const usersReadUserById = <ThrowOnError extends boolean = false>(
options: Options<UsersReadUserByIdData, ThrowOnError>,
) => {
return (options?.client ?? client).get<
return (options.client ?? _heyApiClient).get<
UsersReadUserByIdResponse,
UsersReadUserByIdError,
ThrowOnError
Expand All @@ -438,7 +454,7 @@ export const usersReadUserById = <ThrowOnError extends boolean = false>(
export const usersUpdateUser = <ThrowOnError extends boolean = false>(
options: Options<UsersUpdateUserData, ThrowOnError>,
) => {
return (options?.client ?? client).patch<
return (options.client ?? _heyApiClient).patch<
UsersUpdateUserResponse,
UsersUpdateUserError,
ThrowOnError
Expand All @@ -465,7 +481,7 @@ export const usersUpdateUser = <ThrowOnError extends boolean = false>(
export const utilsTestEmail = <ThrowOnError extends boolean = false>(
options: Options<UtilsTestEmailData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
return (options.client ?? _heyApiClient).post<
UtilsTestEmailResponse,
UtilsTestEmailError,
ThrowOnError
Expand All @@ -488,7 +504,7 @@ export const utilsTestEmail = <ThrowOnError extends boolean = false>(
export const pipelinesReadPipelines = <ThrowOnError extends boolean = false>(
options?: Options<PipelinesReadPipelinesData, ThrowOnError>,
) => {
return (options?.client ?? client).get<
return (options?.client ?? _heyApiClient).get<
PipelinesReadPipelinesResponse,
PipelinesReadPipelinesError,
ThrowOnError
Expand All @@ -511,7 +527,7 @@ export const pipelinesReadPipelines = <ThrowOnError extends boolean = false>(
export const pipelinesCreatePipeline = <ThrowOnError extends boolean = false>(
options: Options<PipelinesCreatePipelineData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
return (options.client ?? _heyApiClient).post<
PipelinesCreatePipelineResponse,
PipelinesCreatePipelineError,
ThrowOnError
Expand All @@ -538,7 +554,7 @@ export const pipelinesCreatePipeline = <ThrowOnError extends boolean = false>(
export const pipelinesDeletePipeline = <ThrowOnError extends boolean = false>(
options: Options<PipelinesDeletePipelineData, ThrowOnError>,
) => {
return (options?.client ?? client).delete<
return (options.client ?? _heyApiClient).delete<
PipelinesDeletePipelineResponse,
PipelinesDeletePipelineError,
ThrowOnError
Expand All @@ -561,7 +577,7 @@ export const pipelinesDeletePipeline = <ThrowOnError extends boolean = false>(
export const pipelinesReadPipeline = <ThrowOnError extends boolean = false>(
options: Options<PipelinesReadPipelineData, ThrowOnError>,
) => {
return (options?.client ?? client).get<
return (options.client ?? _heyApiClient).get<
PipelinesReadPipelineResponse,
PipelinesReadPipelineError,
ThrowOnError
Expand All @@ -586,7 +602,7 @@ export const pipelinesCreateAndRunPipeline = <
>(
options: Options<PipelinesCreateAndRunPipelineData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
return (options.client ?? _heyApiClient).post<
PipelinesCreateAndRunPipelineResponse,
PipelinesCreateAndRunPipelineError,
ThrowOnError
Expand All @@ -613,7 +629,7 @@ export const pipelinesCreateAndRunPipeline = <
export const pipelinesRunPipeline = <ThrowOnError extends boolean = false>(
options: Options<PipelinesRunPipelineData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
return (options.client ?? _heyApiClient).post<
PipelinesRunPipelineResponse,
PipelinesRunPipelineError,
ThrowOnError
Expand All @@ -636,7 +652,7 @@ export const pipelinesRunPipeline = <ThrowOnError extends boolean = false>(
export const operatorsReadOperators = <ThrowOnError extends boolean = false>(
options?: Options<OperatorsReadOperatorsData, ThrowOnError>,
) => {
return (options?.client ?? client).get<
return (options?.client ?? _heyApiClient).get<
OperatorsReadOperatorsResponse,
unknown,
ThrowOnError
Expand All @@ -659,7 +675,7 @@ export const operatorsReadOperators = <ThrowOnError extends boolean = false>(
export const agentsLaunchAgent = <ThrowOnError extends boolean = false>(
options: Options<AgentsLaunchAgentData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
return (options.client ?? _heyApiClient).post<
unknown,
AgentsLaunchAgentError,
ThrowOnError
Expand Down
4 changes: 4 additions & 0 deletions frontend/interactEM/src/client/generated/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -804,3 +804,7 @@ export type AgentsLaunchAgentResponses = {
*/
200: unknown
}

export type ClientOptions = {
baseURL: `${string}://openapi.json` | (string & {})
}
Loading

0 comments on commit 24a5388

Please sign in to comment.