UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

438 lines (433 loc) 13.2 kB
import { SDKModels } from './SDKModels'; import { XompassBaseApi, XompassAuth } from '../core'; import { XompassClient } from '../../XompassClient'; import { LoopBackFilter } from '../../models'; import { StoreDashboard } from '../../models'; import { Log, Project, Manager } from '../../models'; /** * Api services for the `StoreDashboard` model. */ export abstract class StoreDashboardApi extends XompassBaseApi { public static model = SDKModels.get('StoreDashboard'); public static findByIdTrackingLogs(id: any, fk: any, retry = false): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/trackingLogs/:fk' ].join(''); const _routeParams = { id, fk }; const _postBody = {}; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static findByIdManagers(id: any, fk: any, retry = false): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/managers/:fk' ].join(''); const _routeParams = { id, fk }; const _postBody = {}; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static findByIdElements(id: any, fk: any, retry = false): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/elements/:fk' ].join(''); const _routeParams = { id, fk }; const _postBody = {}; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static destroyByIdElements(id: any, fk: any, retry = false): Promise<any> { const _method = 'DELETE'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/elements/:fk' ].join(''); const _routeParams = { id, fk }; const _postBody = {}; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static updateByIdElements( id: any, fk: any, data: any = {}, retry = false ): Promise<any> { const _method = 'PUT'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/elements/:fk' ].join(''); const _routeParams = { id, fk }; const _postBody = { data }; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static findByIdIndicators(id: any, fk: any, retry = false): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/indicators/:fk' ].join(''); const _routeParams = { id, fk }; const _postBody = {}; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static destroyByIdIndicators(id: any, fk: any, retry = false): Promise<any> { const _method = 'DELETE'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/indicators/:fk' ].join(''); const _routeParams = { id, fk }; const _postBody = {}; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static updateByIdIndicators( id: any, fk: any, data: any = {}, retry = false ): Promise<any> { const _method = 'PUT'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/indicators/:fk' ].join(''); const _routeParams = { id, fk }; const _postBody = { data }; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static getTrackingLogs(id: any, filter: LoopBackFilter = {}, retry = false): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/trackingLogs' ].join(''); const _routeParams = { id }; const _postBody = {}; const _urlParams: any = {}; if (typeof filter !== 'undefined' && filter !== null) { _urlParams['filter'] = filter; } return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static countTrackingLogs(id: any, where: any = {}, retry = false): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/trackingLogs/count' ].join(''); const _routeParams = { id }; const _postBody = {}; const _urlParams: any = {}; if (typeof where !== 'undefined' && where !== null) { _urlParams['where'] = where; } return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static getManagers(id: any, filter: LoopBackFilter = {}, retry = false): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/managers' ].join(''); const _routeParams = { id }; const _postBody = {}; const _urlParams: any = {}; if (typeof filter !== 'undefined' && filter !== null) { _urlParams['filter'] = filter; } return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static countManagers(id: any, where: any = {}, retry = false): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/managers/count' ].join(''); const _routeParams = { id }; const _postBody = {}; const _urlParams: any = {}; if (typeof where !== 'undefined' && where !== null) { _urlParams['where'] = where; } return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static getElements(id: any, filter: LoopBackFilter = {}, retry = false): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/elements' ].join(''); const _routeParams = { id }; const _postBody = {}; const _urlParams: any = {}; if (typeof filter !== 'undefined' && filter !== null) { _urlParams['filter'] = filter; } return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static createElements(id: any, data: any = {}, retry = false): Promise<any> { const _method = 'POST'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/elements' ].join(''); const _routeParams = { id }; const _postBody = { data }; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static countElements(id: any, where: any = {}, retry = false): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/elements/count' ].join(''); const _routeParams = { id }; const _postBody = {}; const _urlParams: any = {}; if (typeof where !== 'undefined' && where !== null) { _urlParams['where'] = where; } return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static getIndicators(id: any, filter: LoopBackFilter = {}, retry = false): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/indicators' ].join(''); const _routeParams = { id }; const _postBody = {}; const _urlParams: any = {}; if (typeof filter !== 'undefined' && filter !== null) { _urlParams['filter'] = filter; } return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static createIndicators(id: any, data: any = {}, retry = false): Promise<any> { const _method = 'POST'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/indicators' ].join(''); const _routeParams = { id }; const _postBody = { data }; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static countIndicators(id: any, where: any = {}, retry = false): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/indicators/count' ].join(''); const _routeParams = { id }; const _postBody = {}; const _urlParams: any = {}; if (typeof where !== 'undefined' && where !== null) { _urlParams['where'] = where; } return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static linkElementsIndicators( id: any, nk: any, fk: any, data: any = {}, retry = false ): Promise<any> { const _method = 'PUT'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/elements/:nk/indicators/rel/:fk' ].join(''); const _routeParams = { id, nk, fk }; const _postBody = { data }; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static unlinkElementsIndicators( id: any, nk: any, fk: any, retry = false ): Promise<any> { const _method = 'DELETE'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/elements/:nk/indicators/rel/:fk' ].join(''); const _routeParams = { id, nk, fk }; const _postBody = {}; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static findByIdElementsRels( id: any, nk: any, fk: any, retry = false ): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/elements/:nk/rels/:fk' ].join(''); const _routeParams = { id, nk, fk }; const _postBody = {}; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static updateByIdElementsRels( id: any, nk: any, fk: any, data: any = {}, retry = false ): Promise<any> { const _method = 'PUT'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/elements/:nk/rels/:fk' ].join(''); const _routeParams = { id, nk, fk }; const _postBody = { data }; const _urlParams: any = {}; return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static getElementsRels( id: any, nk: any, filter: LoopBackFilter = {}, retry = false ): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/elements/:nk/rels' ].join(''); const _routeParams = { id, nk }; const _postBody = {}; const _urlParams: any = {}; if (typeof filter !== 'undefined' && filter !== null) { _urlParams['filter'] = filter; } return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } public static countElementsRels( id: any, nk: any, where: any = {}, retry = false ): Promise<any> { const _method = 'GET'; const _url = [ XompassClient.getPath() + '/' + XompassClient.getApiVersion(), '/StoreDashboards/:id/elements/:nk/rels/count' ].join(''); const _routeParams = { id, nk }; const _postBody = {}; const _urlParams: any = {}; if (typeof where !== 'undefined' && where !== null) { _urlParams['where'] = where; } return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry); } /** * The name of the model represented by this $resource, * i.e. `StoreDashboard`. */ public static getModelName(): string { return 'StoreDashboard'; } }