From b865aa066d62cac4fffd73d42447b3d13c19306f Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Mon, 14 Oct 2024 03:18:34 -0300 Subject: [PATCH 1/3] Adding new action --- .../actions/get-schedules/get-schedules.mjs | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 components/motion/actions/get-schedules/get-schedules.mjs diff --git a/components/motion/actions/get-schedules/get-schedules.mjs b/components/motion/actions/get-schedules/get-schedules.mjs new file mode 100644 index 0000000000000..acb237a8b737d --- /dev/null +++ b/components/motion/actions/get-schedules/get-schedules.mjs @@ -0,0 +1,25 @@ +import motion from "../../motion.app.mjs"; + +export default { + key: "motion-get-schedules", + name: "Retrieve Schedules", + version: "0.0.1", + description: "Get a list of schedules for your user. [See the documentation](https://docs.usemotion.com/docs/motion-rest-api/f9fec7bb61c6f-get-schedules)", + type: "action", + props: { + motion, + }, + methods: { + getSchedules($) { + return this.motion._makeRequest({ + $, + path: "schedules", + }); + }, + }, + async run({ $ }) { + const response = await this.getSchedules($); + $.export("$summary", `Successfully fetched ${response?.length} schedules`); + return response; + }, +}; From fd6e090f3db0c82e556aa96c8ca4838504a043f0 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Mon, 14 Oct 2024 03:18:49 -0300 Subject: [PATCH 2/3] Package version bump --- components/motion/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/motion/package.json b/components/motion/package.json index 7eaedfc5ddd1d..e0b19c52c9866 100644 --- a/components/motion/package.json +++ b/components/motion/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/motion", - "version": "0.1.0", + "version": "0.2.0", "description": "Pipedream Motion Components", "main": "motion.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.5.1" + "@pipedream/platform": "^3.0.3" } } From 9b75f0d5b196acc63f85183d4527bfb5ea25530a Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Mon, 14 Oct 2024 03:19:31 -0300 Subject: [PATCH 3/3] pnpm --- pnpm-lock.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ed825eed80aef..f4f6fe4f33cd7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6254,9 +6254,9 @@ importers: components/motion: specifiers: - '@pipedream/platform': ^1.5.1 + '@pipedream/platform': ^3.0.3 dependencies: - '@pipedream/platform': 1.5.1 + '@pipedream/platform': 3.0.3 components/moxie: specifiers: