request.ts 7.55 KB
/* eslint-disable */
/* tslint:disable */
/** Do not modify manually.
content is generated automatically by `ts-gear`. */
import requester from "./axios";
import type {} from "./definition";

/** @description request parameter type for postTest */
export interface PostTestOption {
  body?: {
    root?: {};
  };
}

/** @description response type for postTest */
export interface PostTestResponse {
  /**
   * @description
   *   successful operation
   */
  200: {
    productCategory?: Array<{
      id?: string;
      name?: string;
      productCategory?: Array<string>;
    }>;
  };
}

export type PostTestResponseSuccess = PostTestResponse[200];
/**
 * @description
 *   测试
 * @tags 公共分类
 * @consumes application/json
 */
export const postTest = /* #__PURE__ */ (() => {
  const method = "post";
  const url = "/test";
  function request(option?: PostTestOption): Promise<PostTestResponseSuccess> {
    return requester(request.url, {
      method: request.method,
      ...option,
    }) as unknown as Promise<PostTestResponseSuccess>;
  }

  /** http method */
  request.method = method;
  /** request url */
  request.url = url;
  return request;
})();

/** @description request parameter type for postShopProductCategory */
export interface PostShopProductCategoryOption {
  body?: {
    root?: {};
  };
}

/** @description response type for postShopProductCategory */
export interface PostShopProductCategoryResponse {
  /**
   * @description
   *   successful operation
   */
  200: {
    data?: {
      rootCategoryList?: Array<{
        categoryDisplayName: string;
        list: Array<{
          id: string;
          imageUrl: string;
          name: string;
        }>;
        productFunctions: Array<{
          id: string;
          name: string;
        }>;
        order: number;
      }>;
    };
    message?: string;
    result?: number;
  };
}

export type PostShopProductCategoryResponseSuccess =
  PostShopProductCategoryResponse[200];
/**
 * @description
 *   产品分类
 * @tags 海外官网
 * @consumes application/json
 */
export const postShopProductCategory = /* #__PURE__ */ (() => {
  const method = "post";
  const url = "/shop/product/category";
  function request(
    option?: PostShopProductCategoryOption
  ): Promise<PostShopProductCategoryResponseSuccess> {
    return requester(request.url, {
      method: request.method,
      ...option,
    }) as unknown as Promise<PostShopProductCategoryResponseSuccess>;
  }

  /** http method */
  request.method = method;
  /** request url */
  request.url = url;
  return request;
})();

/** @description request parameter type for postShopProductList */
export interface PostShopProductListOption {
  body?: {
    root?: {
      /**
        @description
          产品分类id */
      productCategoryId: string;
      /**
        @description
          产品功能id */
      productFunctionId: string;
      /**
        @description
          搜索关联词 */
      keyword: string;
      pageNo: number;
      pageSize: number;
      total: number;
      rootProductCategoryId: string;
    };
  };
}

/** @description response type for postShopProductList */
export interface PostShopProductListResponse {
  /**
   * @description
   *   successful operation
   */
  200: {
    result?: number;
    message?: string;
    data?: {
      page?: {
        pageNumber?: number;
        pageSize?: number;
        total?: number;
      };
      records?: Array<{
        id: string;
        name: string;
        imageUrl: string;
        /**
        @description
          产品图片json信息 */
        productimageliststore: string;
      }>;
    };
  };
}

export type PostShopProductListResponseSuccess =
  PostShopProductListResponse[200];
/**
 * @description
 *   产品列表
 * @tags 海外官网
 * @consumes application/json
 */
export const postShopProductList = /* #__PURE__ */ (() => {
  const method = "post";
  const url = "/shop/product/list";
  function request(
    option?: PostShopProductListOption
  ): Promise<PostShopProductListResponseSuccess> {
    return requester(request.url, {
      method: request.method,
      ...option,
    }) as unknown as Promise<PostShopProductListResponseSuccess>;
  }

  /** http method */
  request.method = method;
  /** request url */
  request.url = url;
  return request;
})();

/** @description request parameter type for postShopProductDetail */
export interface PostShopProductDetailOption {
  body?: {
    root?: {
      /**
        @description
          产品id */
      id: string;
    };
  };
}

/** @description response type for postShopProductDetail */
export interface PostShopProductDetailResponse {
  /**
   * @description
   *   successful operation
   */
  200: {
    result?: number;
    message?: string;
    data?: {
      id?: string;
      description?: string;
      freezeStore?: string;
      htmlFilePath?: string;
      marketPrice?: number;
      metaDescription?: string;
      metaKeywords?: string;
      name?: string;
      englishName?: string;
      model?: string;
      price?: string;
      brand_id?: string;
      /**
        @description
          规格参数 */
      productAttributeList: Array<{
        /**
        @description
          规格名 */
        name: string;
        /**
        @description
          规格值 */
        value: string;
      }>;
      /**
        @description
          产品规格sku */
      ticketTypes: Array<{
        /**
        @description
          产品名称、编码 */
        rank: string;
        /**
        @description
          规格型号 */
        typeName: string;
        /**
        @description
          产品价格 */
        field_9: string;
      }>;
    };
  };
}

export type PostShopProductDetailResponseSuccess =
  PostShopProductDetailResponse[200];
/**
 * @description
 *   产品详情
 * @tags 海外官网
 * @consumes application/json
 */
export const postShopProductDetail = /* #__PURE__ */ (() => {
  const method = "post";
  const url = "/shop/product/detail";
  function request(
    option?: PostShopProductDetailOption
  ): Promise<PostShopProductDetailResponseSuccess> {
    return requester(request.url, {
      method: request.method,
      ...option,
    }) as unknown as Promise<PostShopProductDetailResponseSuccess>;
  }

  /** http method */
  request.method = method;
  /** request url */
  request.url = url;
  return request;
})();

/** @description request parameter type for postShopProductCategorySearch */
export interface PostShopProductCategorySearchOption {
  body?: {
    root?: {
      pageNo?: number;
      pageSize?: number;
      keyword?: string;
      rootProductCategoryId: string;
      productCategoryId?: string;
      productFunctionId?: string;
    };
  };
}

/** @description response type for postShopProductCategorySearch */
export interface PostShopProductCategorySearchResponse {
  /**
   * @description
   *   successful operation
   */
  200: {};
}

export type PostShopProductCategorySearchResponseSuccess =
  PostShopProductCategorySearchResponse[200];
/**
 * @description
 *   分类搜索
 * @tags 海外官网
 * @consumes application/json
 */
export const postShopProductCategorySearch = /* #__PURE__ */ (() => {
  const method = "post";
  const url = "/shop/product/categorySearch";
  function request(
    option?: PostShopProductCategorySearchOption
  ): Promise<PostShopProductCategorySearchResponseSuccess> {
    return requester(request.url, {
      method: request.method,
      ...option,
    }) as unknown as Promise<PostShopProductCategorySearchResponseSuccess>;
  }

  /** http method */
  request.method = method;
  /** request url */
  request.url = url;
  return request;
})();