@timetac/js-client-library
Advanced tools
Comparing version 0.1.4 to 0.1.5
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { AbsenceDay } from './types'; | ||
export default class AbsenceDays extends BaseApi { | ||
readonly resourceName = "absencesDays"; | ||
readonly resourceName = "absenceDays"; | ||
read(requestParams?: RequestParams<AbsenceDay> | Object): Promise<AbsenceDay[]>; | ||
readById(id: number, requestParams?: RequestParams<AbsenceDay> | Object): Promise<AbsenceDay>; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
class AbsenceDays extends baseApi_1.default { | ||
constructor() { | ||
super(...arguments); | ||
this.resourceName = 'absencesDays'; | ||
this.resourceName = 'absenceDays'; | ||
} | ||
@@ -11,0 +11,0 @@ read(requestParams) { |
@@ -8,3 +8,2 @@ export declare type AbsenceDay = { | ||
type: string; | ||
other_paid_leave_id: number; | ||
value: number; | ||
@@ -16,3 +15,5 @@ value_unit: string; | ||
begin: string; | ||
updated: string; | ||
updated: string | null; | ||
type_id: number; | ||
subtype_id: number; | ||
}; |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams'; | ||
import { Absence } from './types'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { Absence, AbsenceApprove, AbsenceCreate, AbsenceReject, AbsenceUpdate } from './types'; | ||
export default class Absences extends BaseApi { | ||
@@ -8,6 +8,9 @@ readonly resourceName = "absences"; | ||
readById(id: number, requestParams?: RequestParams<Absence> | Object): Promise<Absence>; | ||
create(): Promise<Absence>; | ||
approve(): Promise<Absence>; | ||
reject(): Promise<Absence>; | ||
cancel(): Promise<Absence>; | ||
create(data: AbsenceCreate): Promise<Absence>; | ||
validate(data: AbsenceCreate): Promise<Absence>; | ||
update(data: AbsenceUpdate): Promise<Absence>; | ||
approve(data: AbsenceApprove): Promise<Absence>; | ||
reject(data: AbsenceReject): Promise<Absence>; | ||
cancel(id: number): Promise<Absence>; | ||
delete(id: number): Promise<Absence>; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
class Absences extends baseApi_1.default { | ||
@@ -21,16 +21,32 @@ constructor() { | ||
} | ||
create() { | ||
throw new Error('not Implemented'); | ||
create(data) { | ||
const response = this._post(`${this.getResourceName()}/create`, data); | ||
return responseHandlers_1.default.required(response); | ||
} | ||
approve() { | ||
throw new Error('not Implemented'); | ||
validate(data) { | ||
const response = this._post(`${this.getResourceName()}/validate`, data); | ||
return responseHandlers_1.default.required(response); | ||
} | ||
reject() { | ||
throw new Error('not Implemented'); | ||
update(data) { | ||
const response = this._put(`${this.getResourceName()}/update`, data); | ||
return responseHandlers_1.default.required(response); | ||
} | ||
cancel() { | ||
throw new Error('not Implemented'); | ||
approve(data) { | ||
const response = this._put(`${this.getResourceName()}/approve`, data); | ||
return responseHandlers_1.default.required(response); | ||
} | ||
reject(data) { | ||
const response = this._put(`${this.getResourceName()}/reject`, data); | ||
return responseHandlers_1.default.required(response); | ||
} | ||
cancel(id) { | ||
const response = this._put(`${this.getResourceName()}/cancel`, { id }); | ||
return responseHandlers_1.default.required(response); | ||
} | ||
delete(id) { | ||
const response = this._delete(`${this.getResourceName()}/delete/${id}`); | ||
return responseHandlers_1.default.required(response); | ||
} | ||
} | ||
exports.default = Absences; | ||
//# sourceMappingURL=index.js.map |
@@ -38,1 +38,11 @@ export declare enum AbsenceStatus { | ||
} | ||
export interface AbsenceApprove { | ||
id: number; | ||
granted_comment?: string; | ||
substitute_enabled?: boolean; | ||
} | ||
export interface AbsenceReject extends AbsenceApprove { | ||
} | ||
export interface AbsenceUpdate extends Partial<Absence> { | ||
id: number; | ||
} |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { AbsenceType } from './types'; | ||
@@ -4,0 +4,0 @@ export default class AbsenceTypes extends BaseApi { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
class AbsenceTypes extends baseApi_1.default { | ||
@@ -7,0 +7,0 @@ constructor() { |
import BaseApi from '../baseApi'; | ||
import { SyncResource } from './types'; | ||
import { ApiResponse } from '../utils/apiResponse'; | ||
import { ApiResponse } from '../utils/response/apiResponse'; | ||
export default class DeltaSync extends BaseApi { | ||
@@ -5,0 +5,0 @@ read(resources: SyncResource[], offset: number, limit: number, since: string | undefined, map: { |
@@ -13,3 +13,3 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
class DeltaSync extends baseApi_1.default { | ||
@@ -16,0 +16,0 @@ read(resources, offset, limit, since, map) { |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { Department } from './types'; | ||
@@ -4,0 +4,0 @@ export default class Departments extends BaseApi { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
class Departments extends baseApi_1.default { | ||
@@ -7,0 +7,0 @@ constructor() { |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { GeneralSetting } from './types'; | ||
@@ -4,0 +4,0 @@ export default class GeneralSettings extends BaseApi { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
class GeneralSettings extends baseApi_1.default { | ||
@@ -7,0 +7,0 @@ constructor() { |
import { ApiConfig } from './baseApi'; | ||
import { Credentials } from './authentication/types'; | ||
import RequestParams from './utils/requestParams'; | ||
import RequestParams from './utils/requestParams/requestParams'; | ||
import AbsenceDays from './absenceDays'; | ||
@@ -21,3 +21,3 @@ import Absences from './absences'; | ||
export { AbsenceDay } from './absenceDays/types'; | ||
export { Absence, AbsenceStatus } from './absences/types'; | ||
export { Absence, AbsenceStatus, AbsenceApprove, AbsenceUpdate, AbsenceReject, AbsenceCreate } from './absences/types'; | ||
export { AbsenceType } from './absenceTypes/types'; | ||
@@ -24,0 +24,0 @@ export { Credentials } from './authentication/types'; |
@@ -23,3 +23,3 @@ "use strict"; | ||
exports.RequestParams = exports.AbsenceStatus = void 0; | ||
const requestParams_1 = require("./utils/requestParams"); | ||
const requestParams_1 = require("./utils/requestParams/requestParams"); | ||
exports.RequestParams = requestParams_1.default; | ||
@@ -26,0 +26,0 @@ const absenceDays_1 = require("./absenceDays"); |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { Project } from './types'; | ||
@@ -4,0 +4,0 @@ export default class Projects extends BaseApi { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
class Projects extends baseApi_1.default { | ||
@@ -7,0 +7,0 @@ constructor() { |
import Base from '../baseApi'; | ||
export default class ServerCommunication extends Base { | ||
read(account: string): Promise<any>; | ||
read(account: string): Promise<import("../utils/response/apiResponse").ApiResponseOnSuccess<unknown>>; | ||
} |
@@ -5,3 +5,3 @@ "use strict"; | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const resourceName = 'serverCommunication'; | ||
@@ -8,0 +8,0 @@ class ServerCommunication extends baseApi_1.default { |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { Task } from './types'; | ||
@@ -4,0 +4,0 @@ export default class Tasks extends BaseApi { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
class Tasks extends baseApi_1.default { | ||
@@ -7,0 +7,0 @@ constructor() { |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { TeamMember } from './types'; | ||
@@ -4,0 +4,0 @@ export default class TeamMembers extends BaseApi { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
class TeamMembers extends baseApi_1.default { | ||
@@ -7,0 +7,0 @@ constructor() { |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { Team } from './types'; | ||
@@ -4,0 +4,0 @@ export default class Teams extends BaseApi { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
class Teams extends baseApi_1.default { | ||
@@ -7,0 +7,0 @@ constructor() { |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { TimesheetAccounting } from './types'; | ||
@@ -4,0 +4,0 @@ export default class TimesheetAccountings extends BaseApi { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
class TimesheetAccountings extends baseApi_1.default { | ||
@@ -7,0 +7,0 @@ constructor() { |
export declare type TimesheetAccounting = { | ||
id?: number; | ||
user_id?: number; | ||
id: number; | ||
user_id: number; | ||
department_id?: number; | ||
@@ -93,3 +93,3 @@ user_role_id?: number; | ||
break_law_check?: number; | ||
workday?: boolean; | ||
workday: boolean; | ||
weekday?: number; | ||
@@ -96,0 +96,0 @@ year?: number; |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { TimeTracking, TimeTrackingCreate, StartTimeTrackingData, StopTimeTrackingData } from './types'; | ||
@@ -4,0 +4,0 @@ export default class TimeTrackings extends BaseApi { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
class TimeTrackings extends baseApi_1.default { | ||
@@ -7,0 +7,0 @@ constructor() { |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { User } from './types'; | ||
@@ -4,0 +4,0 @@ export default class Users extends BaseApi { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
class Users extends baseApi_1.default { | ||
@@ -7,0 +7,0 @@ constructor() { |
import BaseApi from '../baseApi'; | ||
import RequestParams from '../utils/requestParams'; | ||
import RequestParams from '../utils/requestParams/requestParams'; | ||
import { UserStatusOverview } from './types'; | ||
@@ -4,0 +4,0 @@ export default class UserStatusOverviews extends BaseApi { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baseApi_1 = require("../baseApi"); | ||
const responseHandlers_1 = require("../utils/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams"); | ||
const responseHandlers_1 = require("../utils/response/responseHandlers"); | ||
const requestParams_1 = require("../utils/requestParams/requestParams"); | ||
class UserStatusOverviews extends baseApi_1.default { | ||
@@ -7,0 +7,0 @@ constructor() { |
{ | ||
"name": "@timetac/js-client-library", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "TimeTac API JS client library", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/TimeTac/js-client-library#readme", |
# TimeTac Client Library | ||
TimeTac Client Library is a thin wrapper for client to make api request. For more information please visit our [documentation](https://api.timetac.com/). | ||
TimeTac Client Library is a thin wrapper for client to make api request. For more information please visit our [API documentation](https://api.timetac.com/). | ||
@@ -70,8 +70,8 @@ ## Installation | ||
- [x] authentication | ||
- [x] absenceDays | ||
- [x] [authentication](https://api.timetac.com/doc/v3#tag/authentication) | ||
- [x] [absenceDays](https://api.timetac.com/doc/v3#tag/absenceDays) | ||
- [ ] absenceBans | ||
- [x] absences | ||
- [x] [absences](https://api.timetac.com/doc/v3#tag/absences) | ||
- [ ] absenceMultistageResponsibilities | ||
- [x] absenceTypes | ||
- [x] [absenceTypes](https://api.timetac.com/doc/v3#tag/absenceTypes) | ||
- [ ] absenceTypesRestrictToCountries | ||
@@ -84,7 +84,7 @@ - [ ] accessCredentials | ||
- [ ] countries | ||
- [x] deltaSync | ||
- [x] departments | ||
- [x] [deltaSync](https://api.timetac.com/doc/v3#tag/deltaSync) | ||
- [x] [departments](https://api.timetac.com/doc/v3#tag/departments) | ||
- [ ] files | ||
- [ ] generalSettingsChangeLog | ||
- [x] generalSettings | ||
- [x] [generalSettings](https://api.timetac.com/doc/v3#tag/generalSettings) | ||
- [ ] geofences | ||
@@ -102,7 +102,7 @@ - [ ] geofenceToNodes | ||
- [ ] permissionsRelatedEndpoints | ||
- [x] projects | ||
- [x] [projects](https://api.timetac.com/doc/v3#tag/projects) | ||
- [ ] recentTasks | ||
- [ ] salutations | ||
- [ ] schedulings | ||
- [x] serverCommunication | ||
- [x] [serverCommunication]() | ||
- [ ] serverEvents | ||
@@ -116,7 +116,7 @@ - [ ] serverTime | ||
- [ ] surveyQuestionDefinitions | ||
- [x] tasks | ||
- [x] teamMembers | ||
- [x] teams | ||
- [x] timetrackings | ||
- [x] timesheetAccounting | ||
- [x] [tasks](https://api.timetac.com/doc/v3#tag/tasks) | ||
- [x] [teamMembers](https://api.timetac.com/doc/v3#tag/teamMembers) | ||
- [x] [teams](https://api.timetac.com/doc/v3#tag/teams) | ||
- [x] [timetrackings](https://api.timetac.com/doc/v3#tag/timetrackings) | ||
- [x] [timesheetAccounting](https://api.timetac.com/doc/v3#tag/timesheetAccounting) | ||
- [ ] timesheetAccountingSummaries | ||
@@ -127,4 +127,4 @@ - [ ] timetrackingChangelogs | ||
- [ ] translations | ||
- [x] users | ||
- [x] userStatusOverview | ||
- [x] [users](https://api.timetac.com/doc/v3#tag/users) | ||
- [x] [userStatusOverview](https://api.timetac.com/doc/v3#tag/userStatusOverview) | ||
- [ ] zohoSubscriptions | ||
@@ -136,4 +136,10 @@ | ||
The shortest, simplest way of running the test suite is the following command: | ||
```bash | ||
yarn test | ||
``` | ||
## License | ||
[Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
128685
135
1943
140