UNPKG

gigya-node

Version:
113 lines (98 loc) 4.18 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 IDS { constructor(protected gigya: Gigya) { } /** * This method deletes the specified user's account from Gigya's database. * * @see http://developers.gigya.com/display/GD/ids.deleteAccount+REST */ public deleteAccount(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request('ids.deleteAccount', params, options); } /** * This API retrieves user account data. * * @see http://developers.gigya.com/display/GD/ids.getAccountInfo+REST */ public getAccountInfo(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request<any>('ids.getAccountInfo', params, options); } /** * This API retrieves the counters associated with a user ID (UID). * * @see http://developers.gigya.com/display/GD/ids.getCounters+REST */ public getCounters(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request<any>('ids.getCounters', params, options); } /** * This API returns the counters that were registered for the site using ids.registerCounters. * * @see http://developers.gigya.com/display/GD/ids.getRegisteredCounters+REST */ public getRegisteredCounters(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request<any>('ids.getRegisteredCounters', params, options); } /** * This API retrieves the schema of the Profile object and the Data object (the site specific custom data object) in Gigya's Profile Management. * * @see http://developers.gigya.com/display/GD/ids.getSchema+REST */ public getSchema(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request<any>('ids.getSchema', params, options); } /** * This API increments counters by a specific count and also optionally provides a value for the count. * * @see http://developers.gigya.com/display/GD/ids.incrementCounters+REST */ public incrementCounters(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request('ids.incrementCounters', params, options); } /** * This API registers custom counters that can then be incremented using ids.incrementCounters. * * @see http://developers.gigya.com/display/GD/ids.registerCounters+REST */ public registerCounters(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request('ids.registerCounters', params, options); } /** * Searches and retrieves data from Gigya's Profile Management (IDS) using an SQL-like query. * * @see http://developers.gigya.com/display/GD/ids.search+REST */ public search(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request<any>('ids.search', params, options); } /** * This API sets account data into a user's account. * * @see http://developers.gigya.com/display/GD/ids.setAccountInfo+REST */ public setAccountInfo(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request('ids.setAccountInfo', params, options); } /** * This API allows specifying a schema for Profile Management. * * @see http://developers.gigya.com/display/GD/ids.setSchema+REST */ public setSchema(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request('ids.setSchema', params, options); } /** * This API de-registers counters. * * @see http://developers.gigya.com/display/GD/ids.unregisterCounters+REST */ public unregisterCounters(params: BaseParams & any, options?: CoreOptions | undefined) { return this.gigya.request('ids.unregisterCounters', params, options); } } export default IDS;