<commit_before>import type {
  ResourceList, Resource
} from './core'
import type { ProductResponse } from './catalogs-products'
import type { Catalog, CatalogFilter } from './catalogs'
import type { Node } from './nodes'
import type { Hierarchy } from './hierarchies'
import type { File } from './file'

export interface CatalogResource<T> extends Resource<T> {
  included?: {
    main_images?: File[];
    files?: File[];
  };
}

export interface CatalogResourceList<T> extends ResourceList<T> {
  included?: {
    main_images?: File[];
    files?: File[];
  };
}

interface CatalogQueryableResource<Endpoints, DataType, Filter> {

  Filter(filter: Filter): Endpoints

  Limit(value: number): Endpoints

  Offset(value: number): Endpoints

}

type CatalogProductsInclude = 'main_image' | 'files'

interface CatalogProductsQueryableResource<
  Endpoints,
  DataType,
  Filter,
  Include
> extends CatalogQueryableResource<Endpoints, DataType, Filter> {

  With(includes: Include | Include[]): Endpoints<commit_msg>feat: add new option to catalog products include (#616) (#618)<commit_after>import type {
  ResourceList, Resource
} from './core'
import type { ProductResponse } from './catalogs-products'
import type { Catalog, CatalogFilter } from './catalogs'
import type { Node } from './nodes'
import type { Hierarchy } from './hierarchies'
import type { File } from './file'

export interface CatalogResource<T> extends Resource<T> {
  included?: {
    main_images?: File[];
    files?: File[];
  };
}

export interface CatalogResourceList<T> extends ResourceList<T> {
  included?: {
    main_images?: File[];
    files?: File[];
  };
}

interface CatalogQueryableResource<Endpoints, DataType, Filter> {

  Filter(filter: Filter): Endpoints

  Limit(value: number): Endpoints

  Offset(value: number): Endpoints

}

type CatalogProductsInclude = 'main_image' | 'files' | 'component_products'

interface CatalogProductsQueryableResource<
  Endpoints,
  DataType,
  Filter,
  Include
> extends CatalogQueryableResource<Endpoints, DataType, Filter> {

  With(includes: Include | Include[]): Endpoints
{'fraction_non_alphanumeric': 0.12369172216936251, 'fraction_numerical': 0.0028544243577545195, 'mean_word_length': 4.841666666666667, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7450229', 'n_tokens_mistral': 639, 'n_tokens_neox': 601, 'n_words': 175}