@timetac/js-client-library
Advanced tools
Comparing version 0.16.0 to 0.17.0
import BaseApi from '../baseApi'; | ||
import { RequestParams } from '../utils/params/requestParams'; | ||
import { ReadRawResponse } from '../utils/response/readRawResponse'; | ||
import { Department } from './types'; | ||
@@ -7,3 +8,4 @@ export declare class DepartmentsEndpoint extends BaseApi { | ||
read(params?: RequestParams<Department>): Promise<Department[]>; | ||
readRaw(params: RequestParams<Department>): Promise<ReadRawResponse<Department>>; | ||
readById(id: number, params?: RequestParams<Department>): Promise<Department>; | ||
} |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DepartmentsEndpoint = void 0; | ||
const baseApi_1 = require("../baseApi"); | ||
const rawApiResponse_1 = require("../utils/response/rawApiResponse"); | ||
const readRawResponse_1 = require("../utils/response/readRawResponse"); | ||
const resourceResponse_1 = require("../utils/response/resourceResponse"); | ||
const responseHandlers = require("../utils/response/responseHandlers"); | ||
@@ -15,2 +27,8 @@ class DepartmentsEndpoint extends baseApi_1.default { | ||
} | ||
readRaw(params) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const response = this._get(`${this.getResourceName()}/read`, { params }); | ||
return readRawResponse_1.createReadRawResponse(resourceResponse_1.createResourceResponse(yield rawApiResponse_1.createRawApiResponse(response)), params); | ||
}); | ||
} | ||
readById(id, params) { | ||
@@ -17,0 +35,0 @@ const response = this._get(`${this.getResourceName()}/read/${id}`, { params }); |
export declare type Department = { | ||
id?: number; | ||
id: number; | ||
department_name?: string; | ||
@@ -4,0 +4,0 @@ active?: boolean; |
import { UserStatusOverviewStatus } from '../enums'; | ||
export declare type UserStatusOverview = { | ||
user_id: number; | ||
department_id?: number; | ||
time_tracking_id: number; | ||
@@ -5,0 +6,0 @@ time_tracking_start_time: string | null; |
{ | ||
"name": "@timetac/js-client-library", | ||
"version": "0.16.0", | ||
"version": "0.17.0", | ||
"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
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
214883
3148