@pipedream/linear_app 0.7.5 → 0.8.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.
@@ -4,8 +4,13 @@ export default {
4
4
  type: "action",
5
5
  key: "linear_app-create-issue",
6
6
  name: "Create Issue",
7
- description: "Creates a new issue in Linear. Requires team ID and title. Optional: description, assignee, project, state. Returns response object with success status and issue details. Uses API Key authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues).",
8
- version: "0.4.12",
7
+ description: "Creates a new issue in Linear. Requires team ID and title. Optional: description, assignee, project, state. Returns response object with success status and issue details. Uses API Key authentication. [See the documentation](https://linear.app/developers/graphql#creating-and-editing-issues).",
8
+ version: "0.4.15",
9
+ annotations: {
10
+ destructiveHint: true,
11
+ openWorldHint: true,
12
+ readOnlyHint: false,
13
+ },
9
14
  props: {
10
15
  linearApp,
11
16
  teamId: {
@@ -50,6 +55,21 @@ export default {
50
55
  }),
51
56
  ],
52
57
  },
58
+ labelIds: {
59
+ propDefinition: [
60
+ linearApp,
61
+ "issueLabels",
62
+ () => ({
63
+ byId: true,
64
+ }),
65
+ ],
66
+ },
67
+ priority: {
68
+ propDefinition: [
69
+ linearApp,
70
+ "issuePriority",
71
+ ],
72
+ },
53
73
  },
54
74
  async run({ $ }) {
55
75
  const {
@@ -60,6 +80,8 @@ export default {
60
80
  teamId,
61
81
  assigneeId,
62
82
  stateId,
83
+ labelIds,
84
+ priority,
63
85
  } = this;
64
86
 
65
87
  const response =
@@ -70,6 +92,8 @@ export default {
70
92
  description,
71
93
  assigneeId,
72
94
  stateId,
95
+ labelIds,
96
+ priority,
73
97
  });
74
98
 
75
99
  const summary = response.success
@@ -0,0 +1,93 @@
1
+ import linearApp from "../../linear_app.app.mjs";
2
+
3
+ export default {
4
+ key: "linear_app-create-project",
5
+ name: "Create Project",
6
+ description: "Create a project in Linear. [See the documentation](https://studio.apollographql.com/public/Linear-API/variant/current/schema/reference/inputs/ProjectCreateInput).",
7
+ type: "action",
8
+ version: "0.0.1",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: false,
13
+ },
14
+ props: {
15
+ linearApp,
16
+ teamId: {
17
+ propDefinition: [
18
+ linearApp,
19
+ "teamId",
20
+ ],
21
+ },
22
+ name: {
23
+ type: "string",
24
+ label: "Name",
25
+ description: "The name of the project",
26
+ },
27
+ description: {
28
+ type: "string",
29
+ label: "Description",
30
+ description: "The description of the project",
31
+ optional: true,
32
+ },
33
+ statusId: {
34
+ propDefinition: [
35
+ linearApp,
36
+ "projectStatusId",
37
+ ],
38
+ },
39
+ priority: {
40
+ propDefinition: [
41
+ linearApp,
42
+ "projectPriority",
43
+ ],
44
+ },
45
+ memberIds: {
46
+ propDefinition: [
47
+ linearApp,
48
+ "assigneeId",
49
+ ],
50
+ type: "string[]",
51
+ label: "Member IDs",
52
+ description: "The IDs of the members of the project",
53
+ optional: true,
54
+ },
55
+ startDate: {
56
+ type: "string",
57
+ label: "Start Date",
58
+ description: "The start date of the project in ISO 8601 format",
59
+ optional: true,
60
+ },
61
+ targetDate: {
62
+ type: "string",
63
+ label: "Target Date",
64
+ description: "The target date of the project in ISO 8601 format",
65
+ optional: true,
66
+ },
67
+ labelIds: {
68
+ propDefinition: [
69
+ linearApp,
70
+ "projectLabelIds",
71
+ ],
72
+ },
73
+ },
74
+ async run({ $ }) {
75
+ const response = await this.linearApp.client().createProject({
76
+ teamIds: [
77
+ this.teamId,
78
+ ],
79
+ name: this.name,
80
+ description: this.description,
81
+ statusId: this.statusId,
82
+ priority: this.priority,
83
+ memberIds: this.memberIds,
84
+ startDate: this.startDate,
85
+ targetDate: this.targetDate,
86
+ labelIds: this.labelIds,
87
+ });
88
+
89
+ $.export("$summary", `Successfully created project with ID ${response._project.id}`);
90
+
91
+ return response;
92
+ },
93
+ };
@@ -3,8 +3,13 @@ import linearApp from "../../linear_app.app.mjs";
3
3
  export default {
4
4
  key: "linear_app-get-issue",
5
5
  name: "Get Issue",
6
- description: "Retrieves a Linear issue by its ID. Returns complete issue details including title, description, state, assignee, team, project, labels, and timestamps. Uses API Key authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api).",
7
- version: "0.1.12",
6
+ description: "Retrieves a Linear issue by its ID. Returns complete issue details including title, description, state, assignee, team, project, labels, and timestamps. Uses API Key authentication. See Linear docs for additional info [here](https://linear.app/developers/graphql).",
7
+ version: "0.1.15",
8
+ annotations: {
9
+ destructiveHint: false,
10
+ openWorldHint: true,
11
+ readOnlyHint: true,
12
+ },
8
13
  type: "action",
9
14
  props: {
10
15
  linearApp,
@@ -4,8 +4,13 @@ import constants from "../../common/constants.mjs";
4
4
  export default {
5
5
  key: "linear_app-get-teams",
6
6
  name: "Get Teams",
7
- description: "Retrieves all teams in your Linear workspace. Returns array of team objects with details like ID, name, and key. Supports pagination with configurable limit. Uses API Key authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api).",
8
- version: "0.2.12",
7
+ description: "Retrieves all teams in your Linear workspace. Returns array of team objects with details like ID, name, and key. Supports pagination with configurable limit. Uses API Key authentication. See Linear docs for additional info [here](https://linear.app/developers/graphql).",
8
+ version: "0.2.15",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
9
14
  type: "action",
10
15
  props: {
11
16
  linearApp,
@@ -0,0 +1,66 @@
1
+ import linearApp from "../../linear_app.app.mjs";
2
+ import utils from "../../common/utils.mjs";
3
+
4
+ export default {
5
+ key: "linear_app-list-projects",
6
+ name: "List Projects",
7
+ description: "List projects in Linear. [See the documentation](https://studio.apollographql.com/public/Linear-API/variant/current/schema/reference/objects/ProjectConnection?query=projects).",
8
+ type: "action",
9
+ version: "0.0.1",
10
+ annotations: {
11
+ destructiveHint: false,
12
+ openWorldHint: true,
13
+ readOnlyHint: true,
14
+ },
15
+ props: {
16
+ linearApp,
17
+ teamId: {
18
+ propDefinition: [
19
+ linearApp,
20
+ "teamId",
21
+ ],
22
+ },
23
+ orderBy: {
24
+ propDefinition: [
25
+ linearApp,
26
+ "orderBy",
27
+ ],
28
+ },
29
+ first: {
30
+ type: "integer",
31
+ label: "First",
32
+ description: "The number of projects to return",
33
+ optional: true,
34
+ },
35
+ after: {
36
+ type: "string",
37
+ label: "After",
38
+ description: "The cursor to return the next page of projects",
39
+ optional: true,
40
+ },
41
+ },
42
+ async run({ $ }) {
43
+ const variables = utils.buildVariables(this.after, {
44
+ filter: {
45
+ accessibleTeams: {
46
+ id: {
47
+ eq: this.teamId,
48
+ },
49
+ },
50
+ },
51
+ orderBy: this.orderBy,
52
+ limit: this.first,
53
+ });
54
+
55
+ const {
56
+ nodes, pageInfo,
57
+ } = await this.linearApp.listProjects(variables);
58
+
59
+ $.export("$summary", `Found ${nodes.length} projects`);
60
+
61
+ return {
62
+ nodes,
63
+ pageInfo,
64
+ };
65
+ },
66
+ };
@@ -5,9 +5,14 @@ import constants from "../../common/constants.mjs";
5
5
  export default {
6
6
  key: "linear_app-search-issues",
7
7
  name: "Search Issues",
8
- description: "Searches Linear issues by team, project, assignee, labels, state, or text query. Supports pagination, ordering, and archived issues. Returns array of matching issues. Uses API Key authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api).",
8
+ description: "Searches Linear issues by team, project, assignee, labels, state, or text query. Supports pagination, ordering, and archived issues. Returns array of matching issues. Uses API Key authentication. See Linear docs for additional info [here](https://linear.app/developers/graphql).",
9
9
  type: "action",
10
- version: "0.2.12",
10
+ version: "0.2.15",
11
+ annotations: {
12
+ destructiveHint: false,
13
+ openWorldHint: true,
14
+ readOnlyHint: true,
15
+ },
11
16
  props: {
12
17
  linearApp,
13
18
  teamId: {
@@ -3,9 +3,14 @@ import linearApp from "../../linear_app.app.mjs";
3
3
  export default {
4
4
  key: "linear_app-update-issue",
5
5
  name: "Update Issue",
6
- description: "Updates an existing Linear issue. Can modify title, description, assignee, state, project, team, labels, priority, and dates. Returns updated issue details. Uses API Key authentication. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues).",
6
+ description: "Updates an existing Linear issue. Can modify title, description, assignee, state, project, team, labels, priority, and dates. Returns updated issue details. Uses API Key authentication. [See the documentation](https://linear.app/developers/graphql#creating-and-editing-issues).",
7
7
  type: "action",
8
- version: "0.1.12",
8
+ version: "0.1.15",
9
+ annotations: {
10
+ destructiveHint: true,
11
+ openWorldHint: true,
12
+ readOnlyHint: false,
13
+ },
9
14
  props: {
10
15
  linearApp,
11
16
  teamId: {
@@ -63,6 +68,30 @@ export default {
63
68
  "assigneeId",
64
69
  ],
65
70
  },
71
+ labelIds: {
72
+ propDefinition: [
73
+ linearApp,
74
+ "issueLabels",
75
+ () => ({
76
+ byId: true,
77
+ }),
78
+ ],
79
+ },
80
+ projectId: {
81
+ propDefinition: [
82
+ linearApp,
83
+ "projectId",
84
+ ({ teamId }) => ({
85
+ teamId,
86
+ }),
87
+ ],
88
+ },
89
+ priority: {
90
+ propDefinition: [
91
+ linearApp,
92
+ "issuePriority",
93
+ ],
94
+ },
66
95
  },
67
96
  async run({ $ }) {
68
97
  const {
@@ -72,6 +101,9 @@ export default {
72
101
  teamIdToUpdate,
73
102
  stateId,
74
103
  assigneeId,
104
+ labelIds,
105
+ projectId,
106
+ priority,
75
107
  } = this;
76
108
 
77
109
  const response =
@@ -83,6 +115,9 @@ export default {
83
115
  description,
84
116
  assigneeId,
85
117
  stateId,
118
+ labelIds,
119
+ projectId,
120
+ priority,
86
121
  },
87
122
  });
88
123
 
@@ -21,7 +21,7 @@ const RESOURCE_TYPE = {
21
21
 
22
22
  const RESOURCE_TYPES = Object.values(RESOURCE_TYPE);
23
23
 
24
- // https://developers.linear.app/docs/graphql/webhooks#how-does-a-webhook-work
24
+ // https://linear.app/developers/webhooks#how-does-a-webhook-work
25
25
  // To make sure a Webhook POST is truly created by Linear, check the request
26
26
  // that originates from one of the following IPs:
27
27
  const CLIENT_IPS = [
@@ -45,6 +45,29 @@ const ORDER_BY_OPTIONS = [
45
45
  },
46
46
  ];
47
47
 
48
+ const PRIORITY_OPTIONS = [
49
+ {
50
+ value: 0,
51
+ label: "No priority",
52
+ },
53
+ {
54
+ value: 1,
55
+ label: "Urgent",
56
+ },
57
+ {
58
+ value: 2,
59
+ label: "High",
60
+ },
61
+ {
62
+ value: 3,
63
+ label: "Normal",
64
+ },
65
+ {
66
+ value: 4,
67
+ label: "Low",
68
+ },
69
+ ];
70
+
48
71
  export default {
49
72
  WEBHOOK_ID,
50
73
  LINEAR_DELIVERY_HEADER,
@@ -57,4 +80,5 @@ export default {
57
80
  CLIENT_IPS,
58
81
  ORDER_BY_OPTIONS,
59
82
  FIELD,
83
+ PRIORITY_OPTIONS,
60
84
  };
@@ -151,14 +151,73 @@ export default {
151
151
  label: "Issue Labels",
152
152
  description: "The labels in the issue",
153
153
  optional: true,
154
- async options({ prevContext }) {
154
+ async options({
155
+ prevContext, byId = false,
156
+ }) {
155
157
  return this.listResourcesOptions({
156
158
  prevContext,
157
159
  resourcesFn: this.listIssueLabels,
158
- resouceMapper: ({ name }) => name,
160
+ resouceMapper: ({
161
+ id, name,
162
+ }) => byId
163
+ ? ({
164
+ label: name,
165
+ value: id,
166
+ })
167
+ : name,
159
168
  });
160
169
  },
161
170
  },
171
+ projectStatusId: {
172
+ type: "string",
173
+ label: "Status ID",
174
+ description: "The ID of the status of the project",
175
+ optional: true,
176
+ async options({ prevContext }) {
177
+ return this.listResourcesOptions({
178
+ prevContext,
179
+ resourcesFn: this.listProjectStatuses,
180
+ resouceMapper: ({
181
+ id, name,
182
+ }) => ({
183
+ label: name,
184
+ value: id,
185
+ }),
186
+ });
187
+ },
188
+ },
189
+ projectLabelIds: {
190
+ type: "string[]",
191
+ label: "Label IDs",
192
+ description: "The IDs of the labels for the project",
193
+ optional: true,
194
+ async options({ prevContext }) {
195
+ return this.listResourcesOptions({
196
+ prevContext,
197
+ resourcesFn: this.listProjectLabels,
198
+ resouceMapper: ({
199
+ id, name,
200
+ }) => ({
201
+ label: name,
202
+ value: id,
203
+ }),
204
+ });
205
+ },
206
+ },
207
+ projectPriority: {
208
+ type: "integer",
209
+ label: "Priority",
210
+ description: "The priority of the project",
211
+ optional: true,
212
+ options: constants.PRIORITY_OPTIONS,
213
+ },
214
+ issuePriority: {
215
+ type: "integer",
216
+ label: "Priority",
217
+ description: "The priority of the issue",
218
+ optional: true,
219
+ options: constants.PRIORITY_OPTIONS,
220
+ },
162
221
  query: {
163
222
  type: "string",
164
223
  label: "Query",
@@ -167,7 +226,7 @@ export default {
167
226
  },
168
227
  orderBy: {
169
228
  type: "string",
170
- label: "Order by",
229
+ label: "Order By",
171
230
  description: "By which field should the pagination order by. Available options are `createdAt` (default) and `updatedAt`.",
172
231
  optional: true,
173
232
  options: constants.ORDER_BY_OPTIONS,
@@ -315,6 +374,12 @@ export default {
315
374
  });
316
375
  return comment;
317
376
  },
377
+ async listProjectStatuses(variables = {}) {
378
+ return this.client().projectStatuses(variables);
379
+ },
380
+ async listProjectLabels(variables = {}) {
381
+ return this.client().projectLabels(variables);
382
+ },
318
383
  async listResourcesOptions({
319
384
  prevContext, resourcesFn, resourcesArgs, resouceMapper,
320
385
  } = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/linear_app",
3
- "version": "0.7.5",
3
+ "version": "0.8.1",
4
4
  "description": "Pipedream Linear_app Components",
5
5
  "main": "linear_app.app.mjs",
6
6
  "keywords": [
@@ -15,6 +15,6 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@linear/sdk": "^55.1.0",
18
- "@pipedream/platform": "^3.0.3"
18
+ "@pipedream/platform": "^3.1.0"
19
19
  }
20
20
  }
@@ -5,9 +5,9 @@ export default {
5
5
  ...common,
6
6
  key: "linear_app-comment-created-instant",
7
7
  name: "New Comment Created (Instant)",
8
- description: "Triggers instantly when a new comment is added to an issue in Linear. Returns comment details including content, author, issue reference, and timestamps. Supports filtering by team. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).",
8
+ description: "Triggers instantly when a new comment is added to an issue in Linear. Returns comment details including content, author, issue reference, and timestamps. Supports filtering by team. See Linear docs for additional info [here](https://linear.app/developers/webhooks).",
9
9
  type: "source",
10
- version: "0.1.14",
10
+ version: "0.1.16",
11
11
  dedupe: "unique",
12
12
  methods: {
13
13
  ...common.methods,
@@ -5,9 +5,9 @@ export default {
5
5
  ...common,
6
6
  key: "linear_app-issue-created-instant",
7
7
  name: "New Issue Created (Instant)",
8
- description: "Triggers instantly when a new issue is created in Linear. Provides complete issue details including title, description, team, assignee, state, and timestamps. Supports filtering by team and project. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).",
8
+ description: "Triggers instantly when a new issue is created in Linear. Provides complete issue details including title, description, team, assignee, state, and timestamps. Supports filtering by team and project. See Linear docs for additional info [here](https://linear.app/developers/webhooks).",
9
9
  type: "source",
10
- version: "0.3.14",
10
+ version: "0.3.16",
11
11
  dedupe: "unique",
12
12
  methods: {
13
13
  ...common.methods,
@@ -5,9 +5,9 @@ export default {
5
5
  ...common,
6
6
  key: "linear_app-issue-updated-instant",
7
7
  name: "Issue Updated (Instant)",
8
- description: "Triggers instantly when any issue is updated in Linear. Provides complete issue details with changes. Supports filtering by team and project. Includes all updates except status changes. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).",
8
+ description: "Triggers instantly when any issue is updated in Linear. Provides complete issue details with changes. Supports filtering by team and project. Includes all updates except status changes. See Linear docs for additional info [here](https://linear.app/developers/webhooks).",
9
9
  type: "source",
10
- version: "0.3.14",
10
+ version: "0.3.16",
11
11
  dedupe: "unique",
12
12
  methods: {
13
13
  ...common.methods,
@@ -6,9 +6,9 @@ export default {
6
6
  ...common,
7
7
  key: "linear_app-new-issue-status-updated",
8
8
  name: "Issue Status Updated (Instant)",
9
- description: "Triggers instantly when an issue's workflow state changes (e.g., Todo to In Progress). Returns issue with previous and current state info. Can filter by specific target state. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).",
9
+ description: "Triggers instantly when an issue's workflow state changes (e.g., Todo to In Progress). Returns issue with previous and current state info. Can filter by specific target state. See Linear docs for additional info [here](https://linear.app/developers/webhooks).",
10
10
  type: "source",
11
- version: "0.1.14",
11
+ version: "0.1.16",
12
12
  dedupe: "unique",
13
13
  props: {
14
14
  linearApp: common.props.linearApp,
@@ -6,9 +6,9 @@ export default {
6
6
  ...common,
7
7
  key: "linear_app-new-projectupdate-created",
8
8
  name: "New Project Update Written (Instant)",
9
- description: "Triggers instantly when a project update (status report) is created in Linear. Returns update content, author, project details, and health status. Filters by team and optionally by project. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).",
9
+ description: "Triggers instantly when a project update (status report) is created in Linear. Returns update content, author, project details, and health status. Filters by team and optionally by project. See Linear docs for additional info [here](https://linear.app/developers/webhooks).",
10
10
  type: "source",
11
- version: "0.0.6",
11
+ version: "0.0.8",
12
12
  dedupe: "unique",
13
13
  props: {
14
14
  linearApp,
@@ -6,9 +6,9 @@ export default {
6
6
  ...common,
7
7
  key: "linear_app-project-updated-instant",
8
8
  name: "Project Updated (Instant)",
9
- description: "Triggers instantly when a project is updated in Linear. Returns project details including name, description, status, dates, and team info. Supports filtering by specific teams. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).",
9
+ description: "Triggers instantly when a project is updated in Linear. Returns project details including name, description, status, dates, and team info. Supports filtering by specific teams. See Linear docs for additional info [here](https://linear.app/developers/webhooks).",
10
10
  type: "source",
11
- version: "0.0.7",
11
+ version: "0.0.9",
12
12
  dedupe: "unique",
13
13
  props: {
14
14
  linearApp,