UNPKG

@sociate/sociate-api-sdk

Version:

Javascript client for Sociate AI APIs

98 lines (97 loc) 2.37 kB
import { Product } from "./products"; export interface SearchBasicRequest { /** * Text * @description Text for search */ text: string; /** * Filters * @description Search by fields of created product */ filters?: SearchFiltersRequest | null; } export interface SearchAdvancedRequest { /** * Text Include * @description Text include for advanced search */ text_include: string; /** * Text Exclude * @description Text exclude for advanced search */ text_exclude: string; /** * Filters * @description Advanced search filters */ filters?: SearchFiltersRequest | null; } export interface SearchFiltersRequest { /** * Availability * @description Availability filter for products */ availability?: string | null; } export interface SearchProductResponse { /** * Items * @description List of products matching the search */ items: Product[]; } export interface SearchCategoryProductRequest { /** * File * @description File in binary format */ image: string; /** * Style * @description Style of search */ style: string; } export type Category = { /** * The name of the search category. * @description The name of the search category. */ name: string; /** * An optional array of products associated with the search category. * @description An optional array of products associated with the search category. */ items?: Product[]; }; export interface SearchCategoryProductResponse { /** * A list of categories and their associated products. * @description A list of categories and their associated products. */ categories: Category[]; } export interface SearchRequest { /** * Text to include in the search results. * @description Text to include in the search results. */ text_include?: string; /** * Text to exclude from the search results. * @description Text to exclude from the search results. */ text_exclude?: string; /** * Page number for pagination. * @description Page number for pagination. */ page?: number; /** * Number of results per page. * @description Number of results per page. */ size?: number; }