@xompass/sdk-cloud-api
Version:
Xompass Client for cloud-api
213 lines (208 loc) • 6.74 kB
text/typescript
import { SDKModels } from './SDKModels';
import { XompassBaseApi, XompassAuth } from '../core';
import { XompassClient } from '../../XompassClient';
import { LoopBackFilter } from '../../models';
import { CountReport } from '../../models';
import {
Customer,
Log,
Manager,
Project
} from '../../models';
/**
* Api services for the `CountReport` model.
*/
export abstract class CountReportApi extends XompassBaseApi {
public static model = SDKModels.get('CountReport');
public static findByIdSections(id: any, fk: any, retry = false): Promise<any> {
const _method = 'GET';
const _url = [
XompassClient.getPath() + '/' + XompassClient.getApiVersion(),
'/CountReports/:id/sections/:fk'
].join('');
const _routeParams = {
id,
fk
};
const _postBody = {};
const _urlParams: any = {};
return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry);
}
public static destroyByIdSections(id: any, fk: any, retry = false): Promise<any> {
const _method = 'DELETE';
const _url = [
XompassClient.getPath() + '/' + XompassClient.getApiVersion(),
'/CountReports/:id/sections/:fk'
].join('');
const _routeParams = {
id,
fk
};
const _postBody = {};
const _urlParams: any = {};
return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry);
}
public static updateByIdSections(
id: any,
fk: any,
data: any = {},
retry = false
): Promise<any> {
const _method = 'PUT';
const _url = [
XompassClient.getPath() + '/' + XompassClient.getApiVersion(),
'/CountReports/:id/sections/:fk'
].join('');
const _routeParams = {
id,
fk
};
const _postBody = data;
const _urlParams: any = {};
return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry);
}
public static findByIdTrackingLogs(id: any, fk: any, retry = false): Promise<any> {
const _method = 'GET';
const _url = [
XompassClient.getPath() + '/' + XompassClient.getApiVersion(),
'/CountReports/: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(),
'/CountReports/:id/managers/:fk'
].join('');
const _routeParams = {
id,
fk
};
const _postBody = {};
const _urlParams: any = {};
return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry);
}
public static getSections(id: any, filter: LoopBackFilter = {}, retry = false): Promise<any> {
const _method = 'GET';
const _url = [
XompassClient.getPath() + '/' + XompassClient.getApiVersion(),
'/CountReports/:id/sections'
].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 createSections(id: any, data: any = {}, retry = false): Promise<any> {
const _method = 'POST';
const _url = [
XompassClient.getPath() + '/' + XompassClient.getApiVersion(),
'/CountReports/:id/sections'
].join('');
const _routeParams = {
id
};
const _postBody = data;
const _urlParams: any = {};
return super.request(_method, _url, _routeParams, _urlParams, _postBody, retry);
}
public static countSections(id: any, where: any = {}, retry = false): Promise<any> {
const _method = 'GET';
const _url = [
XompassClient.getPath() + '/' + XompassClient.getApiVersion(),
'/CountReports/:id/sections/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 getTrackingLogs(id: any, filter: LoopBackFilter = {}, retry = false): Promise<any> {
const _method = 'GET';
const _url = [
XompassClient.getPath() + '/' + XompassClient.getApiVersion(),
'/CountReports/: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(),
'/CountReports/: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(),
'/CountReports/: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(),
'/CountReports/: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);
}
/**
* The name of the model represented by this $resource,
* i.e. `CountReport`.
*/
public static getModelName(): string {
return 'CountReport';
}
}