@pipedream/toggl 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,15 +2,59 @@ import toggl from "../../toggl.app.mjs";
2
2
 
3
3
  export default {
4
4
  name: "Get Time Entries",
5
- version: "0.0.6",
5
+ version: "0.0.7",
6
6
  key: "toggl-get-time-entries",
7
7
  description: "Get the last thousand time entries. [See docs here](https://developers.track.toggl.com/docs/api/time_entries#get-timeentries)",
8
8
  type: "action",
9
9
  props: {
10
10
  toggl,
11
+ startDate: {
12
+ type: "string",
13
+ label: "Start Date",
14
+ description: "Get entries with start time, from start_date YYYY-MM-DD or with time in RFC3339 format. To be used with end_date.",
15
+ optional: true,
16
+ },
17
+ endDate: {
18
+ type: "string",
19
+ label: "End Date",
20
+ description: "Get entries with start time, until end_date YYYY-MM-DD or with time in RFC3339 format. To be used with start_date.",
21
+ optional: true,
22
+ },
23
+ since: {
24
+ type: "string",
25
+ label: "Since (UNIX timestamp)",
26
+ description: "Get entries modified since this date using UNIX timestamp, including deleted ones.",
27
+ optional: true,
28
+ },
29
+ before: {
30
+ type: "string",
31
+ label: "Before",
32
+ description: "Get entries with start time, before given date (YYYY-MM-DD) or with time in RFC3339 format.",
33
+ optional: true,
34
+ },
35
+ meta: {
36
+ type: "boolean",
37
+ label: "Meta",
38
+ description: "Should the response contain data for meta entities.",
39
+ optional: true,
40
+ },
41
+ includeSharing: {
42
+ type: "boolean",
43
+ label: "Include Sharing",
44
+ description: "Include sharing details in the response.",
45
+ optional: true,
46
+ },
11
47
  },
12
48
  async run({ $ }) {
49
+ const params = {};
50
+ if (this.startDate) params.start_date = this.startDate;
51
+ if (this.endDate) params.end_date = this.endDate;
52
+ if (this.since) params.since = this.since;
53
+ if (this.before) params.before = this.before;
54
+ if (typeof this.meta === "boolean") params.meta = this.meta;
55
+ if (typeof this.includeSharing === "boolean") params.include_sharing = this.includeSharing;
13
56
  const response = await this.toggl.getTimeEntries({
57
+ params,
14
58
  $,
15
59
  });
16
60
 
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@pipedream/toggl",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Pipedream Toggl Components",
5
- "main": "toggl.app.js",
5
+ "main": "toggl.app.mjs",
6
6
  "keywords": [
7
7
  "pipedream",
8
8
  "toggl"