@timetac/js-client-library
Advanced tools
Comparing version 0.2.3 to 0.2.4
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { AbsenceDay } from './types'; | ||
@@ -4,0 +4,0 @@ export declare class AbsenceDaysEndpoint extends BaseApi { |
@@ -5,3 +5,3 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
@@ -14,3 +14,3 @@ class AbsenceDaysEndpoint extends baseApi_1.default { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -23,0 +23,0 @@ return responseHandlers.required(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { Absence, AbsenceApprove, AbsenceCreate, AbsenceReject, AbsenceUpdate } from './types'; | ||
@@ -4,0 +4,0 @@ export declare class AbsencesEndpoint extends BaseApi { |
@@ -6,3 +6,3 @@ "use strict"; | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
class AbsencesEndpoint extends baseApi_1.default { | ||
@@ -14,3 +14,3 @@ constructor() { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -23,0 +23,0 @@ return responseHandlers.required(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { ApiResponseOnSuccess } from '../utils/response/apiResponse'; | ||
@@ -4,0 +4,0 @@ import { AbsenceType } from './types'; |
@@ -5,3 +5,3 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
@@ -14,3 +14,3 @@ class AbsenceTypesEndpoint extends baseApi_1.default { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readRaw(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -26,3 +26,3 @@ return responseHandlers.toApiResponse(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -29,0 +29,0 @@ return responseHandlers.required(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { Department } from './types'; | ||
@@ -4,0 +4,0 @@ export declare class DepartmentsEndpoint extends BaseApi { |
@@ -5,3 +5,3 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
@@ -14,3 +14,3 @@ class DepartmentsEndpoint extends baseApi_1.default { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -23,0 +23,0 @@ return responseHandlers.required(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { FavouriteTask, FavouriteTaskCreate } from './types'; | ||
@@ -4,0 +4,0 @@ export declare class FavouriteTasksEndpoint extends BaseApi { |
@@ -6,3 +6,3 @@ "use strict"; | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
class FavouriteTasksEndpoint extends baseApi_1.default { | ||
@@ -14,3 +14,3 @@ constructor() { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -23,0 +23,0 @@ return responseHandlers.required(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { GeneralSetting } from './types'; | ||
@@ -4,0 +4,0 @@ import { ApiResponseOnSuccess } from '../utils/response/apiResponse'; |
@@ -5,3 +5,3 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
@@ -14,3 +14,3 @@ class GeneralSettingsEndpoint extends baseApi_1.default { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readRaw(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -26,3 +26,3 @@ return responseHandlers.toApiResponse(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -32,3 +32,3 @@ return responseHandlers.required(response); | ||
readBySettingType(settingType) { | ||
const params = new requestParams_1.default().eq('setting_type', settingType).getParams(); | ||
const params = new requestParams_1.RequestParams().eq('setting_type', settingType).getParams(); | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -35,0 +35,0 @@ return responseHandlers.required(response); |
import { ApiConfig, ApiState } from './baseApi'; | ||
import RequestParams from './utils/requestParams/requestParams'; | ||
import { AbsenceDaysEndpoint } from './absenceDays'; | ||
@@ -43,3 +42,5 @@ import { AbsencesEndpoint } from './absences'; | ||
export * from './enums'; | ||
export { RequestParams }; | ||
export { RequestParams } from './utils/params/requestParams'; | ||
export { PagingParams } from './utils/params/pagingParams'; | ||
export { Response } from './utils/response/response'; | ||
export default class Api { | ||
@@ -46,0 +47,0 @@ config: ApiConfig; |
@@ -13,5 +13,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RequestParams = void 0; | ||
const requestParams_1 = require("./utils/requestParams/requestParams"); | ||
exports.RequestParams = requestParams_1.default; | ||
exports.PagingParams = exports.RequestParams = void 0; | ||
const absenceDays_1 = require("./absenceDays"); | ||
@@ -38,2 +36,6 @@ const absences_1 = require("./absences"); | ||
__exportStar(require("./enums"), exports); | ||
var requestParams_1 = require("./utils/params/requestParams"); | ||
Object.defineProperty(exports, "RequestParams", { enumerable: true, get: function () { return requestParams_1.RequestParams; } }); | ||
var pagingParams_1 = require("./utils/params/pagingParams"); | ||
Object.defineProperty(exports, "PagingParams", { enumerable: true, get: function () { return pagingParams_1.PagingParams; } }); | ||
class Api { | ||
@@ -40,0 +42,0 @@ constructor(config) { |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { Project } from './types'; | ||
@@ -4,0 +4,0 @@ import { ApiResponseOnSuccess } from '../utils/response/apiResponse'; |
@@ -5,3 +5,3 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
@@ -14,3 +14,3 @@ class ProjectsEndpoint extends baseApi_1.default { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readRaw(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -26,3 +26,3 @@ return responseHandlers.toApiResponse(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -29,0 +29,0 @@ return responseHandlers.required(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { RecentTask, RecentTaskCreate } from './types'; | ||
@@ -4,0 +4,0 @@ export declare class RecentTasksEndpoint extends BaseApi { |
@@ -6,3 +6,3 @@ "use strict"; | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
class RecentTasksEndpoint extends baseApi_1.default { | ||
@@ -14,3 +14,3 @@ constructor() { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -23,0 +23,0 @@ return responseHandlers.required(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { Task } from './types'; | ||
import { ApiResponseOnSuccess } from '../utils/response/apiResponse'; | ||
import { PagingParams } from '../utils/params/pagingParams'; | ||
import { Response } from '../utils/response/response'; | ||
export declare class TasksEndpoint extends BaseApi { | ||
readonly resourceName = "tasks"; | ||
read(requestParams?: RequestParams<Task> | Object): Promise<Task[]>; | ||
readRaw(requestParams?: RequestParams<Task> | Object): Promise<ApiResponseOnSuccess<Task[]>>; | ||
readRaw(requestParams: RequestParams<Task> | PagingParams<Task>): Promise<Response<Task>>; | ||
readById(id: number, requestParams?: RequestParams<Task> | Object): Promise<Task>; | ||
@@ -10,0 +11,0 @@ create(data: Task): Promise<Task>; |
@@ -5,4 +5,5 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
const response_1 = require("../utils/response/response"); | ||
class TasksEndpoint extends baseApi_1.default { | ||
@@ -14,3 +15,3 @@ constructor() { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,8 +21,8 @@ return responseHandlers.list(response); | ||
readRaw(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams.getParams(); | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
return responseHandlers.toApiResponse(response); | ||
return response_1.createResponse(response, requestParams); | ||
} | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -28,0 +29,0 @@ return responseHandlers.required(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { TeamMember } from './types'; | ||
@@ -4,0 +4,0 @@ export declare class TeamMembersEndpoint extends BaseApi { |
@@ -5,3 +5,3 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
@@ -14,3 +14,3 @@ class TeamMembersEndpoint extends baseApi_1.default { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -23,0 +23,0 @@ return responseHandlers.required(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { Team } from './types'; | ||
@@ -4,0 +4,0 @@ export declare class TeamsEndpoint extends BaseApi { |
@@ -5,3 +5,3 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
@@ -14,3 +14,3 @@ class TeamsEndpoint extends baseApi_1.default { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -23,0 +23,0 @@ return responseHandlers.required(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { TimesheetAccounting } from './types'; | ||
@@ -4,0 +4,0 @@ export declare class TimesheetAccountingsEndpoint extends BaseApi { |
@@ -5,3 +5,3 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
@@ -14,3 +14,3 @@ class TimesheetAccountingsEndpoint extends baseApi_1.default { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -23,0 +23,0 @@ return responseHandlers.required(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { TimeTracking, TimeTrackingCreate, StartTimeTrackingData, StopTimeTrackingData } from './types'; | ||
@@ -4,0 +4,0 @@ export declare class TimeTrackingsEndpoint extends BaseApi { |
@@ -5,3 +5,3 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
@@ -14,3 +14,3 @@ class TimeTrackingsEndpoint extends baseApi_1.default { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -26,3 +26,3 @@ return responseHandlers.required(response); | ||
current(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/current`, { params }); | ||
@@ -29,0 +29,0 @@ return responseHandlers.optional(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { TodoTask, TodoTaskCreate } from './types'; | ||
@@ -4,0 +4,0 @@ export declare class TodoTasksEndpoint extends BaseApi { |
@@ -6,3 +6,3 @@ "use strict"; | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
class TodoTasksEndpoint extends baseApi_1.default { | ||
@@ -14,3 +14,3 @@ constructor() { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -23,0 +23,0 @@ return responseHandlers.required(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { User } from './types'; | ||
@@ -4,0 +4,0 @@ import { ApiResponseOnSuccess } from '../utils/response/apiResponse'; |
@@ -5,3 +5,3 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
@@ -14,3 +14,3 @@ class UsersEndpoint extends baseApi_1.default { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readRaw(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -26,3 +26,3 @@ return responseHandlers.toApiResponse(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -32,3 +32,3 @@ return responseHandlers.required(response); | ||
readMe(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/me`, { params }); | ||
@@ -35,0 +35,0 @@ return responseHandlers.required(response); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { UserStatusOverview } from './types'; | ||
@@ -4,0 +4,0 @@ export declare class UserStatusOverviewsEndpoint extends BaseApi { |
@@ -5,3 +5,3 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
const requestParams_1 = require("../utils/params/requestParams"); | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
@@ -14,3 +14,3 @@ class UserStatusOverviewsEndpoint extends baseApi_1.default { | ||
read(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
@@ -20,3 +20,3 @@ return responseHandlers.list(response); | ||
readById(id, requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const params = requestParams instanceof requestParams_1.RequestParams ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); | ||
@@ -23,0 +23,0 @@ return responseHandlers.required(response); |
{ | ||
"name": "@timetac/js-client-library", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "TimeTac API JS client library", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/TimeTac/js-client-library#readme", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
155026
150
2208