Skip to content

Commit

Permalink
chores(ui): codegen ui
Browse files Browse the repository at this point in the history
Signed-off-by: ashutosh16 <[email protected]>

chores(ui): codegen ui

Signed-off-by: ashutosh16 <[email protected]>

chores(ui): codegen ui

Signed-off-by: ashutosh16 <[email protected]>

chores(ui): codegen ui

Signed-off-by: ashutosh16 <[email protected]>

chores(ui): codegen ui

Signed-off-by: ashutosh16 <[email protected]>

chores(ui): codegen ui

Signed-off-by: ashutosh16 <[email protected]>
  • Loading branch information
ashutosh16 committed Nov 6, 2024
1 parent 1823b6b commit 9bb4097
Show file tree
Hide file tree
Showing 5 changed files with 703 additions and 892 deletions.
187 changes: 0 additions & 187 deletions ui/gen/ephemeralAccessAPI.ts

This file was deleted.

6 changes: 2 additions & 4 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"moment-timezone": "^0.5.33",
"react-moment": "^1.1.3",
"react-hot-loader": "^3.1.3",
"axios": "1.6.2",
"@tanstack/react-query": "^5.56.2",
"@tanstack/react-query-devtools": "^5.59.0"
"axios": "1.6.2"
},
"peerDependencies": {
"moment": "^2.29.4",
Expand Down Expand Up @@ -71,7 +69,7 @@
"webpack": "^5.75.0",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^4.7.2",
"orval": "^6.31.0"
"orval": "v7.1.1"
},
"resolutions": {
"react-toastify": "9.0.3"
Expand Down
23 changes: 23 additions & 0 deletions ui/src/gen/api-instance.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import axios, { AxiosError, AxiosRequestConfig } from "axios";

export const apiInstance = axios.create({
baseURL: "/extensions/ephemeral/",
headers: {
"Content-Type": "application/json",
},
withCredentials: true,
});

export const createInstance = <T>(
config: AxiosRequestConfig,
options?: AxiosRequestConfig
): Promise<T> => {
return apiInstance({
...config,
...options,
}).then((res) => res.data);
};

export type BodyType<Data> = Data;

export type ErrorType<Error> = AxiosError<Error>;
3 changes: 1 addition & 2 deletions ui/src/gen/ephemeral-access-api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Generated by orval v6.31.0 🍺
* Generated by orval v7.1.1 🍺
* Do not edit manually.
* Ephemeral Access API
* OpenAPI spec version: 0.0.1
Expand Down Expand Up @@ -118,7 +118,6 @@ export interface AccessRequestResponseBody {
export const listAccessrequest = <TData = AxiosResponse<ListAccessRequestResponseBody>>(
options?: AxiosRequestConfig
): Promise<TData> => {
console.log('listAccessrequest')
return axios.get(`/accessrequests`, options);
};

Expand Down
Loading

0 comments on commit 9bb4097

Please sign in to comment.