// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; import { APIPromise } from '../core/api-promise'; import { buildHeaders } from '../internal/headers'; import { RequestOptions } from '../internal/request-options'; export class Shingles extends APIResource { /** * Generate shingles based on user input query for improved search suggestions. */ list(params: ShingleListParams, options?: RequestOptions): APIPromise { const { 'Accept-Language': acceptLanguage, 'X-Error-Format': xErrorFormat, ...query } = params; return this._client.get('/shingles', { query, ...options, headers: buildHeaders([ { ...(acceptLanguage != null ? { 'Accept-Language': acceptLanguage } : undefined), ...(xErrorFormat != null ? { 'X-Error-Format': xErrorFormat } : undefined), }, options?.headers, ]), }); } } export type ShingleListResponse = unknown; export interface ShingleListParams { /** * Query param */ chatbot_id: string; /** * Query param */ field: string; /** * Query param: Query must be between 3 and 30 characters */ query: string; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export declare namespace Shingles { export { type ShingleListResponse as ShingleListResponse, type ShingleListParams as ShingleListParams }; }