@indexea/sdk
Version:
Indexea JavaScript SDK (indexea.com)
90 lines (80 loc) • 2.54 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Indexea OpenAPI
* 这是 Indexea 搜索服务平台的 OpenAPI,用于描述平台的所有接口信息,你可以通过这个页面来了解和在线验证平台的所有接口信息。 ### Errors 本 API 使用标准的 HTTP 状态码来指示操作成功或者失败,如果失败将会在 body 中以 JSON 格式提供详细的错误信息,如下所示: ``` { \"error\": 404, \"message\": \"page not found\" } ```
*
* The version of the OpenAPI document: 1.0.0
* Contact: indexea.com@gmail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
/**
* 表单记录过滤器
* @export
* @interface RecordFilter
*/
export interface RecordFilter {
/**
* 过滤条件
* @type {Array<object>}
* @memberof RecordFilter
*/
filters?: Array<object>;
/**
* 聚合字段
* @type {object}
* @memberof RecordFilter
*/
aggs?: object;
/**
* 排序字段
* @type {Array<object>}
* @memberof RecordFilter
*/
sorts?: Array<object>;
/**
* 聚合过滤条件
* @type {object}
* @memberof RecordFilter
*/
postFilters?: object;
}
/**
* Check if a given object implements the RecordFilter interface.
*/
export function instanceOfRecordFilter(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function RecordFilterFromJSON(json: any): RecordFilter {
return RecordFilterFromJSONTyped(json, false);
}
export function RecordFilterFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecordFilter {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'filters': !exists(json, 'filters') ? undefined : json['filters'],
'aggs': !exists(json, 'aggs') ? undefined : json['aggs'],
'sorts': !exists(json, 'sorts') ? undefined : json['sorts'],
'postFilters': !exists(json, 'post_filters') ? undefined : json['post_filters'],
};
}
export function RecordFilterToJSON(value?: RecordFilter | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'filters': value.filters,
'aggs': value.aggs,
'sorts': value.sorts,
'post_filters': value.postFilters,
};
}