Skip to content

Commit 9f4bc73

Browse files
committed
new source
1 parent 7e653f2 commit 9f4bc73

File tree

3 files changed

+74
-42
lines changed

3 files changed

+74
-42
lines changed

components/planview_leankit/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/planview_leankit",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Pipedream Planview Leankit Components",
55
"main": "planview_leankit.app.mjs",
66
"keywords": [
@@ -10,7 +10,7 @@
1010
"homepage": "https://pipedream.com/apps/planview_leankit",
1111
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1212
"dependencies": {
13-
"@pipedream/platform": "^1.3.0",
13+
"@pipedream/platform": "^3.1.0",
1414
"moment": "^2.29.4"
1515
},
1616
"publishConfig": {

components/planview_leankit/planview_leankit.app.mjs

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ export default {
66
blockReason: {
77
type: "string",
88
label: "Block Reason",
9-
description: "The block reason.",
9+
description: "The block reason",
1010
},
1111
boardId: {
1212
type: "string",
13-
label: "Board Id",
14-
description: "The Id of the board.",
13+
label: "Board ID",
14+
description: "The ID of the board",
1515
async options({ page }) {
1616
const { boards } = await this.listBoards({
1717
params: {
@@ -29,8 +29,8 @@ export default {
2929
},
3030
cardId: {
3131
type: "string",
32-
label: "Card Id",
33-
description: "The Id of the card.",
32+
label: "Card ID",
33+
description: "The ID of the card",
3434
async options({
3535
page, boardId,
3636
}) {
@@ -51,8 +51,8 @@ export default {
5151
},
5252
cardTags: {
5353
type: "string[]",
54-
label: "Tag ids",
55-
description: "Tag ids.",
54+
label: "Tag Ids",
55+
description: "Tag IDs",
5656
async options({ cardId }) {
5757
const { tags } = await this.getCard({
5858
cardId,
@@ -63,8 +63,8 @@ export default {
6363
},
6464
childCardId: {
6565
type: "string[]",
66-
label: "Child Card Ids",
67-
description: "Collection of child card ids.",
66+
label: "Child Card IDs",
67+
description: "Collection of child card IDs",
6868
async options({
6969
page, cardId, boardId,
7070
}) {
@@ -100,8 +100,8 @@ export default {
100100
},
101101
customIconId: {
102102
type: "string",
103-
label: "Custom Icon Id",
104-
description: "The custom icon.",
103+
label: "Custom Icon ID",
104+
description: "The custom icon",
105105
async options({ cardId }) {
106106
const { board: { id: boardId } } = await this.getCard({
107107
cardId,
@@ -121,13 +121,13 @@ export default {
121121
},
122122
customId: {
123123
type: "string",
124-
label: "Custom Id",
125-
description: "The card header.",
124+
label: "Custom ID",
125+
description: "The card header",
126126
},
127127
customFieldId: {
128128
type: "string",
129-
label: "Custom Field Id",
130-
description: "The Id of the custom field.",
129+
label: "Custom Field ID",
130+
description: "The Id of the custom field",
131131
async options({ boardId }) {
132132
const { customFields } = await this.listCustomFields({
133133
boardId,
@@ -149,22 +149,22 @@ export default {
149149
description: {
150150
type: "string",
151151
label: "Description",
152-
description: "The card description.",
152+
description: "The card description",
153153
},
154154
deleted: {
155155
type: "boolean",
156156
label: "Deleted",
157-
description: "Return the card ids for deleted cards.",
157+
description: "Return the card IDs for deleted cards",
158158
},
159159
externalLink: {
160160
type: "object",
161161
label: "External Link",
162-
description: "External link object with string label and string url fields.",
162+
description: "External link object with string label and string url fields",
163163
},
164164
index: {
165165
type: "integer",
166166
label: "Index",
167-
description: "The position of the card in the lane starting at 0 as the first position.",
167+
description: "The position of the card in the lane starting at 0 as the first position",
168168
},
169169
isBlocked: {
170170
type: "boolean",
@@ -174,7 +174,7 @@ export default {
174174
laneId: {
175175
type: "string",
176176
label: "Lane Id",
177-
description: "The Id of the lane.",
177+
description: "The ID of the lane",
178178
async options({
179179
boardId, cardId,
180180
}) {
@@ -209,7 +209,7 @@ export default {
209209
laneType: {
210210
type: "string",
211211
label: "Lane Type",
212-
description: "The type of the lane.",
212+
description: "The type of the lane",
213213
async options({ boardId }) {
214214
const { laneTypes } = await this.getBoard({
215215
boardId,
@@ -230,8 +230,8 @@ export default {
230230
},
231231
parentCardId: {
232232
type: "string[]",
233-
label: "Parent Card Ids",
234-
description: "Collection of parent card ids.",
233+
label: "Parent Card IDs",
234+
description: "Collection of parent card IDs.",
235235
async options({
236236
page, cardId, boardId,
237237
}) {
@@ -267,8 +267,8 @@ export default {
267267
},
268268
planningIncrementIds: {
269269
type: "string[]",
270-
label: "Planning Increment Ids",
271-
description: "Collection of planning increment ids.",
270+
label: "Planning Increment IDs",
271+
description: "Collection of planning increment IDs.",
272272
async options({
273273
page, planningSeriesId,
274274
}) {
@@ -289,8 +289,8 @@ export default {
289289
},
290290
planningSeriesId: {
291291
type: "string",
292-
label: "Planning Series Id",
293-
description: "Planning series for an account.",
292+
label: "Planning Series ID",
293+
description: "Planning series for an account",
294294
async options({ page }) {
295295
const { series } = await this.listPlanningSeries({
296296
params: {
@@ -319,7 +319,7 @@ export default {
319319
priority: {
320320
type: "string",
321321
label: "Priority",
322-
description: "The priority of the card.",
322+
description: "The priority of the card",
323323
options: [
324324
"critical",
325325
"high",
@@ -330,12 +330,12 @@ export default {
330330
size: {
331331
type: "integer",
332332
label: "Size",
333-
description: "The card size.",
333+
description: "The card size",
334334
},
335335
search: {
336336
type: "string",
337337
label: "Search",
338-
description: "Full text search on card title and external card id.",
338+
description: "Full text search on card title and external card ID",
339339
},
340340
since: {
341341
type: "string",
@@ -355,7 +355,7 @@ export default {
355355
tags: {
356356
type: "string[]",
357357
label: "Tags",
358-
description: "Collection of tags.",
358+
description: "Collection of tags",
359359
async options({
360360
boardId, cardId,
361361
}) {
@@ -375,8 +375,8 @@ export default {
375375
},
376376
taskId: {
377377
type: "string",
378-
label: "Task Id",
379-
description: "The Id of the task.",
378+
label: "Task ID",
379+
description: "The ID of the task",
380380
async options({
381381
page, cardId,
382382
}) {
@@ -397,8 +397,8 @@ export default {
397397
},
398398
taskLaneId: {
399399
type: "string",
400-
label: "Lane Id",
401-
description: "The Id of the lane.",
400+
label: "Lane ID",
401+
description: "The Id of the lane",
402402
async options({
403403
cardId, status,
404404
}) {
@@ -420,12 +420,12 @@ export default {
420420
title: {
421421
type: "string",
422422
label: "Title",
423-
description: "The card title.",
423+
description: "The card title",
424424
},
425425
typeId: {
426426
type: "string",
427-
label: "Type Id",
428-
description: "The id of the type.",
427+
label: "Type ID",
428+
description: "The ID of the type",
429429
async options({
430430
boardId, cardId, isTask = false,
431431
}) {
@@ -453,8 +453,8 @@ export default {
453453
},
454454
userId: {
455455
type: "string",
456-
label: "User Id",
457-
description: "The id of the user.",
456+
label: "User ID",
457+
description: "The ID of the user",
458458
async options({
459459
page, cardId,
460460
}) {
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import common from "../common/base.mjs";
2+
3+
export default {
4+
...common,
5+
key: "planview_leankit-card-assigned-to-user",
6+
name: "New Card Assigned To User",
7+
description: "Emit new event when a card is assigned to a user.",
8+
type: "source",
9+
version: "0.0.1",
10+
dedupe: "unique",
11+
props: {
12+
...common.props,
13+
userId: {
14+
propDefinition: [
15+
common.props.planviewLeankit,
16+
"userId",
17+
],
18+
},
19+
},
20+
methods: {
21+
...common.methods,
22+
getFunc() {
23+
return this.planviewLeankit.listActivity;
24+
},
25+
validate(d) {
26+
return d.type === "userAssigned" && d.data.user.id === this.userId;
27+
},
28+
getSummary(data) {
29+
return `Card '${data.data.card.title}' assigned to user '${data.data.user.id}'`;
30+
},
31+
},
32+
};

0 commit comments

Comments
 (0)