@timetac/js-client-library
Advanced tools
Comparing version 0.1.6 to 0.1.7
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { ApiResponseOnSuccess } from '../utils/response/apiResponse'; | ||
import { AbsenceType } from './types'; | ||
@@ -7,2 +8,3 @@ export default class AbsenceTypes extends BaseApi { | ||
read(requestParams?: RequestParams<AbsenceType> | Object): Promise<AbsenceType[]>; | ||
readRaw(requestParams?: RequestParams<AbsenceType> | Object): Promise<ApiResponseOnSuccess<AbsenceType[]>>; | ||
readById(id: number, requestParams?: RequestParams<AbsenceType> | Object): Promise<AbsenceType>; | ||
@@ -9,0 +11,0 @@ create(): Promise<AbsenceType>; |
@@ -16,2 +16,7 @@ "use strict"; | ||
} | ||
readRaw(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
return responseHandlers_1.default.toApiResponse(response); | ||
} | ||
readById(id, requestParams) { | ||
@@ -18,0 +23,0 @@ const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { GeneralSetting } from './types'; | ||
import { ApiResponseOnSuccess } from '../utils/response/apiResponse'; | ||
export default class GeneralSettings extends BaseApi { | ||
readonly resourceName = "generalSettings"; | ||
read(requestParams?: RequestParams<GeneralSetting> | Object): Promise<GeneralSetting[]>; | ||
readRaw(requestParams?: RequestParams<GeneralSetting> | Object): Promise<ApiResponseOnSuccess<GeneralSetting[]>>; | ||
readById(id: number, requestParams?: RequestParams<GeneralSetting> | Object): Promise<GeneralSetting>; | ||
readBySettingType(settingType: string): Promise<GeneralSetting>; | ||
} |
@@ -16,2 +16,7 @@ "use strict"; | ||
} | ||
readRaw(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
return responseHandlers_1.default.toApiResponse(response); | ||
} | ||
readById(id, requestParams) { | ||
@@ -18,0 +23,0 @@ const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { Project } from './types'; | ||
import { ApiResponseOnSuccess } from '../utils/response/apiResponse'; | ||
export default class Projects extends BaseApi { | ||
readonly resourceName = "projects"; | ||
read(requestParams?: RequestParams<Project> | Object): Promise<Project[]>; | ||
readRaw(requestParams?: RequestParams<Project> | Object): Promise<ApiResponseOnSuccess<Project[]>>; | ||
readById(id: number, requestParams?: RequestParams<Project> | Object): Promise<Project>; | ||
@@ -8,0 +10,0 @@ create(): Promise<Project>; |
@@ -16,2 +16,7 @@ "use strict"; | ||
} | ||
readRaw(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
return responseHandlers_1.default.toApiResponse(response); | ||
} | ||
readById(id, requestParams) { | ||
@@ -18,0 +23,0 @@ const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { Task } from './types'; | ||
import { ApiResponseOnSuccess } from '../utils/response/apiResponse'; | ||
export default class Tasks extends BaseApi { | ||
readonly resourceName = "tasks"; | ||
read(requestParams?: RequestParams<Task> | Object): Promise<Task[]>; | ||
readRaw(requestParams?: RequestParams<Task> | Object): Promise<ApiResponseOnSuccess<Task[]>>; | ||
readById(id: number, requestParams?: RequestParams<Task> | Object): Promise<Task>; | ||
@@ -8,0 +10,0 @@ create(data: Task): Promise<Task>; |
@@ -16,2 +16,7 @@ "use strict"; | ||
} | ||
readRaw(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
return responseHandlers_1.default.toApiResponse(response); | ||
} | ||
readById(id, requestParams) { | ||
@@ -18,0 +23,0 @@ const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { User } from './types'; | ||
import { ApiResponseOnSuccess } from '../utils/response/apiResponse'; | ||
export default class Users extends BaseApi { | ||
readonly resourceName = "users"; | ||
read(requestParams?: RequestParams<User> | Object): Promise<User[]>; | ||
readRaw(requestParams?: RequestParams<User> | Object): Promise<ApiResponseOnSuccess<User[]>>; | ||
readById(id: number, requestParams?: RequestParams<User> | Object): Promise<User>; | ||
@@ -8,0 +10,0 @@ readMe(requestParams?: RequestParams<User> | Object): Promise<User>; |
@@ -16,2 +16,7 @@ "use strict"; | ||
} | ||
readRaw(requestParams) { | ||
const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
return responseHandlers_1.default.toApiResponse(response); | ||
} | ||
readById(id, requestParams) { | ||
@@ -18,0 +23,0 @@ const params = requestParams instanceof requestParams_1.default ? requestParams.getParams() : requestParams; |
{ | ||
"name": "@timetac/js-client-library", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"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
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
132457
1978