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

added /compare page and compare selector to /servers #22

Merged
merged 14 commits into from
Jun 3, 2024
41 changes: 32 additions & 9 deletions sdk/Ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
*/

import {
AssistFiltersAiAssistFiltersGetData,
AssistFiltersAiAssistFiltersGetParams,
AssistServerFiltersAiAssistServerFiltersGetData,
AssistServerFiltersAiAssistServerFiltersGetParams,
AssistServerPriceFiltersAiAssistServerPriceFiltersGetData,
AssistServerPriceFiltersAiAssistServerPriceFiltersGetParams,
HTTPValidationError,
} from "./data-contracts";
import { HttpClient, RequestParams } from "./http-client";
Comment on lines 11 to 19
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using type-only imports for clarity and to prevent runtime imports when only types are needed.

- import {
+ import type {
  AssistServerFiltersAiAssistServerFiltersGetData,
  AssistServerFiltersAiAssistServerFiltersGetParams,
  AssistServerPriceFiltersAiAssistServerPriceFiltersGetData,
  AssistServerPriceFiltersAiAssistServerPriceFiltersGetParams,
  HTTPValidationError,
} from "./data-contracts";
- import { HttpClient, RequestParams } from "./http-client";
+ import type { HttpClient, RequestParams } from "./http-client";
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
import {
AssistFiltersAiAssistFiltersGetData,
AssistFiltersAiAssistFiltersGetParams,
AssistServerFiltersAiAssistServerFiltersGetData,
AssistServerFiltersAiAssistServerFiltersGetParams,
AssistServerPriceFiltersAiAssistServerPriceFiltersGetData,
AssistServerPriceFiltersAiAssistServerPriceFiltersGetParams,
HTTPValidationError,
} from "./data-contracts";
import { HttpClient, RequestParams } from "./http-client";
import type {
AssistServerFiltersAiAssistServerFiltersGetData,
AssistServerFiltersAiAssistServerFiltersGetParams,
AssistServerPriceFiltersAiAssistServerPriceFiltersGetData,
AssistServerPriceFiltersAiAssistServerPriceFiltersGetParams,
HTTPValidationError,
} from "./data-contracts";
import type { HttpClient, RequestParams } from "./http-client";
Tools
Biome

[error] 11-18: All these imports are only used as types.


[error] 18-19: All these imports are only used as types.

Expand All @@ -24,16 +26,37 @@ export class Ai<SecurityDataType = unknown> {
}

/**
* @description Extract JSON filters from freetext.
* @description Extract Server JSON filters from freetext.
*
* @tags AI
* @name AssistFiltersAiAssistFiltersGet
* @summary Assist Filters
* @request GET:/ai/assist_filters
* @name AssistServerFiltersAiAssistServerFiltersGet
* @summary Assist Server Filters
* @request GET:/ai/assist_server_filters
*/
assistFiltersAiAssistFiltersGet = (query: AssistFiltersAiAssistFiltersGetParams, params: RequestParams = {}) =>
this.http.request<AssistFiltersAiAssistFiltersGetData, HTTPValidationError>({
path: `/ai/assist_filters`,
assistServerFiltersAiAssistServerFiltersGet = (
query: AssistServerFiltersAiAssistServerFiltersGetParams,
params: RequestParams = {},
) =>
this.http.request<AssistServerFiltersAiAssistServerFiltersGetData, HTTPValidationError>({
path: `/ai/assist_server_filters`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Avoid using template literals when not necessary.

-      path: `/ai/assist_server_filters`,
+      path: "/ai/assist_server_filters",
-      path: `/ai/assist_server_price_filters`,
+      path: "/ai/assist_server_price_filters",

Also applies to: 59-59

Committable suggestion was skipped due low confidence.

Tools
Biome

[error] 41-41: Do not use template literals if interpolation and special-character handling are not needed.

method: "GET",
query: query,
...params,
});
/**
* @description Extract ServerPrice JSON filters from freetext.
*
* @tags AI
* @name AssistServerPriceFiltersAiAssistServerPriceFiltersGet
* @summary Assist Server Price Filters
* @request GET:/ai/assist_server_price_filters
*/
assistServerPriceFiltersAiAssistServerPriceFiltersGet = (
query: AssistServerPriceFiltersAiAssistServerPriceFiltersGetParams,
params: RequestParams = {},
) =>
this.http.request<AssistServerPriceFiltersAiAssistServerPriceFiltersGetData, HTTPValidationError>({
path: `/ai/assist_server_price_filters`,
method: "GET",
query: query,
...params,
Expand Down
41 changes: 41 additions & 0 deletions sdk/ServerPrices.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/* eslint-disable */
/* tslint:disable */
/*
* ---------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
* ## ##
* ## AUTHOR: acacode ##
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
* ---------------------------------------------------------------
*/

import {
HTTPValidationError,
SearchServerPricesServerPricesGetData,
SearchServerPricesServerPricesGetParams,
} from "./data-contracts";
import { HttpClient, RequestParams } from "./http-client";
Comment on lines +11 to +17
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using type-only imports for clarity and to prevent runtime imports when only types are needed.

- import {
+ import type {
  HTTPValidationError,
  SearchServerPricesServerPricesGetData,
  SearchServerPricesServerPricesGetParams,
} from "./data-contracts";
- import { HttpClient, RequestParams } from "./http-client";
+ import type { HttpClient, RequestParams } from "./http-client";
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
import {
HTTPValidationError,
SearchServerPricesServerPricesGetData,
SearchServerPricesServerPricesGetParams,
} from "./data-contracts";
import { HttpClient, RequestParams } from "./http-client";
import type {
HTTPValidationError,
SearchServerPricesServerPricesGetData,
SearchServerPricesServerPricesGetParams,
} from "./data-contracts";
import type { HttpClient, RequestParams } from "./http-client";
Tools
Biome

[error] 11-16: All these imports are only used as types.


[error] 16-17: All these imports are only used as types.


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

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

/**
* No description
*
* @tags Query Resources
* @name SearchServerPricesServerPricesGet
* @summary Search Server Prices
* @request GET:/server_prices
*/
searchServerPricesServerPricesGet = (query: SearchServerPricesServerPricesGetParams, params: RequestParams = {}) =>
this.http.request<SearchServerPricesServerPricesGetData, HTTPValidationError>({
path: `/server_prices`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Avoid using template literals when not necessary.

-      path: `/server_prices`,
+      path: "/server_prices",
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
path: `/server_prices`,
path: "/server_prices",
Tools
Biome

[error] 36-36: Do not use template literals if interpolation and special-character handling are not needed.

method: "GET",
query: query,
...params,
});
}
Loading