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
8 changes: 1 addition & 7 deletions components/figma/actions/delete-comment/delete-comment.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
name: "Delete a Comment",
description: "Delete a comment to a file. [See the docs here](https://www.figma.com/developers/api#delete-comments-endpoint)",
key: "figma-delete-comment",
version: "0.0.4",
version: "0.0.5",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand All @@ -19,18 +19,12 @@ export default {
propDefinition: [
figmaApp,
"projectId",
({ teamId }) => ({
teamId,
}),
],
},
fileId: {
propDefinition: [
figmaApp,
"fileId",
({ projectId }) => ({
projectId,
}),
],
},
commentId: {
Expand Down
8 changes: 1 addition & 7 deletions components/figma/actions/list-comments/list-comments.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
name: "List Comments",
description: "Lists all comments left on a file. [See the docs here](https://www.figma.com/developers/api#get-comments-endpoint)",
key: "figma-list-comments",
version: "0.0.4",
version: "0.0.5",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand All @@ -19,18 +19,12 @@ export default {
propDefinition: [
figmaApp,
"projectId",
({ teamId }) => ({
teamId,
}),
],
},
fileId: {
propDefinition: [
figmaApp,
"fileId",
({ projectId }) => ({
projectId,
}),
],
},
},
Expand Down
8 changes: 1 addition & 7 deletions components/figma/actions/post-a-comment/post-a-comment.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
name: "Post a Comment",
description: "Posts a comment to a file. [See the docs here](https://www.figma.com/developers/api#post-comments-endpoint)",
key: "figma-post-a-comment",
version: "0.0.4",
version: "0.0.5",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand All @@ -19,18 +19,12 @@ export default {
propDefinition: [
figmaApp,
"projectId",
({ teamId }) => ({
teamId,
}),
],
},
fileId: {
propDefinition: [
figmaApp,
"fileId",
({ projectId }) => ({
projectId,
}),
],
},
message: {
Expand Down
32 changes: 2 additions & 30 deletions components/figma/figma.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,12 @@ export default {
projectId: {
type: "string",
label: "Project Id",
description: "Id of the project to list files from",
async options({ teamId = this._getTeamId() }) {
const projects = await this.listTeamProjects(teamId);
return projects.map((item) => ({
label: item.name,
value: item.id,
}));
},
description: "Navigate to your project in Figma. You can find your Project ID in the URL between `/project/` and the project name. For example, if your project URL is `https://www.figma.com/files/team/1562118717370912711/project/478297666/Team-project?fuid=1562118714608714352`, enter `478297666` here.",
},
fileId: {
type: "string",
label: "File Id",
description: "Id of the file to perform your action.",
async options({ projectId }) {
const files = await this.listProjectFiles(projectId);
return files.map((item) => ({
label: item.name,
value: item.key,
}));
},
description: "Navigate to your file in Figma and open it. You can find your File ID in the URL after `/file/`. For example, if your file URL is `https://www.figma.com/file/ABC123xyz456/My-Design-File`, enter `ABC123xyz456` here.",
},
commentId: {
type: "string",
Expand Down Expand Up @@ -74,20 +60,6 @@ export default {
};
return res;
},
async listTeamProjects(teamId, ctx = this) {
const res = await axios(ctx, this._getAxiosParams({
method: "GET",
path: `/v1/teams/${teamId}/projects`,
}));
return res?.projects || [];
},
async listProjectFiles(projectId, ctx = this) {
const res = await axios(ctx, this._getAxiosParams({
method: "GET",
path: `/v1/projects/${projectId}/files`,
}));
return res?.files || [];
},
async listFileComments(fileId, ctx = this) {
const res = await axios(ctx, this._getAxiosParams({
method: "GET",
Expand Down
4 changes: 2 additions & 2 deletions components/figma/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/figma",
"version": "0.1.0",
"version": "0.1.1",
"description": "Pipedream Figma Components",
"main": "figma.app.mjs",
"keywords": [
Expand All @@ -13,6 +13,6 @@
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^1.6.1"
"@pipedream/platform": "^3.1.0"
}
}
2 changes: 1 addition & 1 deletion components/figma/sources/new-comment/new-comment.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
key: "figma-new-comment",
name: "New Comment (Instant)",
description: "Emit new event when someone comments on a file",
version: "0.0.3",
version: "0.0.4",
type: "source",
dedupe: "unique",
props: {
alert: {

Check warning on line 14 in components/figma/sources/new-comment/new-comment.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop alert must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 14 in components/figma/sources/new-comment/new-comment.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop alert must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "info",
content: "A Figma Organization Plan or higher is required to use webhooks. See Figma's [pricing page](https://www.figma.com/pricing) for more details.",
Expand Down
Loading
Loading