Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
257 changes: 185 additions & 72 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
"clean": "rm -Rf dist"
},
"dependencies": {
"@patternfly/react-core": "^5.4.11",
"@patternfly/react-icons": "^5.4.2",
"@patternfly/react-styles": "^5.4.1",
"@patternfly/react-table": "^5.4.12",
"@patternfly/react-core": "^6.4.0",
"@patternfly/react-icons": "^6.4.0",
"@patternfly/react-styles": "^6.4.0",
"@patternfly/react-table": "^6.4.0",
"@types/react": "^19.0.1",
"axios": "^1.8.2",
"cron-validate": "^1.5.3",
"date-fns": "^4.1.0",
"lodash.debounce": "4.0.8",
"luxon": "^3.5.0",
Expand All @@ -37,15 +38,15 @@
"eslint": "^9.31.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.16",
"eslint-plugin-unused-imports": "^4.1.4",
"globals": "^15.15.0",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"prettier": "^3.6.2",
"typescript-eslint": "^8.38.0",
"vite": "^6.3.5"
"vite": ">=6.4.1"
},
"overrides": {
"@babel/helpers": "7.26.10"
Expand Down
160 changes: 160 additions & 0 deletions src/api/Accounts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
/*
* ---------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
* ## ##
* ## AUTHOR: acacode ##
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
* ---------------------------------------------------------------
*/

import {
AccountListResponseApi,
AccountRequestApi,
AccountResponseApi,
ClusterListResponseApi,
GenericErrorResponseApi,
InstanceListResponseApi,
PostResponseApi,
} from './data-contracts';
import { ContentType, HttpClient, RequestParams } from './http-client';

export class Accounts<SecurityDataType = unknown> {
http: HttpClient<SecurityDataType>;

constructor(http: HttpClient<SecurityDataType>) {
this.http = http;
}

/**
* @description Paginated retrieval of accounts with optional filters.
*
* @tags Accounts
* @name AccountsList
* @summary List accounts
* @request GET:/accounts
*/
accountsList = (
query?: {
/**
* Page number
* @default 1
*/
page?: number;
/**
* Items per page
* @default 10
*/
page_size?: number;
/** Cloud provider */
provider?: string;
},
params: RequestParams = {}
) =>
this.http.request<AccountListResponseApi, GenericErrorResponseApi>({
path: `/accounts`,
method: 'GET',
query: query,
type: ContentType.Json,
format: 'json',
...params,
});
/**
* @description Create one or multiple accounts from the request body.
*
* @tags Accounts
* @name AccountsCreate
* @summary Create accounts
* @request POST:/accounts
*/
accountsCreate = (accounts: AccountRequestApi[], params: RequestParams = {}) =>
this.http.request<PostResponseApi, GenericErrorResponseApi>({
path: `/accounts`,
method: 'POST',
body: accounts,
type: ContentType.Json,
format: 'json',
...params,
});
/**
* @description Return a single account resource.
*
* @tags Accounts
* @name AccountsDetail
* @summary Get an account by ID
* @request GET:/accounts/{id}
*/
accountsDetail = (id: string, params: RequestParams = {}) =>
this.http.request<AccountResponseApi, GenericErrorResponseApi>({
path: `/accounts/${id}`,
method: 'GET',
type: ContentType.Json,
format: 'json',
...params,
});
/**
* @description Delete an account resource by its ID.
*
* @tags Accounts
* @name AccountsDelete
* @summary Delete an account
* @request DELETE:/accounts/{id}
*/
accountsDelete = (id: string, params: RequestParams = {}) =>
this.http.request<void, GenericErrorResponseApi>({
path: `/accounts/${id}`,
method: 'DELETE',
type: ContentType.Json,
...params,
});
/**
* @description Patch an existing account by ID.
*
* @tags Accounts
* @name AccountsPartialUpdate
* @summary Update an account
* @request PATCH:/accounts/{id}
*/
accountsPartialUpdate = (id: string, account: AccountRequestApi, params: RequestParams = {}) =>
this.http.request<void, void>({
path: `/accounts/${id}`,
method: 'PATCH',
body: account,
type: ContentType.Json,
...params,
});
/**
* @description Return the clusters associated with the specified account.
*
* @tags Accounts
* @name ClustersList
* @summary List clusters by account ID
* @request GET:/accounts/{id}/clusters
*/
clustersList = (id: string, params: RequestParams = {}) =>
this.http.request<ClusterListResponseApi, GenericErrorResponseApi>({
path: `/accounts/${id}/clusters`,
method: 'GET',
type: ContentType.Json,
format: 'json',
...params,
});
/**
* @description Return the list of instances for expense update for a specified account.
*
* @tags Accounts
* @name ExpenseUpdateInstancesList
* @summary List expense update instances
* @request GET:/accounts/{id}/expense_update_instances
*/
expenseUpdateInstancesList = (id: string, params: RequestParams = {}) =>
this.http.request<InstanceListResponseApi, GenericErrorResponseApi>({
path: `/accounts/${id}/expense_update_instances`,
method: 'GET',
type: ContentType.Json,
format: 'json',
...params,
});
}
103 changes: 103 additions & 0 deletions src/api/Actions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
/*
* ---------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
* ## ##
* ## AUTHOR: acacode ##
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
* ---------------------------------------------------------------
*/

import { ActionRequestApi, GenericErrorResponseApi, PostResponseApi } from './data-contracts';
import { ContentType, HttpClient, RequestParams } from './http-client';

export class Actions<SecurityDataType = unknown> {
http: HttpClient<SecurityDataType>;

constructor(http: HttpClient<SecurityDataType>) {
this.http = http;
}

/**
* @description Create one or multiple actions.
*
* @tags Actions
* @name ActionsCreate
* @summary Create actions
* @request POST:/actions
*/
actionsCreate = (actions: ActionRequestApi[], params: RequestParams = {}) =>
this.http.request<PostResponseApi, GenericErrorResponseApi>({
path: `/actions`,
method: 'POST',
body: actions,
type: ContentType.Json,
format: 'json',
...params,
});
/**
* @description Enables one or multiple actions.
*
* @tags Actions
* @name ActionsEnable
* @summary Enable actions
* @request PATCH:/actions
*/
actionsEnable = (id: string, params: RequestParams = {}) =>
this.http.request<PostResponseApi, GenericErrorResponseApi>({
path: `/actions/${id}/enable`,
method: 'PATCH',
type: ContentType.Json,
format: 'json',
...params,
});
/**
* @description Disables one or multiple actions.
*
* @tags Actions
* @name ActionsDisable
* @summary Disable actions
* @request PATCH:/actions
*/
actionsDisable = (id: string, params: RequestParams = {}) =>
this.http.request<PostResponseApi, GenericErrorResponseApi>({
path: `/actions/${id}/disable`,
method: 'PATCH',
type: ContentType.Json,
format: 'json',
...params,
});
/**
* @description Patch an existing actions by ID.
*
* @tags Actions
* @name ActionsPartialUpdate
* @summary Update an actions
* @request PATCH:/actions/
*/
actionsPartialUpdate = (action: ActionRequestApi, params: RequestParams = {}) =>
this.http.request<void, GenericErrorResponseApi>({
path: `/actions/`,
method: 'PATCH',
body: action,
type: ContentType.Json,
...params,
});
/**
* @description Delete an action by ID.
*
* @tags Actions
* @name ActionsDelete
* @summary Delete an action
* @request DELETE:/actions/{id}
*/
actionsDelete = (id: string, params: RequestParams = {}) =>
this.http.request<void, GenericErrorResponseApi>({
path: `/actions/${id}`,
method: 'DELETE',
type: ContentType.Json,
...params,
});
}
Loading