diff --git a/components/linear/actions/create-issue/create-issue.mjs b/components/linear/actions/create-issue/create-issue.mjs index 8a63339709ec9..1d951b5d47f50 100644 --- a/components/linear/actions/create-issue/create-issue.mjs +++ b/components/linear/actions/create-issue/create-issue.mjs @@ -10,6 +10,6 @@ export default { ...utils.getAppProps(createIssue), key: "linear-create-issue", description: "Create an issue (OAuth). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues)", - version: "0.4.6", + version: "0.4.7", }; diff --git a/components/linear/actions/get-issue/get-issue.mjs b/components/linear/actions/get-issue/get-issue.mjs index 844fdf8683b22..b6f02c00ec70e 100644 --- a/components/linear/actions/get-issue/get-issue.mjs +++ b/components/linear/actions/get-issue/get-issue.mjs @@ -10,6 +10,6 @@ export default { ...utils.getAppProps(getIssue), key: "linear-get-issue", description: "Get an issue by ID (OAuth). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api)", - version: "0.1.6", + version: "0.1.7", }; diff --git a/components/linear/actions/get-teams/get-teams.mjs b/components/linear/actions/get-teams/get-teams.mjs index 0eac74971ac26..ba19faafcc6fd 100644 --- a/components/linear/actions/get-teams/get-teams.mjs +++ b/components/linear/actions/get-teams/get-teams.mjs @@ -9,7 +9,7 @@ export default { ...getTeams, key: "linear-get-teams", description: "Get all the teams (OAuth). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues)", - version: "0.2.6", + version: "0.2.7", props: { linearApp, }, diff --git a/components/linear/actions/search-issues/search-issues.mjs b/components/linear/actions/search-issues/search-issues.mjs index d6d57006a2eeb..07e6e97231625 100644 --- a/components/linear/actions/search-issues/search-issues.mjs +++ b/components/linear/actions/search-issues/search-issues.mjs @@ -10,6 +10,6 @@ export default { ...utils.getAppProps(searchIssues), key: "linear-search-issues", description: "Search issues (OAuth). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api)", - version: "0.2.6", + version: "0.2.7", }; diff --git a/components/linear/actions/update-issue/update-issue.mjs b/components/linear/actions/update-issue/update-issue.mjs index 442e19714876f..6a8ab9feaf37c 100644 --- a/components/linear/actions/update-issue/update-issue.mjs +++ b/components/linear/actions/update-issue/update-issue.mjs @@ -9,6 +9,6 @@ export default { ...utils.getAppProps(updateIssue), key: "linear-update-issue", description: "Update an issue (OAuth). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues)", - version: "0.1.6", + version: "0.1.7", }; diff --git a/components/linear/linear.app.mjs b/components/linear/linear.app.mjs index c706602638eef..4952da76a7d15 100644 --- a/components/linear/linear.app.mjs +++ b/components/linear/linear.app.mjs @@ -1,4 +1,8 @@ -import linearApp from "@pipedream/linear_app"; +//import linearApp from "@pipedream/linear_app"; +import linearApp from "../linear_app/linear_app.app.mjs"; + +// TODO: Will update above statement to import from @pipedream/linear_app +// after updates to linear_app are published export default { ...linearApp, diff --git a/components/linear/package.json b/components/linear/package.json index 51300367cb056..cb7907068d2d4 100644 --- a/components/linear/package.json +++ b/components/linear/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/linear", - "version": "0.5.8", + "version": "0.6.0", "description": "Pipedream Linear Components", "main": "linear.app.mjs", "keywords": [ diff --git a/components/linear/sources/comment-created-instant/comment-created-instant.mjs b/components/linear/sources/comment-created-instant/comment-created-instant.mjs index b7777f60629b6..456e8b1b1fbeb 100644 --- a/components/linear/sources/comment-created-instant/comment-created-instant.mjs +++ b/components/linear/sources/comment-created-instant/comment-created-instant.mjs @@ -10,5 +10,5 @@ export default { ...utils.getAppProps(commentCreatedInstant), key: "linear-comment-created-instant", description: "Emit new event when a new comment is created (OAuth). [See the documentation](https://developers.linear.app/docs/graphql/webhooks)", - version: "0.1.8", + version: "0.1.9", }; diff --git a/components/linear/sources/issue-created-instant/issue-created-instant.mjs b/components/linear/sources/issue-created-instant/issue-created-instant.mjs index 95797c5e3d5c0..c6b0910004e36 100644 --- a/components/linear/sources/issue-created-instant/issue-created-instant.mjs +++ b/components/linear/sources/issue-created-instant/issue-created-instant.mjs @@ -10,5 +10,5 @@ export default { ...utils.getAppProps(issueCreatedInstant), key: "linear-issue-created-instant", description: "Emit new event when a new issue is created (OAuth). [See the documentation](https://developers.linear.app/docs/graphql/webhooks)", - version: "0.3.8", + version: "0.3.9", }; diff --git a/components/linear/sources/issue-updated-instant/issue-updated-instant.mjs b/components/linear/sources/issue-updated-instant/issue-updated-instant.mjs index f440397c127d5..ec6712f06f8ba 100644 --- a/components/linear/sources/issue-updated-instant/issue-updated-instant.mjs +++ b/components/linear/sources/issue-updated-instant/issue-updated-instant.mjs @@ -10,5 +10,5 @@ export default { ...utils.getAppProps(issueUpdatedInstant), key: "linear-issue-updated-instant", description: "Emit new event when an issue is updated (OAuth). See the documentation](https://developers.linear.app/docs/graphql/webhooks)", - version: "0.3.8", + version: "0.3.9", }; diff --git a/components/linear/sources/new-issue-status-updated/new-issue-status-updated.mjs b/components/linear/sources/new-issue-status-updated/new-issue-status-updated.mjs index be59a94f965ae..e7a5b11008afc 100644 --- a/components/linear/sources/new-issue-status-updated/new-issue-status-updated.mjs +++ b/components/linear/sources/new-issue-status-updated/new-issue-status-updated.mjs @@ -10,5 +10,5 @@ export default { ...utils.getAppProps(newIssueStatusUpdated), key: "linear-new-issue-status-updated", description: "Emit new event when the status of an issue is updated (OAuth). [See the documentation](https://developers.linear.app/docs/graphql/webhooks)", - version: "0.1.8", + version: "0.1.9", }; diff --git a/components/linear/sources/project-updated-instant/project-updated-instant.mjs b/components/linear/sources/project-updated-instant/project-updated-instant.mjs new file mode 100644 index 0000000000000..27cb7361f408b --- /dev/null +++ b/components/linear/sources/project-updated-instant/project-updated-instant.mjs @@ -0,0 +1,20 @@ +//import projectUpdatedInstant from +//"@pipedream/linear_app/sources/project-updated-instant/project-updated-instant.mjs"; +import projectUpdatedInstant from "../../../linear_app/sources/project-updated-instant/project-updated-instant.mjs"; + +// TODO: Will update above statement to import from @pipedream/linear_app +// after updates to linear_app are published + +import utils from "../../common/utils.mjs"; + +/* eslint-disable pipedream/required-properties-type */ +/* eslint-disable pipedream/required-properties-name */ +/* eslint-disable pipedream/required-properties-version */ + +export default { + ...projectUpdatedInstant, + ...utils.getAppProps(projectUpdatedInstant), + key: "linear-project-updated-instant", + description: "Emit new event when a project is updated (OAuth). [See the documentation](https://developers.linear.app/docs/graphql/webhooks)", + version: "0.0.1", +}; diff --git a/components/linear_app/actions/create-issue/create-issue.mjs b/components/linear_app/actions/create-issue/create-issue.mjs index e61838831b610..b9bef8a3a2582 100644 --- a/components/linear_app/actions/create-issue/create-issue.mjs +++ b/components/linear_app/actions/create-issue/create-issue.mjs @@ -5,7 +5,7 @@ export default { key: "linear_app-create-issue", name: "Create Issue", description: "Create an issue (API Key). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues)", - version: "0.4.5", + version: "0.4.6", props: { linearApp, teamId: { diff --git a/components/linear_app/actions/get-issue/get-issue.mjs b/components/linear_app/actions/get-issue/get-issue.mjs index 84bf48f70564b..921f1d793df48 100644 --- a/components/linear_app/actions/get-issue/get-issue.mjs +++ b/components/linear_app/actions/get-issue/get-issue.mjs @@ -4,7 +4,7 @@ export default { key: "linear_app-get-issue", name: "Get Issue", description: "Get an issue by ID (API Key). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api)", - version: "0.1.5", + version: "0.1.6", type: "action", props: { linearApp, diff --git a/components/linear_app/actions/get-teams/get-teams.mjs b/components/linear_app/actions/get-teams/get-teams.mjs index e4dd477064526..0333b3ffe1555 100644 --- a/components/linear_app/actions/get-teams/get-teams.mjs +++ b/components/linear_app/actions/get-teams/get-teams.mjs @@ -4,7 +4,7 @@ export default { key: "linear_app-get-teams", name: "Get Teams", description: "Get all the teams (API Key). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api)", - version: "0.2.5", + version: "0.2.6", type: "action", props: { linearApp, diff --git a/components/linear_app/actions/search-issues/search-issues.mjs b/components/linear_app/actions/search-issues/search-issues.mjs index c4b2136ac2493..bad7afb67ac46 100644 --- a/components/linear_app/actions/search-issues/search-issues.mjs +++ b/components/linear_app/actions/search-issues/search-issues.mjs @@ -6,7 +6,7 @@ export default { name: "Search Issues", description: "Search issues (API Key). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api)", type: "action", - version: "0.2.5", + version: "0.2.6", props: { linearApp, query: { diff --git a/components/linear_app/actions/update-issue/update-issue.mjs b/components/linear_app/actions/update-issue/update-issue.mjs index a9f9986f4964b..e2a189d4290c5 100644 --- a/components/linear_app/actions/update-issue/update-issue.mjs +++ b/components/linear_app/actions/update-issue/update-issue.mjs @@ -5,7 +5,7 @@ export default { name: "Update Issue", description: "Update an issue (API Key). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues)", type: "action", - version: "0.1.5", + version: "0.1.6", props: { linearApp, teamId: { diff --git a/components/linear_app/common/fragments.mjs b/components/linear_app/common/fragments.mjs index 29e53665fe39b..f0d3dc21890fc 100644 --- a/components/linear_app/common/fragments.mjs +++ b/components/linear_app/common/fragments.mjs @@ -101,4 +101,39 @@ export default { } } `, + project: ` + fragment Project on Project { + id + name + creator { + id + } + lead { + id + } + status { + id + } + color + completedIssueCountHistory + completedScopeHistory + createdAt + description + inProgressScopeHistory + issueCountHistory + name + priority + progress + scope + scopeHistory + slackIssueComments + slackIssueStatuses + slackNewIssue + slugId + sortOrder + state + updatedAt + url + } + `, }; diff --git a/components/linear_app/common/queries.mjs b/components/linear_app/common/queries.mjs index fc2070ab1b1f1..a8ebf50f6e752 100644 --- a/components/linear_app/common/queries.mjs +++ b/components/linear_app/common/queries.mjs @@ -48,13 +48,31 @@ export default { ${fragments.comment} `, listProjects: ` - query ListProjects { - projects { + query ListProjects( + $filter: ProjectFilter, + $before: String, + $after: String, + $first: Int, + $last: Int, + $orderBy: PaginationOrderBy + ) { + projects( + filter: $filter, + before: $before, + after: $after, + first: $first, + last: $last, + orderBy: $orderBy + ) { + pageInfo { + ...PageInfo + } nodes { - id - name + ...Project } } } + ${fragments.project} + ${fragments.pageInfo} `, }; diff --git a/components/linear_app/package.json b/components/linear_app/package.json index 51971257eccab..a35d5e3f301f2 100644 --- a/components/linear_app/package.json +++ b/components/linear_app/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/linear_app", - "version": "0.5.7", + "version": "0.6.0", "description": "Pipedream Linear_app Components", "main": "linear_app.app.mjs", "keywords": [ diff --git a/components/linear_app/sources/comment-created-instant/comment-created-instant.mjs b/components/linear_app/sources/comment-created-instant/comment-created-instant.mjs index e4524b05b3ac7..27a3b0d075a1c 100644 --- a/components/linear_app/sources/comment-created-instant/comment-created-instant.mjs +++ b/components/linear_app/sources/comment-created-instant/comment-created-instant.mjs @@ -7,7 +7,7 @@ export default { name: "New Created Comment (Instant)", description: "Emit new event when a new comment is created. [See the documentation](https://developers.linear.app/docs/graphql/webhooks)", type: "source", - version: "0.1.7", + version: "0.1.8", dedupe: "unique", methods: { ...common.methods, diff --git a/components/linear_app/sources/issue-created-instant/issue-created-instant.mjs b/components/linear_app/sources/issue-created-instant/issue-created-instant.mjs index ba52f23a8e47d..226c32bbf0daa 100644 --- a/components/linear_app/sources/issue-created-instant/issue-created-instant.mjs +++ b/components/linear_app/sources/issue-created-instant/issue-created-instant.mjs @@ -7,7 +7,7 @@ export default { name: "New Created Issue (Instant)", description: "Emit new event when a new issue is created. [See the documentation](https://developers.linear.app/docs/graphql/webhooks)", type: "source", - version: "0.3.7", + version: "0.3.8", dedupe: "unique", methods: { ...common.methods, diff --git a/components/linear_app/sources/issue-updated-instant/issue-updated-instant.mjs b/components/linear_app/sources/issue-updated-instant/issue-updated-instant.mjs index 3dcdbb81325d3..a4739a35c1375 100644 --- a/components/linear_app/sources/issue-updated-instant/issue-updated-instant.mjs +++ b/components/linear_app/sources/issue-updated-instant/issue-updated-instant.mjs @@ -7,7 +7,7 @@ export default { name: "New Updated Issue (Instant)", description: "Emit new event when an issue is updated. [See the documentation](https://developers.linear.app/docs/graphql/webhooks)", type: "source", - version: "0.3.7", + version: "0.3.8", dedupe: "unique", methods: { ...common.methods, diff --git a/components/linear_app/sources/new-issue-status-updated/new-issue-status-updated.mjs b/components/linear_app/sources/new-issue-status-updated/new-issue-status-updated.mjs index 59b00fbb2c517..d0a721258ac99 100644 --- a/components/linear_app/sources/new-issue-status-updated/new-issue-status-updated.mjs +++ b/components/linear_app/sources/new-issue-status-updated/new-issue-status-updated.mjs @@ -8,7 +8,7 @@ export default { name: "New Issue Status Updated (Instant)", description: "Emit new event when the status of an issue is updated. [See the documentation](https://developers.linear.app/docs/graphql/webhooks)", type: "source", - version: "0.1.7", + version: "0.1.8", dedupe: "unique", props: { linearApp: common.props.linearApp, diff --git a/components/linear_app/sources/project-updated-instant/project-updated-instant.mjs b/components/linear_app/sources/project-updated-instant/project-updated-instant.mjs new file mode 100644 index 0000000000000..66ed456f84298 --- /dev/null +++ b/components/linear_app/sources/project-updated-instant/project-updated-instant.mjs @@ -0,0 +1,68 @@ +import common from "../common/webhook.mjs"; +import constants from "../../common/constants.mjs"; +import linearApp from "../../linear_app.app.mjs"; + +export default { + ...common, + key: "linear_app-project-updated-instant", + name: "New Updated Project (Instant)", + description: "Emit new event when a project is updated. [See the documentation](https://developers.linear.app/docs/graphql/webhooks)", + type: "source", + version: "0.0.1", + dedupe: "unique", + props: { + linearApp, + teamIds: { + label: "Team IDs", + type: "string[]", + propDefinition: [ + linearApp, + "teamId", + ], + reloadProps: true, + }, + db: "$.service.db", + }, + methods: { + ...common.methods, + getResourceTypes() { + return [ + constants.RESOURCE_TYPE.PROJECT, + ]; + }, + getWebhookLabel() { + return "Project updated"; + }, + getResourcesFn() { + return this.linearApp.listProjects; + }, + getResourcesFnArgs() { + return { + orderBy: "updatedAt", + filter: { + accessibleTeams: { + id: { + in: this.teamIds, + }, + }, + }, + }; + }, + getResource(project) { + return this.linearApp.getProject(project.id); + }, + getMetadata(resource) { + const { + name, + data, + updatedAt, + } = resource; + const ts = Date.parse(data?.updatedAt || updatedAt); + return { + id: `${resource.id}-${ts}`, + summary: `Project Updated: ${data?.name || name}`, + ts, + }; + }, + }, +}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 67ab77f9a8d34..0b55e2e353f3c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24744,22 +24744,22 @@ packages: superagent@3.8.1: resolution: {integrity: sha512-VMBFLYgFuRdfeNQSMLbxGSLfmXL/xc+OO+BZp41Za/NRDBet/BNbkRJrYzCUu0u4GU0i/ml2dtT8b9qgkw9z6Q==} engines: {node: '>= 4.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@4.1.0: resolution: {integrity: sha512-FT3QLMasz0YyCd4uIi5HNe+3t/onxMyEho7C3PSqmti3Twgy2rXT4fmkTz6wRL6bTF4uzPcfkUCa8u4JWHw8Ag==} engines: {node: '>= 6.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@5.3.1: resolution: {integrity: sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==} engines: {node: '>= 7.0.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@7.1.6: resolution: {integrity: sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==} engines: {node: '>=6.4.0 <13 || >=14'} - deprecated: Please downgrade to v7.1.5 if you need IE/ActiveXObject support OR upgrade to v8.0.0 as we no longer support IE and published an incorrect patch version (see https://github.com/visionmedia/superagent/issues/1731) + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net supports-color@2.0.0: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==}