Comparing version
@@ -38,3 +38,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
const { id } = params, remainingParams = __rest(params, ["id"]); | ||
return this.api.get("/absences/" + id, remainingParams); | ||
return this.api.get("/v2/absences/" + id, remainingParams); | ||
}); | ||
@@ -45,3 +45,3 @@ } | ||
REQUIRED.checkRequired(params, REQUIRED.GET_ABSENCES); | ||
return this.api.get("/absences", params); | ||
return this.api.get("/v2/absences", params); | ||
}); | ||
@@ -281,3 +281,3 @@ } | ||
REQUIRED.checkRequired(params, REQUIRED.ADD_ABSENCE); | ||
return this.api.post("/absences", params); | ||
return this.api.post("/v2/absences", params); | ||
}); | ||
@@ -358,3 +358,3 @@ } | ||
const { id } = params; | ||
return this.api.put("/absences/" + id, params); | ||
return this.api.put("/v2/absences/" + id, params); | ||
}); | ||
@@ -463,3 +463,3 @@ } | ||
const { id } = params; | ||
return this.api.delete("/absences/" + id, params); | ||
return this.api.delete("/v2/absences/" + id, params); | ||
}); | ||
@@ -466,0 +466,0 @@ } |
@@ -82,3 +82,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
it("correctly builds getAbsence() request", () => __awaiter(void 0, void 0, void 0, function* () { | ||
const nockScope = nock(CLOCKODO_API).get("/absences/7").reply(200, {}); | ||
const nockScope = nock(CLOCKODO_API) | ||
.get("/v2/absences/7") | ||
.reply(200, {}); | ||
yield clockodo.getAbsence({ id: 7 }); | ||
@@ -94,3 +96,3 @@ nockScope.done(); | ||
const nockScope = nock(CLOCKODO_API) | ||
.get("/absences?" + qs.stringify(expectedParameters)) | ||
.get("/v2/absences?" + qs.stringify(expectedParameters)) | ||
.reply(200, {}); | ||
@@ -698,3 +700,3 @@ yield clockodo.getAbsences({ year: 218 }); | ||
const nockScope = nock(CLOCKODO_API) | ||
.post("/absences", expectedParameters) | ||
.post("/v2/absences", expectedParameters) | ||
.reply(200, {}); | ||
@@ -911,3 +913,3 @@ yield clockodo.addAbsence({ | ||
const nockScope = nock(CLOCKODO_API) | ||
.put("/absences/74", mapRequestBody(absence)) | ||
.put("/v2/absences/74", mapRequestBody(absence)) | ||
.reply(200, {}); | ||
@@ -1033,3 +1035,3 @@ yield clockodo.editAbsence(absence); | ||
const nockScope = nock(CLOCKODO_API) | ||
.delete("/absences/31") | ||
.delete("/v2/absences/31") | ||
.reply(200, {}); | ||
@@ -1036,0 +1038,0 @@ yield clockodo.deleteAbsence({ id: 31 }); |
{ | ||
"name": "clockodo", | ||
"version": "23.3.0", | ||
"version": "23.4.0", | ||
"description": "Unofficial JavaScript/TypeScript SDK for Clockodo", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
496372
0.07%6214
0.03%