/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */

import type { CancelablePromise } from "../core/CancelablePromise";
import { OpenAPI } from "../core/OpenAPI";
import { request as __request } from "../core/request";
export class CategoriesService {
  /**
   * @param categoryId
   * @param code
   * @param page
   * @param limit
   * @param sort
   * @param sortBy
   * @returns any
   * @throws ApiError
   */
  public static categoriesControllerGetCategories(
    categoryId?: number,
    code?:
      | "minter"
      | "quantwise"
      | "license"
      | "combo"
      | "kminting"
      | "supernode"
      | "global-pool-layer-k"
      | "subscription"
      | "mobile-app",
    page: number = 1,
    limit: number = 30,
    sort: string = "desc",
    sortBy: string = "createdAt",
  ): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "GET",
      url: "/v1/categories",
      query: {
        categoryId: categoryId,
        code: code,
        page: page,
        limit: limit,
        sort: sort,
        sortBy: sortBy,
      },
    });
  }
  /**
   * @param id
   * @returns any
   * @throws ApiError
   */
  public static categoriesControllerGetCategory(
    id: number,
  ): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "GET",
      url: "/v1/categories/{id}",
      path: {
        id: id,
      },
    });
  }
}
