Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@timetac/js-client-library

Package Overview
Dependencies
Maintainers
0
Versions
214
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@timetac/js-client-library - npm Package Compare versions

Comparing version 2.29.2 to 2.30.0

dist/cjs/hourTypes/index.d.ts

3

dist/cjs/index.d.ts

@@ -72,2 +72,3 @@ import { AbsenceBansEndpoint } from './absenceBans';

import { HolidayAdjustmentEndpoint } from './holidayAdjustment';
import { HourTypesEndpoint } from './hourTypes';
export { AbsenceBan } from './absenceBans/types';

@@ -157,2 +158,3 @@ export { AbsenceDay } from './absenceDays/types';

export { HolidayAdjustmentAdd, HolidayAdjustmentRemove } from './holidayAdjustment/types';
export { HourType } from './hourTypes/types';
export default class Api {

@@ -230,2 +232,3 @@ config: ConfigProvider;

holidayAdjustment: HolidayAdjustmentEndpoint;
hourTypes: HourTypesEndpoint;
constructor(config: ApiConfig);

@@ -232,0 +235,0 @@ setBaseUrl(): void;

@@ -89,2 +89,3 @@ "use strict";

const holidayAdjustment_1 = require("./holidayAdjustment");
const hourTypes_1 = require("./hourTypes");
var baseApi_1 = require("./baseApi");

@@ -188,2 +189,3 @@ Object.defineProperty(exports, "BaseApi", { enumerable: true, get: function () { return baseApi_1.default; } });

this.holidayAdjustment = new holidayAdjustment_1.HolidayAdjustmentEndpoint(this.config);
this.hourTypes = new hourTypes_1.HourTypesEndpoint(this.config);
(0, axiosSetup_1.useInterceptors)({ state: this.state, config: this.config, authentication: this.authentication });

@@ -190,0 +192,0 @@ }

5

dist/cjs/utils/canonicalTime.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.callCanonicalTimeUpdater = exports.updateCanonicalTime = void 0;
exports.updateCanonicalTime = updateCanonicalTime;
exports.callCanonicalTimeUpdater = callCanonicalTimeUpdater;
let previousDeviation = 0;

@@ -27,3 +28,2 @@ function updateCanonicalTime(data, onServerTimeDeviationChange) {

}
exports.updateCanonicalTime = updateCanonicalTime;
function callCanonicalTimeUpdater(data, canonicalTimeUpdater) {

@@ -36,3 +36,2 @@ var _a;

}
exports.callCanonicalTimeUpdater = callCanonicalTimeUpdater;
//# sourceMappingURL=canonicalTime.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createPages = void 0;
exports.createPages = createPages;
const requestParams_1 = require("../params/requestParams");

@@ -27,3 +27,2 @@ function createPages(resourceResponse, originalParams) {

}
exports.createPages = createPages;
//# sourceMappingURL=pages.js.map

@@ -67,3 +67,4 @@ import { UserStatusOverview } from '../../userStatusOverview/types';

import { PublicHolidays } from '../../publicHolidays/types';
export declare const resourceNameArray: readonly ["absenceBans", "absenceDays", "absences", "absenceTypes", "automaticBreakTemplates", "changeTimeTrackingRequests", "clients", "countries", "files", "teamMembers", "departments", "generalSettings", "todoTasks", "languages", "legalDocumentAcceptanceLog", "legalDocuments", "messages", "notifications", "notificationsTypeHtml", "notificationUrls", "permissionResolveEntities", "permissionResolveUsers", "permissionResolveDepartments", "permissionResolveAbsenceTypesAndUsers", "recentTasks", "projects", "timezones", "tasks", "teams", "serverCommunication", "timePlannings", "timesheetAccountings", "timesheetAccountingSummaries", "timeTrackings", "translations", "favouriteTasks", "users", "usersReadMe", "userStatusOverview", "feedback", "userDefinedFieldDefinitions", "userDefinedFieldDefinitionOptions", "userTemplateHistory", "salutations", "workSchedules", "workScheduleDays", "workScheduleDayDefinitions", "publicHolidayTemplates", "publicHolidays", "userRoles", "jobQueues", "ssoConfig", "tiers", "onboardingSteps", "onboardingStepToUsers", "timesheetActionLogs", "features", "monitoringRules", "monitoringRuleFrequencies", "monitoringRuleIntervals", "monitoringRuleRecipients", "monitoringRuleTemplates", "geofences", "geofenceToNodes", "integrationCategories", "integrations", "integrationsToCategories", "holidayAdjustment"];
import { HourType } from '../../hourTypes/types';
export declare const resourceNameArray: readonly ["absenceBans", "absenceDays", "absences", "absenceTypes", "automaticBreakTemplates", "changeTimeTrackingRequests", "clients", "countries", "files", "teamMembers", "departments", "generalSettings", "todoTasks", "languages", "legalDocumentAcceptanceLog", "legalDocuments", "messages", "notifications", "notificationsTypeHtml", "notificationUrls", "permissionResolveEntities", "permissionResolveUsers", "permissionResolveDepartments", "permissionResolveAbsenceTypesAndUsers", "recentTasks", "projects", "timezones", "tasks", "teams", "serverCommunication", "timePlannings", "timesheetAccountings", "timesheetAccountingSummaries", "timeTrackings", "translations", "favouriteTasks", "users", "usersReadMe", "userStatusOverview", "feedback", "userDefinedFieldDefinitions", "userDefinedFieldDefinitionOptions", "userTemplateHistory", "salutations", "workSchedules", "workScheduleDays", "workScheduleDayDefinitions", "publicHolidayTemplates", "publicHolidays", "userRoles", "jobQueues", "ssoConfig", "tiers", "onboardingSteps", "onboardingStepToUsers", "timesheetActionLogs", "features", "monitoringRules", "monitoringRuleFrequencies", "monitoringRuleIntervals", "monitoringRuleRecipients", "monitoringRuleTemplates", "geofences", "geofenceToNodes", "integrationCategories", "integrations", "integrationsToCategories", "holidayAdjustment", "hourTypes"];
export type Resources = {

@@ -138,2 +139,3 @@ absenceBans: AbsenceBan;

holidayAdjustment: TimesheetActionLogs;
hourTypes: HourType;
};

@@ -140,0 +142,0 @@ export type ResourceNames = keyof Resources & (typeof resourceNameArray)[number];

@@ -73,2 +73,3 @@ "use strict";

'holidayAdjustment',
'hourTypes',
];

@@ -75,0 +76,0 @@ const _assertResourcesMatchArray = true;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDeltaSyncResponse = void 0;
exports.createDeltaSyncResponse = createDeltaSyncResponse;
function createDeltaSyncResponse(rawApiResponse) {

@@ -28,3 +28,2 @@ return {

}
exports.createDeltaSyncResponse = createDeltaSyncResponse;
function convert(deltaSyncResonse, resource) {

@@ -31,0 +30,0 @@ var _a, _b, _c;

@@ -12,3 +12,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.createRawApiResponse = exports.hasSuccessProperty = void 0;
exports.hasSuccessProperty = hasSuccessProperty;
exports.createRawApiResponse = createRawApiResponse;
function isRawApiResponse(response) {

@@ -30,3 +31,2 @@ if (typeof response !== 'object' || response == null)

}
exports.hasSuccessProperty = hasSuccessProperty;
function createRawApiResponse(promise) {

@@ -69,3 +69,2 @@ return __awaiter(this, void 0, void 0, function* () {

}
exports.createRawApiResponse = createRawApiResponse;
//# sourceMappingURL=rawApiResponse.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createReadRawResponse = void 0;
exports.createReadRawResponse = createReadRawResponse;
const pages_1 = require("../pages/pages");

@@ -11,3 +11,2 @@ function createReadRawResponse(resourceResponse, originalParams) {

}
exports.createReadRawResponse = createReadRawResponse;
//# sourceMappingURL=readRawResponse.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createResourceResponse = void 0;
exports.createResourceResponse = createResourceResponse;
function createResourceResponse(rawApiResponse) {

@@ -14,3 +14,2 @@ var _a, _b, _c, _d;

}
exports.createResourceResponse = createResourceResponse;
//# sourceMappingURL=resourceResponse.js.map

@@ -12,3 +12,13 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.nonEntityResult = exports.list = exports.optional = exports.plainObject = exports.serverCommunication = exports.requiredSingle = exports.requiredBatch = exports.required = exports.toApiResponse = exports.toApiBatchResponse = exports.getParsedErrorMessage = void 0;
exports.getParsedErrorMessage = getParsedErrorMessage;
exports.toApiBatchResponse = toApiBatchResponse;
exports.toApiResponse = toApiResponse;
exports.required = required;
exports.requiredBatch = requiredBatch;
exports.requiredSingle = requiredSingle;
exports.serverCommunication = serverCommunication;
exports.plainObject = plainObject;
exports.optional = optional;
exports.list = list;
exports.nonEntityResult = nonEntityResult;
const rawApiResponse_1 = require("./rawApiResponse");

@@ -31,3 +41,2 @@ function getParsedErrorMessage(apiResponse) {

}
exports.getParsedErrorMessage = getParsedErrorMessage;
function getParsedErrorMessageObject(apiResponse, resolved) {

@@ -77,3 +86,2 @@ const { response, message, stack, code } = getParsedErrorMessage(apiResponse);

}
exports.toApiBatchResponse = toApiBatchResponse;
function toApiResponse(promise) {

@@ -92,3 +100,2 @@ return __awaiter(this, void 0, void 0, function* () {

}
exports.toApiResponse = toApiResponse;
function required(promise) {

@@ -110,3 +117,2 @@ return __awaiter(this, void 0, void 0, function* () {

}
exports.required = required;
function requiredBatch(promise) {

@@ -136,3 +142,2 @@ return __awaiter(this, void 0, void 0, function* () {

}
exports.requiredBatch = requiredBatch;
function requiredSingle(promise) {

@@ -154,3 +159,2 @@ return __awaiter(this, void 0, void 0, function* () {

}
exports.requiredSingle = requiredSingle;
function serverCommunication(promise) {

@@ -169,3 +173,2 @@ return __awaiter(this, void 0, void 0, function* () {

}
exports.serverCommunication = serverCommunication;
function plainObject(promise) {

@@ -179,3 +182,2 @@ return __awaiter(this, void 0, void 0, function* () {

}
exports.plainObject = plainObject;
function optional(promise) {

@@ -192,3 +194,2 @@ return __awaiter(this, void 0, void 0, function* () {

}
exports.optional = optional;
function list(promise) {

@@ -205,3 +206,2 @@ return __awaiter(this, void 0, void 0, function* () {

}
exports.list = list;
function nonEntityResult(promise) {

@@ -215,3 +215,2 @@ return __awaiter(this, void 0, void 0, function* () {

}
exports.nonEntityResult = nonEntityResult;
//# sourceMappingURL=responseHandlers.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createUpdateRawResponse = void 0;
exports.createUpdateRawResponse = createUpdateRawResponse;
function createUpdateRawResponse(resourceResponse) {

@@ -9,3 +9,2 @@ return {

}
exports.createUpdateRawResponse = createUpdateRawResponse;
//# sourceMappingURL=updateRawResponse.js.map
import BaseApi from '../baseApi';
import { Entity, LibraryReturn } from '../utils/response/apiResponse';
import { ParsedErrorMesage, Required } from '../utils/response/responseHandlers';
import { RequestParams } from '../utils/params/requestParams';
import { LibraryReturn } from '../utils/response/apiResponse';
import { ParsedErrorMesage } from '../utils/response/responseHandlers';
import { WorkScheduleDayDefinitionCreate, WorkScheduleDayDefinitionUpdate, WorkScheduleDayDefinition } from './types';

@@ -10,5 +9,6 @@ declare const resourceName = "workScheduleDayDefinitions";

readonly resourceName = "workScheduleDayDefinitions";
create(data: WorkScheduleDayDefinitionCreate, params?: RequestParams<Entity<ResourceName>>): Required<ResourceName, Entity<ResourceName>[]>;
create(data: WorkScheduleDayDefinitionCreate | WorkScheduleDayDefinitionCreate[]): Promise<LibraryReturn<'workScheduleDayDefinitions', WorkScheduleDayDefinition> | LibraryReturn<'workScheduleDayDefinitions', (ParsedErrorMesage | WorkScheduleDayDefinition)[]>>;
update(data: WorkScheduleDayDefinitionUpdate | WorkScheduleDayDefinitionUpdate[]): Promise<LibraryReturn<'workScheduleDayDefinitions', WorkScheduleDayDefinition> | LibraryReturn<'workScheduleDayDefinitions', (ParsedErrorMesage | WorkScheduleDayDefinition)[]>>;
delete(id: number): Promise<LibraryReturn<typeof resourceName>>;
}
export {};

@@ -21,5 +21,13 @@ "use strict";

}
create(data, params) {
const response = this._post('create', data, params);
return (0, responseHandlers_1.required)(response);
create(data) {
return __awaiter(this, void 0, void 0, function* () {
if (Array.isArray(data)) {
const response = this._postBatch('create', data);
return (0, responseHandlers_1.requiredBatch)(response);
}
else {
const response = this._post('create', data);
return (0, responseHandlers_1.requiredSingle)(response);
}
});
}

@@ -38,4 +46,8 @@ update(data) {

}
delete(id) {
const response = this._delete(`delete`, { params: { id } });
return (0, responseHandlers_1.requiredSingle)(response);
}
}
exports.WorkScheduleDayDefinitionsEndpoint = WorkScheduleDayDefinitionsEndpoint;
//# sourceMappingURL=index.js.map

@@ -8,2 +8,3 @@ export type WorkScheduleDayDefinition = {

end: string;
valid_for_task_id: number;
};

@@ -10,0 +11,0 @@ export type WorkScheduleDayDefinitionCreate = Omit<Partial<WorkScheduleDayDefinition>, 'id'>;

@@ -72,2 +72,3 @@ import { AbsenceBansEndpoint } from './absenceBans';

import { HolidayAdjustmentEndpoint } from './holidayAdjustment';
import { HourTypesEndpoint } from './hourTypes';
export { AbsenceBan } from './absenceBans/types';

@@ -157,2 +158,3 @@ export { AbsenceDay } from './absenceDays/types';

export { HolidayAdjustmentAdd, HolidayAdjustmentRemove } from './holidayAdjustment/types';
export { HourType } from './hourTypes/types';
export default class Api {

@@ -230,2 +232,3 @@ config: ConfigProvider;

holidayAdjustment: HolidayAdjustmentEndpoint;
hourTypes: HourTypesEndpoint;
constructor(config: ApiConfig);

@@ -232,0 +235,0 @@ setBaseUrl(): void;

@@ -72,2 +72,3 @@ import { AbsenceBansEndpoint } from './absenceBans';

import { HolidayAdjustmentEndpoint } from './holidayAdjustment';
import { HourTypesEndpoint } from './hourTypes';
export { default as BaseApi } from './baseApi';

@@ -160,2 +161,3 @@ export * from './enums';

this.holidayAdjustment = new HolidayAdjustmentEndpoint(this.config);
this.hourTypes = new HourTypesEndpoint(this.config);
useInterceptors({ state: this.state, config: this.config, authentication: this.authentication });

@@ -162,0 +164,0 @@ }

@@ -67,3 +67,4 @@ import { UserStatusOverview } from '../../userStatusOverview/types';

import { PublicHolidays } from '../../publicHolidays/types';
export declare const resourceNameArray: readonly ["absenceBans", "absenceDays", "absences", "absenceTypes", "automaticBreakTemplates", "changeTimeTrackingRequests", "clients", "countries", "files", "teamMembers", "departments", "generalSettings", "todoTasks", "languages", "legalDocumentAcceptanceLog", "legalDocuments", "messages", "notifications", "notificationsTypeHtml", "notificationUrls", "permissionResolveEntities", "permissionResolveUsers", "permissionResolveDepartments", "permissionResolveAbsenceTypesAndUsers", "recentTasks", "projects", "timezones", "tasks", "teams", "serverCommunication", "timePlannings", "timesheetAccountings", "timesheetAccountingSummaries", "timeTrackings", "translations", "favouriteTasks", "users", "usersReadMe", "userStatusOverview", "feedback", "userDefinedFieldDefinitions", "userDefinedFieldDefinitionOptions", "userTemplateHistory", "salutations", "workSchedules", "workScheduleDays", "workScheduleDayDefinitions", "publicHolidayTemplates", "publicHolidays", "userRoles", "jobQueues", "ssoConfig", "tiers", "onboardingSteps", "onboardingStepToUsers", "timesheetActionLogs", "features", "monitoringRules", "monitoringRuleFrequencies", "monitoringRuleIntervals", "monitoringRuleRecipients", "monitoringRuleTemplates", "geofences", "geofenceToNodes", "integrationCategories", "integrations", "integrationsToCategories", "holidayAdjustment"];
import { HourType } from '../../hourTypes/types';
export declare const resourceNameArray: readonly ["absenceBans", "absenceDays", "absences", "absenceTypes", "automaticBreakTemplates", "changeTimeTrackingRequests", "clients", "countries", "files", "teamMembers", "departments", "generalSettings", "todoTasks", "languages", "legalDocumentAcceptanceLog", "legalDocuments", "messages", "notifications", "notificationsTypeHtml", "notificationUrls", "permissionResolveEntities", "permissionResolveUsers", "permissionResolveDepartments", "permissionResolveAbsenceTypesAndUsers", "recentTasks", "projects", "timezones", "tasks", "teams", "serverCommunication", "timePlannings", "timesheetAccountings", "timesheetAccountingSummaries", "timeTrackings", "translations", "favouriteTasks", "users", "usersReadMe", "userStatusOverview", "feedback", "userDefinedFieldDefinitions", "userDefinedFieldDefinitionOptions", "userTemplateHistory", "salutations", "workSchedules", "workScheduleDays", "workScheduleDayDefinitions", "publicHolidayTemplates", "publicHolidays", "userRoles", "jobQueues", "ssoConfig", "tiers", "onboardingSteps", "onboardingStepToUsers", "timesheetActionLogs", "features", "monitoringRules", "monitoringRuleFrequencies", "monitoringRuleIntervals", "monitoringRuleRecipients", "monitoringRuleTemplates", "geofences", "geofenceToNodes", "integrationCategories", "integrations", "integrationsToCategories", "holidayAdjustment", "hourTypes"];
export type Resources = {

@@ -138,2 +139,3 @@ absenceBans: AbsenceBan;

holidayAdjustment: TimesheetActionLogs;
hourTypes: HourType;
};

@@ -140,0 +142,0 @@ export type ResourceNames = keyof Resources & (typeof resourceNameArray)[number];

@@ -70,2 +70,3 @@ export const resourceNameArray = [

'holidayAdjustment',
'hourTypes',
];

@@ -72,0 +73,0 @@ const _assertResourcesMatchArray = true;

import BaseApi from '../baseApi';
import { Entity, LibraryReturn } from '../utils/response/apiResponse';
import { ParsedErrorMesage, Required } from '../utils/response/responseHandlers';
import { RequestParams } from '../utils/params/requestParams';
import { LibraryReturn } from '../utils/response/apiResponse';
import { ParsedErrorMesage } from '../utils/response/responseHandlers';
import { WorkScheduleDayDefinitionCreate, WorkScheduleDayDefinitionUpdate, WorkScheduleDayDefinition } from './types';

@@ -10,5 +9,6 @@ declare const resourceName = "workScheduleDayDefinitions";

readonly resourceName = "workScheduleDayDefinitions";
create(data: WorkScheduleDayDefinitionCreate, params?: RequestParams<Entity<ResourceName>>): Required<ResourceName, Entity<ResourceName>[]>;
create(data: WorkScheduleDayDefinitionCreate | WorkScheduleDayDefinitionCreate[]): Promise<LibraryReturn<'workScheduleDayDefinitions', WorkScheduleDayDefinition> | LibraryReturn<'workScheduleDayDefinitions', (ParsedErrorMesage | WorkScheduleDayDefinition)[]>>;
update(data: WorkScheduleDayDefinitionUpdate | WorkScheduleDayDefinitionUpdate[]): Promise<LibraryReturn<'workScheduleDayDefinitions', WorkScheduleDayDefinition> | LibraryReturn<'workScheduleDayDefinitions', (ParsedErrorMesage | WorkScheduleDayDefinition)[]>>;
delete(id: number): Promise<LibraryReturn<typeof resourceName>>;
}
export {};

@@ -11,3 +11,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import BaseApi from '../baseApi';
import { required, requiredBatch, requiredSingle } from '../utils/response/responseHandlers';
import { requiredBatch, requiredSingle } from '../utils/response/responseHandlers';
const resourceName = 'workScheduleDayDefinitions';

@@ -19,5 +19,13 @@ export class WorkScheduleDayDefinitionsEndpoint extends BaseApi {

}
create(data, params) {
const response = this._post('create', data, params);
return required(response);
create(data) {
return __awaiter(this, void 0, void 0, function* () {
if (Array.isArray(data)) {
const response = this._postBatch('create', data);
return requiredBatch(response);
}
else {
const response = this._post('create', data);
return requiredSingle(response);
}
});
}

@@ -36,3 +44,7 @@ update(data) {

}
delete(id) {
const response = this._delete(`delete`, { params: { id } });
return requiredSingle(response);
}
}
//# sourceMappingURL=index.js.map

@@ -8,2 +8,3 @@ export type WorkScheduleDayDefinition = {

end: string;
valid_for_task_id: number;
};

@@ -10,0 +11,0 @@ export type WorkScheduleDayDefinitionCreate = Omit<Partial<WorkScheduleDayDefinition>, 'id'>;

{
"name": "@timetac/js-client-library",
"version": "2.29.2",
"version": "2.30.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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc