UNPKG

@vectorize-io/vectorize-client

Version:
120 lines (105 loc) 2.93 kB
/* tslint:disable */ /* eslint-disable */ /** * Vectorize API (Beta) * API for Vectorize services * * The version of the OpenAPI document: 0.0.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; /** * * @export * @interface AdvancedQuery */ export interface AdvancedQuery { /** * * @type {string} * @memberof AdvancedQuery */ mode?: AdvancedQueryModeEnum; /** * * @type {Array<string>} * @memberof AdvancedQuery */ textFields?: Array<string>; /** * * @type {string} * @memberof AdvancedQuery */ matchType?: AdvancedQueryMatchTypeEnum; /** * * @type {number} * @memberof AdvancedQuery */ textBoost?: number; /** * * @type {{ [key: string]: any; }} * @memberof AdvancedQuery */ filters?: { [key: string]: any; }; } /** * @export */ export const AdvancedQueryModeEnum = { Text: 'text', Vector: 'vector', Hybrid: 'hybrid' } as const; export type AdvancedQueryModeEnum = typeof AdvancedQueryModeEnum[keyof typeof AdvancedQueryModeEnum]; /** * @export */ export const AdvancedQueryMatchTypeEnum = { Match: 'match', MatchPhrase: 'match_phrase', MultiMatch: 'multi_match' } as const; export type AdvancedQueryMatchTypeEnum = typeof AdvancedQueryMatchTypeEnum[keyof typeof AdvancedQueryMatchTypeEnum]; /** * Check if a given object implements the AdvancedQuery interface. */ export function instanceOfAdvancedQuery(value: object): value is AdvancedQuery { return true; } export function AdvancedQueryFromJSON(json: any): AdvancedQuery { return AdvancedQueryFromJSONTyped(json, false); } export function AdvancedQueryFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdvancedQuery { if (json == null) { return json; } return { 'mode': json['mode'] == null ? undefined : json['mode'], 'textFields': json['text-fields'] == null ? undefined : json['text-fields'], 'matchType': json['match-type'] == null ? undefined : json['match-type'], 'textBoost': json['text-boost'] == null ? undefined : json['text-boost'], 'filters': json['filters'] == null ? undefined : json['filters'], }; } export function AdvancedQueryToJSON(json: any): AdvancedQuery { return AdvancedQueryToJSONTyped(json, false); } export function AdvancedQueryToJSONTyped(value?: AdvancedQuery | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'mode': value['mode'], 'text-fields': value['textFields'], 'match-type': value['matchType'], 'text-boost': value['textBoost'], 'filters': value['filters'], }; }