Skip to content

Commit

Permalink
v7.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisa-kassila committed Sep 30, 2024
1 parent f0216f5 commit 8966769
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rantalainen/koho-api-helper",
"version": "7.0.1",
"version": "7.0.2",
"description": "Koho Sales API helper library",
"main": "dist/index.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/methods/work-session-assignment.methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class WorkSessionAssignmentMethods extends Methods {
// Requirements need to be fetched separately
// Excluded params from requirements request to ensure all requirements are fetched for worksession assignments
const resultWithRequirements = await this.request(`${this._uri}/export`, 'GET', null, {
...params,
set: 'csv_export_requirements',
format: 'json'
});
Expand Down
3 changes: 3 additions & 0 deletions src/methods/work-session.methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export class WorkSessionMethods extends Methods {
return await super.deleteById(id);
}

/** There are a lot of work sessions. It is preferable to define start_date and end_date in params. They can be specified in any parseable date format (YYYY-MM-DD for example).
* @param excludeProducts - Default = true, products will not be fetched for worksessions
*/
async export(params: object = {}, excludeProducts: boolean = true): Promise<WorkSessionProperties[]> {
const result = await this.request(`${this._uri}/export`, 'GET', null, { ...params, format: 'json' });

Expand Down

0 comments on commit 8966769

Please sign in to comment.