UNPKG

gigya-node

Version:
114 lines (98 loc) 3.59 kB
import Gigya from './gigya'; import BaseParams from './interfaces/base-params'; import { CoreOptions } from 'request'; export * from './interfaces/gigya-response'; export * from './interfaces/base-params'; export class IDX { constructor(protected gigya: Gigya) { } /** * The method creates a single dataflow and saves it in the system. * * @see http://developers.gigya.com/display/GD/idx.createDataflow+REST */ public createDataflow(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request<any>('idx.createDataflow', params, options); } /** * The method retrieves a dataflow by ID. * * @see http://developers.gigya.com/display/GD/idx.getDataflow+REST */ public getDataflow(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request<any>('idx.getDataflow', params, options); } /** * This method modifies an existing dataflow. * * @see http://developers.gigya.com/display/GD/idx.setDataflow+REST */ public setDataflow(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request<any>('idx.setDataflow', params, options); } /** * The method deletes a Dataflow by ID. * * @see http://developers.gigya.com/display/GD/idx.deleteDataflow+REST */ public deleteDataflow(params: BaseParams & IDXDeleteDataflowParams, options?: CoreOptions | undefined) { return this.gigya.request('idx.deleteDataflow', params, options); } /** * The method schedules a dataflow to execute. * * @see http://developers.gigya.com/display/GD/idx.createScheduling+REST */ public createScheduling(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request<any>('idx.createScheduling', params, options); } /** * The method retrieves a scheduling. * * @see http://developers.gigya.com/display/GD/idx.getScheduling+REST */ public getScheduling(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request<any>('idx.getScheduling', params, options); } /** * The method modifies an existing scheduling. * * @see http://developers.gigya.com/display/GD/idx.setScheduling+REST */ public setScheduling(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request<any>('idx.setScheduling', params, options); } /** * The method deletes a scheduling. * * @see http://developers.gigya.com/display/GD/idx.deleteScheduling+REST */ public deleteScheduling(params: BaseParams & IDXDeleteSchedulingParams, options?: CoreOptions | undefined) { return this.gigya.request('idx.deleteScheduling', params, options); } /** * Searches and retrieves data from the ETL service using an SQL-like query. * * @see http://developers.gigya.com/display/GD/idx.search+REST */ public search(params: BaseParams & IDXSearchParams, options?: CoreOptions | undefined) { return this.gigya.request<any>('idx.search', params, options); } } export interface IDXDeleteDataflowParams { id: string; } export interface IDXDeleteSchedulingParams { id: string; } export interface IDXSearchParams { query: string; openCursor?: boolean; cursorId?: string; } export interface IDXSearchResponse { resultCount: number; totalCount: number; result: Array<any>; } export default IDX;