Skip to content

Commit

Permalink
fix: Make billable required again for addEntry()
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnns committed Sep 14, 2020
1 parent f422119 commit dda2bc8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/internals/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,14 @@ export class Clockodo {
} | {
customersId: number;
servicesId: number;
billable: Billable;
timeSince: string;
lumpSum: number;
} | {
customersId: number;
lumpSumsId: number;
lumpSumsAmount: number;
billable: Billable;
timeSince: string;
},
options?: object
Expand Down
4 changes: 2 additions & 2 deletions src/internals/utilities/requiredParams.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export const ADD_ABSENCE = ["dateSince", "dateUntil", "type"];
export const ADD_CUSTOMER = ["name"];
export const ADD_TIME_ENTRY = ["customersId", "servicesId", "billable", "timeSince", "timeUntil"];
export const ADD_LUMP_SUM_ENTRY = ["customersId", "servicesId", "timeSince", "lumpSum"];
export const ADD_RECURRING_LUMP_SUM_ENTRY = ["customersId", "lumpSumsAmount", "lumpSumsId", "timeSince"];
export const ADD_LUMP_SUM_ENTRY = ["customersId", "servicesId", "billable", "timeSince", "lumpSum"];
export const ADD_RECURRING_LUMP_SUM_ENTRY = ["customersId", "lumpSumsAmount", "lumpSumsId", "billable", "timeSince"];
export const ADD_PROJECT = ["name", "customersId"];
export const ADD_SERVICE = ["name"];
export const ADD_USER = ["name", "number", "email", "role"];
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ const hasCredentials = typeof process.env.CLOCKODO_USER === "string" && typeof p
customersId: lumpSum.customersId,
lumpSumsId: lumpSum.lumpSumsId,
lumpSumsAmount: lumpSum.lumpSumsAmount,
billable: 2,
timeSince: lumpSum.timeSince,
}, {
billable: 2,
text: lumpSum.text,
});

Expand Down

0 comments on commit dda2bc8

Please sign in to comment.