Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion lib/composio/connectors/__tests__/getConnectors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,20 @@ describe("getConnectors", () => {

expect(getComposioClient).toHaveBeenCalled();
expect(mockComposio.create).toHaveBeenCalledWith("account-123", {
toolkits: ["googlesheets", "googledrive", "googledocs", "tiktok"],
toolkits: [
"googlesheets",
"googledrive",
"googledocs",
"gmail",
"googlecalendar",
"tiktok",
"spotify",
"instagram",
"twitter",
"youtube",
"slack",
"linkedin",
],
});
expect(result).toEqual([
{
Expand Down
10 changes: 9 additions & 1 deletion lib/composio/connectors/__tests__/getConnectorsHandler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,18 @@ describe("getConnectorsHandler", () => {
// API is unopinionated — no allowedToolkits filtering
expect(getConnectors).toHaveBeenCalledWith("account-456", {
displayNames: {
tiktok: "TikTok",
googlesheets: "Google Sheets",
googledrive: "Google Drive",
googledocs: "Google Docs",
gmail: "Gmail",
googlecalendar: "Google Calendar",
tiktok: "TikTok",
spotify: "Spotify",
instagram: "Instagram",
twitter: "Twitter / X",
youtube: "YouTube",
slack: "Slack",
linkedin: "LinkedIn",
},
});
});
Expand Down
14 changes: 11 additions & 3 deletions lib/composio/connectors/__tests__/isAllowedArtistConnector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ import { describe, it, expect } from "vitest";
import { isAllowedArtistConnector, ALLOWED_ARTIST_CONNECTORS } from "../isAllowedArtistConnector";

describe("isAllowedArtistConnector", () => {
it("should return true for 'tiktok'", () => {
it("should return true for allowed artist connectors", () => {
expect(isAllowedArtistConnector("tiktok")).toBe(true);
expect(isAllowedArtistConnector("spotify")).toBe(true);
expect(isAllowedArtistConnector("instagram")).toBe(true);
expect(isAllowedArtistConnector("twitter")).toBe(true);
expect(isAllowedArtistConnector("youtube")).toBe(true);
});

it("should return false for connectors not in ALLOWED_ARTIST_CONNECTORS", () => {
expect(isAllowedArtistConnector("googlesheets")).toBe(false);
expect(isAllowedArtistConnector("googledrive")).toBe(false);
expect(isAllowedArtistConnector("instagram")).toBe(false);
expect(isAllowedArtistConnector("slack")).toBe(false);
expect(isAllowedArtistConnector("random")).toBe(false);
});

Expand All @@ -24,8 +28,12 @@ describe("isAllowedArtistConnector", () => {
});

describe("ALLOWED_ARTIST_CONNECTORS", () => {
it("should include tiktok", () => {
it("should include all expected artist connectors", () => {
expect(ALLOWED_ARTIST_CONNECTORS).toContain("tiktok");
expect(ALLOWED_ARTIST_CONNECTORS).toContain("spotify");
expect(ALLOWED_ARTIST_CONNECTORS).toContain("instagram");
expect(ALLOWED_ARTIST_CONNECTORS).toContain("twitter");
expect(ALLOWED_ARTIST_CONNECTORS).toContain("youtube");
});

it("should be a readonly array", () => {
Expand Down
15 changes: 14 additions & 1 deletion lib/composio/connectors/getConnectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,20 @@ export interface ConnectorInfo {
* Passed explicitly to composio.create() because session.toolkits()
* only returns the first 20 by default.
*/
const SUPPORTED_TOOLKITS = ["googlesheets", "googledrive", "googledocs", "tiktok"];
const SUPPORTED_TOOLKITS = [
"googlesheets",
"googledrive",
"googledocs",
"gmail",
"googlecalendar",
"tiktok",
"spotify",
"instagram",
"twitter",
"youtube",
"slack",
"linkedin",
];

/**
* Options for getting connectors.
Expand Down
10 changes: 9 additions & 1 deletion lib/composio/connectors/getConnectorsHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@ import { getConnectors } from "./getConnectors";
* Display names for connectors.
*/
const CONNECTOR_DISPLAY_NAMES: Record<string, string> = {
tiktok: "TikTok",
googlesheets: "Google Sheets",
googledrive: "Google Drive",
googledocs: "Google Docs",
gmail: "Gmail",
googlecalendar: "Google Calendar",
tiktok: "TikTok",
spotify: "Spotify",
instagram: "Instagram",
twitter: "Twitter / X",
youtube: "YouTube",
slack: "Slack",
linkedin: "LinkedIn",
};

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/composio/connectors/isAllowedArtistConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* List of toolkit slugs that artists are allowed to connect.
* Only these connectors will be shown in the artist-connectors API.
*/
export const ALLOWED_ARTIST_CONNECTORS = ["tiktok"] as const;
export const ALLOWED_ARTIST_CONNECTORS = ["tiktok", "spotify", "instagram", "twitter", "youtube"] as const;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix formatting here to unblock CI.

This line is likely tripping the reported Prettier check; reformatting the array should clear the pipeline failure.

💡 Suggested formatting change
-export const ALLOWED_ARTIST_CONNECTORS = ["tiktok", "spotify", "instagram", "twitter", "youtube"] as const;
+export const ALLOWED_ARTIST_CONNECTORS = [
+  "tiktok",
+  "spotify",
+  "instagram",
+  "twitter",
+  "youtube",
+] as const;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/composio/connectors/isAllowedArtistConnector.ts` at line 5, The exported
constant ALLOWED_ARTIST_CONNECTORS is failing Prettier; reformat its array
literal to satisfy the formatter by breaking the items onto separate lines and
adding trailing comma(s) (e.g., each connector string on its own line inside the
array) while preserving the export and the as const assertion so the symbol
ALLOWED_ARTIST_CONNECTORS remains unchanged.


export type AllowedArtistConnector = (typeof ALLOWED_ARTIST_CONNECTORS)[number];

Expand Down
Loading