@pipedream/toggl 0.0.5 → 0.0.6

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.
package/README.md CHANGED
@@ -1,29 +1,11 @@
1
1
  # Overview
2
2
 
3
- The Toggl Track API allows developers to build apps that help measure and
4
- visualize employee productivity. Using the API, it is possible to build tools
5
- such as timesheet managers, project-based dashboards, expense analysis, team
6
- management applications, and more.
3
+ Toggl Track is a time tracking API that lets you start, stop, and manage timers and time entries, as well as manage projects, clients, and tasks associated with time records. With the Toggl Track API on Pipedream, you can automate time tracking activities, synchronize data across platforms, and generate insights from time tracking data to improve productivity and project management.
7
4
 
8
- The Toggl Track API also offers data overviews and integrated reporting, as
9
- well as access to Toggl Track’s easy-to-use user interface. This facilitates
10
- the creation of customized application features that can help businesses save
11
- time and maximize productivity.
5
+ # Example Use Cases
12
6
 
13
- Here are a few examples of what you can build using the Toggl Track API:
7
+ - **Project Time Tracking Automation:** Automatically start a Toggl timer when you begin working on a GitHub issue. When the issue is closed, stop the timer. This creates a seamless link between your coding activity and time tracking.
14
8
 
15
- - Timesheet manager: Create an application that gives users an overview of
16
- their time tracking data.
17
- - Project-based dashboard: Visualize employee’s performance data on a
18
- project-by-project basis.
19
- - Expense analysis: Analyze employees' expense data so that businesses can make
20
- more informed decisions.
21
- - Team management applications: Manage employee workloads more efficiently with
22
- customized tools.
23
- - Customized reports: Build customized reports based on specific criteria
24
- related to time tracking data.
25
- - User interface: Access and integrate Toggl Track's intuitive user interface
26
- into applications.
9
+ - **Client Reporting Workflow:** Generate weekly time reports for clients by aggregating Toggl data and sending it via Gmail. Use the Pipedream workflow to filter time entries by client and project, compile the data, and format it into a nicely structured email.
27
10
 
28
- - The API Reference has been updated to V9 and has been relocated [here](https://developers.track.toggl.com/)
29
- - This current implementation in pipdream only utilizes time entries. Toggl also offers coverage at the workspace level down to the individual task level. The workspace docs located [here](https://developers.track.toggl.com/docs/api/workspaces) provide insight in how to begin creating workspaces and allowing other individuals to be added to those workspaces allowing the tracking of whole teams at a time.
11
+ - **Slack Productivity Bot:** Create a Slack bot that prompts team members to log their time if they haven't started a timer by midday. Use Toggl's API to check for active timers and send reminders through Slack, encouraging timely time entry submissions.
@@ -2,7 +2,7 @@ import toggl from "../../toggl.app.mjs";
2
2
 
3
3
  export default {
4
4
  name: "Get Current Time Entry",
5
- version: "0.0.4",
5
+ version: "0.0.5",
6
6
  key: "toggl-get-current-time-entry",
7
7
  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
8
  type: "action",
@@ -2,7 +2,7 @@ import toggl from "../../toggl.app.mjs";
2
2
 
3
3
  export default {
4
4
  name: "Get Time Entries",
5
- version: "0.0.4",
5
+ version: "0.0.5",
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",
@@ -2,7 +2,7 @@ import toggl from "../../toggl.app.mjs";
2
2
 
3
3
  export default {
4
4
  name: "Get Time Entry",
5
- version: "0.0.4",
5
+ version: "0.0.5",
6
6
  key: "toggl-get-time-entry",
7
7
  description: "Get details about a specific time entry. [See docs here](https://developers.track.toggl.com/docs/api/time_entries)",
8
8
  type: "action",
@@ -21,8 +21,7 @@ export default {
21
21
  timeEntryId: this.timeEntryId,
22
22
  });
23
23
 
24
- response && $.export("$summary", "Successfully retrieved time entry");
25
-
24
+ $.export("$summary", "Successfully retrieved time entry");
26
25
  return response;
27
26
  },
28
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/toggl",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Pipedream Toggl Components",
5
5
  "main": "toggl.app.js",
6
6
  "keywords": [
@@ -14,7 +14,7 @@
14
14
  "access": "public"
15
15
  },
16
16
  "dependencies": {
17
- "@pipedream/platform": "^0.10.0",
17
+ "@pipedream/platform": "^3.0.0",
18
18
  "toggl-api": "^1.0.2"
19
19
  }
20
20
  }
@@ -3,7 +3,7 @@ import base from "../common/base.mjs";
3
3
  export default {
4
4
  ...base,
5
5
  name: "New Start Time Entry (Instant)",
6
- version: "0.0.2",
6
+ version: "0.0.3",
7
7
  key: "toggl-new-start-time-entry",
8
8
  description: "Emit new event when a time entry is started. [See docs here](https://github.com/toggl/toggl_api_docs/blob/master/webhooks.md)",
9
9
  type: "source",
@@ -3,7 +3,7 @@ import base from "../common/base.mjs";
3
3
  export default {
4
4
  ...base,
5
5
  name: "New Time Entry (Instant)",
6
- version: "0.0.2",
6
+ version: "0.0.3",
7
7
  key: "toggl-new-time-entry",
8
8
  description: "Emit new event when a time entry is created. [See docs here](https://github.com/toggl/toggl_api_docs/blob/master/webhooks.md)",
9
9
  type: "source",
@@ -3,7 +3,7 @@ import base from "../common/base.mjs";
3
3
  export default {
4
4
  ...base,
5
5
  name: "New Update Time Entry (Instant)",
6
- version: "0.0.2",
6
+ version: "0.0.3",
7
7
  key: "toggl-new-update-time-entry",
8
8
  description: "Emit new event when a time entry is updated. [See docs here](https://github.com/toggl/toggl_api_docs/blob/master/webhooks.md)",
9
9
  type: "source",
@@ -4,7 +4,7 @@ import constants from "../common/constants.mjs";
4
4
  export default {
5
5
  ...base,
6
6
  name: "New Webhook Event (Instant)",
7
- version: "0.0.2",
7
+ version: "0.0.3",
8
8
  key: "toggl-new-webhook-event",
9
9
  description: "Emit new event on receive a webhook event. [See docs here](https://github.com/toggl/toggl_api_docs/blob/master/webhooks.md)",
10
10
  type: "source",
package/toggl.app.mjs CHANGED
@@ -47,7 +47,7 @@ export default {
47
47
  _apiUrl(apiVersion) {
48
48
  return constants.API_BASE_URL_VERSIONS[apiVersion];
49
49
  },
50
- async _makeRequest(apiVersion, path, options = {}, $ = this) {
50
+ _makeRequest(apiVersion, path, options = {}, $ = this) {
51
51
  return axios($, {
52
52
  url: `${this._apiUrl(apiVersion)}/${path}`,
53
53
  auth: {
@@ -57,7 +57,7 @@ export default {
57
57
  ...options,
58
58
  });
59
59
  },
60
- async createWebhook({
60
+ createWebhook({
61
61
  workspaceId, data,
62
62
  }) {
63
63
  return this._makeRequest("v1", `subscriptions/${workspaceId}`, {
@@ -69,22 +69,20 @@ export default {
69
69
  },
70
70
  });
71
71
  },
72
- async removeWebhook({
72
+ removeWebhook({
73
73
  workspaceId, webhookId,
74
74
  }) {
75
75
  return this._makeRequest("v1", `subscriptions/${workspaceId}/${webhookId}`, {
76
76
  method: "delete",
77
77
  });
78
78
  },
79
- async getWorkspaces({
80
- workspaceId, $,
81
- }) {
82
- return this._makeRequest("v9", `workspaces/${workspaceId}`, {}, $);
79
+ getWorkspaces({ $ }) {
80
+ return this._makeRequest("v9", "me/workspaces", {}, $);
83
81
  },
84
- async getCurrentTimeEntry({ $ } = {}) {
82
+ getCurrentTimeEntry({ $ } = {}) {
85
83
  return this._makeRequest("v9", "me/time_entries/current", {}, $);
86
84
  },
87
- async getTimeEntries({
85
+ getTimeEntries({
88
86
  params, $,
89
87
  } = {}) {
90
88
  return this._makeRequest("v9", "me/time_entries", {
@@ -94,12 +92,10 @@ export default {
94
92
  },
95
93
  }, $);
96
94
  },
97
- async getTimeEntry({
95
+ getTimeEntry({
98
96
  timeEntryId, $,
99
97
  } = {}) {
100
- const { data } = await this._makeRequest("v8", `time_entries/${timeEntryId}`, {}, $);
101
-
102
- return data;
98
+ return this._makeRequest("v9", `me/time_entries/${timeEntryId}`, {}, $);
103
99
  },
104
100
  },
105
101
  };