@pipedream/hootsuite 0.2.1 → 0.3.1

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.
@@ -5,7 +5,7 @@ export default {
5
5
  key: "hootsuite-create-media-upload-job",
6
6
  name: "Create Media Upload Job",
7
7
  description: "Creates a new Media Upload Job on your Hootsuite account. [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/createMedia)",
8
- version: "0.0.2",
8
+ version: "0.0.4",
9
9
  annotations: {
10
10
  destructiveHint: false,
11
11
  openWorldHint: true,
@@ -18,6 +18,7 @@ export default {
18
18
  type: "string",
19
19
  label: "File Path or URL",
20
20
  description: "The path or URL to the image file.",
21
+ format: "file-ref",
21
22
  },
22
23
  syncDir: {
23
24
  type: "dir",
@@ -4,7 +4,7 @@ export default {
4
4
  key: "hootsuite-get-media-upload-status",
5
5
  name: "Get Media Upload Status",
6
6
  description: "Gets the status of a Media Upload Job on your Hootsuite account. [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/getMedia)",
7
- version: "0.0.2",
7
+ version: "0.0.3",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -0,0 +1,38 @@
1
+ import hootsuite from "../../hootsuite.app.mjs";
2
+
3
+ export default {
4
+ key: "hootsuite-list-social-profiles",
5
+ name: "List Social Profiles",
6
+ description: "Retrieves a list of social profiles for the authenticated Hootsuite account. [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/getSocialProfiles)",
7
+ version: "0.0.1",
8
+ type: "action",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
14
+ props: {
15
+ hootsuite,
16
+ },
17
+ /**
18
+ * Retrieves all social profiles for the authenticated Hootsuite account
19
+ * @param {object} params - The parameters object
20
+ * @param {object} params.props - The action props containing the hootsuite app
21
+ * @returns {Promise<Array>} An array of social profile objects from Hootsuite
22
+ */
23
+ async run({ $ }) {
24
+ try {
25
+ const response = await $.apps.hootsuite.listSocialProfiles({
26
+ $,
27
+ });
28
+ $.export("$summary", `Successfully retrieved ${response?.data?.length} social profile${response?.data?.length === 1
29
+ ? ""
30
+ : "s"}`);
31
+ return response;
32
+ } catch (error) {
33
+ console.error("API call to Hootsuite failed:", error.response?.data || error.message);
34
+ const errorMessage = error.response?.data?.errors?.[0]?.message || error.message || "Unknown error";
35
+ throw new Error(`Failed to retrieve social profiles. Error: ${errorMessage}`);
36
+ }
37
+ },
38
+ };
@@ -13,7 +13,7 @@ export default {
13
13
  key: "hootsuite-schedule-message",
14
14
  name: "Schedule Message",
15
15
  description: "Schedules a message on your Hootsuite account. [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/scheduleMessage)",
16
- version: "0.0.2",
16
+ version: "0.0.3",
17
17
  annotations: {
18
18
  destructiveHint: false,
19
19
  openWorldHint: true,
package/hootsuite.app.mjs CHANGED
@@ -39,9 +39,10 @@ export default {
39
39
  ...opts,
40
40
  });
41
41
  },
42
- listSocialProfiles() {
42
+ listSocialProfiles(opts = {}) {
43
43
  return this._makeRequest({
44
44
  path: "/socialProfiles",
45
+ ...opts,
45
46
  });
46
47
  },
47
48
  getMediaUploadStatus({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/hootsuite",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "description": "Pipedream Hootsuite Components",
5
5
  "main": "hootsuite.app.mjs",
6
6
  "keywords": [
@@ -13,7 +13,7 @@
13
13
  "access": "public"
14
14
  },
15
15
  "dependencies": {
16
- "@pipedream/platform": "^3.1.1",
16
+ "@pipedream/platform": "^3.2.5",
17
17
  "dayjs": "^1.11.7"
18
18
  }
19
19
  }
@@ -5,7 +5,7 @@ import constants from "../common/constants.mjs";
5
5
 
6
6
  export default {
7
7
  name: "New Post Created",
8
- version: "0.0.2",
8
+ version: "0.0.3",
9
9
  key: "hootsuite-new-post-created",
10
10
  description: "Emit new event on each new created post. [See docs here](https://platform.hootsuite.com/docs/api/index.html#operation/retrieveMessages).",
11
11
  type: "source",