@pipedream/toggl 0.1.1 → 0.2.0

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.
@@ -4,7 +4,12 @@ export default {
4
4
  key: "toggl-create-client",
5
5
  name: "Create Client",
6
6
  description: "Create a new client in Toggl. [See the documentation](https://engineering.toggl.com/docs/api/clients#post-create-client)",
7
- version: "0.0.1",
7
+ version: "0.0.2",
8
+ annotations: {
9
+ destructiveHint: false,
10
+ openWorldHint: true,
11
+ readOnlyHint: false,
12
+ },
8
13
  type: "action",
9
14
  props: {
10
15
  toggl,
@@ -4,7 +4,12 @@ export default {
4
4
  key: "toggl-create-project",
5
5
  name: "Create Project",
6
6
  description: "Create a new project in Toggl. [See the documentation](https://engineering.toggl.com/docs/api/projects#post-workspaceprojects)",
7
- version: "0.0.1",
7
+ version: "0.0.2",
8
+ annotations: {
9
+ destructiveHint: false,
10
+ openWorldHint: true,
11
+ readOnlyHint: false,
12
+ },
8
13
  type: "action",
9
14
  props: {
10
15
  toggl,
@@ -2,7 +2,12 @@ import toggl from "../../toggl.app.mjs";
2
2
 
3
3
  export default {
4
4
  name: "Get Current Time Entry",
5
- version: "0.0.6",
5
+ version: "0.0.7",
6
+ annotations: {
7
+ destructiveHint: false,
8
+ openWorldHint: true,
9
+ readOnlyHint: true,
10
+ },
6
11
  key: "toggl-get-current-time-entry",
7
12
  description: "Get the time entry that is running now. [See docs here]https://developers.track.toggl.com/docs/api/time_entries#get-get-current-time-entry)",
8
13
  type: "action",
@@ -2,15 +2,64 @@ 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.8",
6
+ annotations: {
7
+ destructiveHint: false,
8
+ openWorldHint: true,
9
+ readOnlyHint: true,
10
+ },
6
11
  key: "toggl-get-time-entries",
7
12
  description: "Get the last thousand time entries. [See docs here](https://developers.track.toggl.com/docs/api/time_entries#get-timeentries)",
8
13
  type: "action",
9
14
  props: {
10
15
  toggl,
16
+ startDate: {
17
+ type: "string",
18
+ label: "Start Date",
19
+ description: "Get entries with start time, from start_date YYYY-MM-DD or with time in RFC3339 format. To be used with end_date.",
20
+ optional: true,
21
+ },
22
+ endDate: {
23
+ type: "string",
24
+ label: "End Date",
25
+ description: "Get entries with start time, until end_date YYYY-MM-DD or with time in RFC3339 format. To be used with start_date.",
26
+ optional: true,
27
+ },
28
+ since: {
29
+ type: "string",
30
+ label: "Since (UNIX timestamp)",
31
+ description: "Get entries modified since this date using UNIX timestamp, including deleted ones.",
32
+ optional: true,
33
+ },
34
+ before: {
35
+ type: "string",
36
+ label: "Before",
37
+ description: "Get entries with start time, before given date (YYYY-MM-DD) or with time in RFC3339 format.",
38
+ optional: true,
39
+ },
40
+ meta: {
41
+ type: "boolean",
42
+ label: "Meta",
43
+ description: "Should the response contain data for meta entities.",
44
+ optional: true,
45
+ },
46
+ includeSharing: {
47
+ type: "boolean",
48
+ label: "Include Sharing",
49
+ description: "Include sharing details in the response.",
50
+ optional: true,
51
+ },
11
52
  },
12
53
  async run({ $ }) {
54
+ const params = {};
55
+ if (this.startDate) params.start_date = this.startDate;
56
+ if (this.endDate) params.end_date = this.endDate;
57
+ if (this.since) params.since = this.since;
58
+ if (this.before) params.before = this.before;
59
+ if (typeof this.meta === "boolean") params.meta = this.meta;
60
+ if (typeof this.includeSharing === "boolean") params.include_sharing = this.includeSharing;
13
61
  const response = await this.toggl.getTimeEntries({
62
+ params,
14
63
  $,
15
64
  });
16
65
 
@@ -2,7 +2,12 @@ import toggl from "../../toggl.app.mjs";
2
2
 
3
3
  export default {
4
4
  name: "Get Time Entry",
5
- version: "0.0.6",
5
+ version: "0.0.7",
6
+ annotations: {
7
+ destructiveHint: false,
8
+ openWorldHint: true,
9
+ readOnlyHint: true,
10
+ },
6
11
  key: "toggl-get-time-entry",
7
12
  description: "Get details about a specific time entry. [See docs here](https://developers.track.toggl.com/docs/api/time_entries)",
8
13
  type: "action",
@@ -0,0 +1,33 @@
1
+ import toggl from "../../toggl.app.mjs";
2
+
3
+ export default {
4
+ key: "toggl-list-time-entry-id-options",
5
+ name: "List Time Entry ID Options",
6
+ description: "Retrieves available options for the Time Entry ID field.",
7
+ version: "0.0.1",
8
+ type: "action",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
14
+ props: {
15
+ toggl,
16
+ page: {
17
+ type: "integer",
18
+ label: "Page",
19
+ description: "The page of results to retrieve.",
20
+ min: 0,
21
+ default: 0,
22
+ },
23
+ },
24
+ async run({ $ }) {
25
+ const options = await toggl.propDefinitions.timeEntryId.options.call(this.toggl, {
26
+ page: this.page,
27
+ });
28
+ $.export("$summary", `Successfully retrieved ${options.length} option${options.length === 1
29
+ ? ""
30
+ : "s"}`);
31
+ return options;
32
+ },
33
+ };
@@ -0,0 +1,33 @@
1
+ import toggl from "../../toggl.app.mjs";
2
+
3
+ export default {
4
+ key: "toggl-list-workspace-id-options",
5
+ name: "List Workspace ID Options",
6
+ description: "Retrieves available options for the Workspace ID field.",
7
+ version: "0.0.1",
8
+ type: "action",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
14
+ props: {
15
+ toggl,
16
+ page: {
17
+ type: "integer",
18
+ label: "Page",
19
+ description: "The page of results to retrieve.",
20
+ min: 0,
21
+ default: 0,
22
+ },
23
+ },
24
+ async run({ $ }) {
25
+ const options = await toggl.propDefinitions.workspaceId.options.call(this.toggl, {
26
+ page: this.page,
27
+ });
28
+ $.export("$summary", `Successfully retrieved ${options.length} option${options.length === 1
29
+ ? ""
30
+ : "s"}`);
31
+ return options;
32
+ },
33
+ };
@@ -4,7 +4,12 @@ export default {
4
4
  key: "toggl-update-client",
5
5
  name: "Update Client",
6
6
  description: "Updates an existing client in Toggl. [See the documentation](https://engineering.toggl.com/docs/api/clients#put-change-client)",
7
- version: "0.0.1",
7
+ version: "0.0.2",
8
+ annotations: {
9
+ destructiveHint: true,
10
+ openWorldHint: true,
11
+ readOnlyHint: false,
12
+ },
8
13
  type: "action",
9
14
  props: {
10
15
  toggl,
@@ -4,7 +4,12 @@ export default {
4
4
  key: "toggl-update-project",
5
5
  name: "Update Project",
6
6
  description: "Updates an existing project in Toggl. [See the documentation](https://engineering.toggl.com/docs/api/projects#put-workspaceproject)",
7
- version: "0.0.1",
7
+ version: "0.0.2",
8
+ annotations: {
9
+ destructiveHint: true,
10
+ openWorldHint: true,
11
+ readOnlyHint: false,
12
+ },
8
13
  type: "action",
9
14
  props: {
10
15
  toggl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/toggl",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Pipedream Toggl Components",
5
5
  "main": "toggl.app.mjs",
6
6
  "keywords": [
@@ -14,7 +14,7 @@
14
14
  "access": "public"
15
15
  },
16
16
  "dependencies": {
17
- "@pipedream/platform": "^3.0.0",
17
+ "@pipedream/platform": "^3.1.1",
18
18
  "toggl-api": "^1.0.2"
19
19
  }
20
20
  }