@pipedream/linear 0.3.3
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.
- package/LICENSE +7 -0
- package/actions/create-issue/create-issue.mjs +26 -0
- package/actions/get-teams/get-teams.mjs +15 -0
- package/actions/search-issues/search-issues.mjs +26 -0
- package/actions/update-issue/update-issue.mjs +26 -0
- package/common/utils.mjs +35 -0
- package/linear.app.mjs +15 -0
- package/package.json +20 -0
- package/sources/common/webhook-props.mjs +22 -0
- package/sources/issue-created-instant/issue-created-instant.mjs +15 -0
- package/sources/issue-updated-instant/issue-updated-instant.mjs +15 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2020 Pipedream, Inc.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import linearApp from "../../linear.app.mjs";
|
|
2
|
+
import utils from "../../common/utils.mjs";
|
|
3
|
+
import createIssue from "../../../linear_app/actions/create-issue/create-issue.mjs";
|
|
4
|
+
|
|
5
|
+
/* eslint-disable pipedream/required-properties-type */
|
|
6
|
+
/* eslint-disable pipedream/required-properties-name */
|
|
7
|
+
|
|
8
|
+
const {
|
|
9
|
+
// eslint-disable-next-line no-unused-vars
|
|
10
|
+
linearApp: app,
|
|
11
|
+
...otherProps
|
|
12
|
+
} = createIssue.props;
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
...createIssue,
|
|
16
|
+
key: "linear-create-issue",
|
|
17
|
+
description: "Create an issue (OAuth). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues)",
|
|
18
|
+
version: "0.0.2",
|
|
19
|
+
props: {
|
|
20
|
+
linearApp,
|
|
21
|
+
...utils.buildPropDefinitions({
|
|
22
|
+
app: linearApp,
|
|
23
|
+
props: otherProps,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import linearApp from "../../linear.app.mjs";
|
|
2
|
+
import getTeams from "../../../linear_app/actions/get-teams/get-teams.mjs";
|
|
3
|
+
|
|
4
|
+
/* eslint-disable pipedream/required-properties-type */
|
|
5
|
+
/* eslint-disable pipedream/required-properties-name */
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
...getTeams,
|
|
9
|
+
key: "linear-get-teams",
|
|
10
|
+
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)",
|
|
11
|
+
version: "0.0.2",
|
|
12
|
+
props: {
|
|
13
|
+
linearApp,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import linearApp from "../../linear.app.mjs";
|
|
2
|
+
import utils from "../../common/utils.mjs";
|
|
3
|
+
import searchIssues from "../../../linear_app/actions/search-issues/search-issues.mjs";
|
|
4
|
+
|
|
5
|
+
/* eslint-disable pipedream/required-properties-type */
|
|
6
|
+
/* eslint-disable pipedream/required-properties-name */
|
|
7
|
+
|
|
8
|
+
const {
|
|
9
|
+
// eslint-disable-next-line no-unused-vars
|
|
10
|
+
linearApp: app,
|
|
11
|
+
...otherProps
|
|
12
|
+
} = searchIssues.props;
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
...searchIssues,
|
|
16
|
+
key: "linear-search-issues",
|
|
17
|
+
description: "Search issues (OAuth). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api)",
|
|
18
|
+
version: "0.1.0",
|
|
19
|
+
props: {
|
|
20
|
+
linearApp,
|
|
21
|
+
...utils.buildPropDefinitions({
|
|
22
|
+
app: linearApp,
|
|
23
|
+
props: otherProps,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import linearApp from "../../linear.app.mjs";
|
|
2
|
+
import utils from "../../common/utils.mjs";
|
|
3
|
+
import updateIssue from "../../../linear_app/actions/update-issue/update-issue.mjs";
|
|
4
|
+
|
|
5
|
+
/* eslint-disable pipedream/required-properties-type */
|
|
6
|
+
/* eslint-disable pipedream/required-properties-name */
|
|
7
|
+
|
|
8
|
+
const {
|
|
9
|
+
// eslint-disable-next-line no-unused-vars
|
|
10
|
+
linearApp: app,
|
|
11
|
+
...otherProps
|
|
12
|
+
} = updateIssue.props;
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
...updateIssue,
|
|
16
|
+
key: "linear-update-issue",
|
|
17
|
+
description: "Update an issue (OAuth). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues)",
|
|
18
|
+
version: "0.0.2",
|
|
19
|
+
props: {
|
|
20
|
+
linearApp,
|
|
21
|
+
...utils.buildPropDefinitions({
|
|
22
|
+
app: linearApp,
|
|
23
|
+
props: otherProps,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
};
|
package/common/utils.mjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function buildPropDefinitions({
|
|
2
|
+
app = {}, props = {},
|
|
3
|
+
}) {
|
|
4
|
+
return Object.entries(props)
|
|
5
|
+
.reduce((newProps, [
|
|
6
|
+
key,
|
|
7
|
+
prop,
|
|
8
|
+
]) => {
|
|
9
|
+
if (!prop.propDefinition) {
|
|
10
|
+
return {
|
|
11
|
+
...newProps,
|
|
12
|
+
[key]: prop,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const [
|
|
17
|
+
, ...propDefinitionItems
|
|
18
|
+
] = prop.propDefinition;
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
...newProps,
|
|
22
|
+
[key]: {
|
|
23
|
+
...prop,
|
|
24
|
+
propDefinition: [
|
|
25
|
+
app,
|
|
26
|
+
...propDefinitionItems,
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}, {});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
buildPropDefinitions,
|
|
35
|
+
};
|
package/linear.app.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import linearApp from "../linear_app/linear_app.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...linearApp,
|
|
5
|
+
app: "linear",
|
|
6
|
+
methods: {
|
|
7
|
+
...linearApp.methods,
|
|
8
|
+
getClientOptions(options = {}) {
|
|
9
|
+
return {
|
|
10
|
+
accessToken: this.$auth.oauth_access_token,
|
|
11
|
+
...options,
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pipedream/linear",
|
|
3
|
+
"version": "0.3.3",
|
|
4
|
+
"description": "Pipedream Linear Components",
|
|
5
|
+
"main": "linear.app.mjs",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"pipedream",
|
|
8
|
+
"linear"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://pipedream.com/apps/linear",
|
|
11
|
+
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@linear/sdk": "^1.22.0"
|
|
15
|
+
},
|
|
16
|
+
"gitHead": "e12480b94cc03bed4808ebc6b13e7fdb3a1ba535",
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import linearApp from "../../linear.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
props: {
|
|
5
|
+
linearApp,
|
|
6
|
+
teamId: {
|
|
7
|
+
propDefinition: [
|
|
8
|
+
linearApp,
|
|
9
|
+
"teamId",
|
|
10
|
+
],
|
|
11
|
+
optional: true,
|
|
12
|
+
},
|
|
13
|
+
projectId: {
|
|
14
|
+
propDefinition: [
|
|
15
|
+
linearApp,
|
|
16
|
+
"projectId",
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
http: "$.interface.http",
|
|
20
|
+
db: "$.service.db",
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import common from "../common/webhook-props.mjs";
|
|
2
|
+
import issueCreatedInstant from "../../../linear_app/sources/issue-created-instant/issue-created-instant.mjs";
|
|
3
|
+
|
|
4
|
+
/* eslint-disable pipedream/required-properties-type */
|
|
5
|
+
/* eslint-disable pipedream/required-properties-name */
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
...issueCreatedInstant,
|
|
9
|
+
key: "linear-issue-created-instant",
|
|
10
|
+
description: "Emit new event when a new issue is created (OAuth). See the docs [here](https://developers.linear.app/docs/graphql/webhooks)",
|
|
11
|
+
version: "0.1.0",
|
|
12
|
+
props: {
|
|
13
|
+
...common.props,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import common from "../common/webhook-props.mjs";
|
|
2
|
+
import issueUpdatedInstant from "../../../linear_app/sources/issue-updated-instant/issue-updated-instant.mjs";
|
|
3
|
+
|
|
4
|
+
/* eslint-disable pipedream/required-properties-type */
|
|
5
|
+
/* eslint-disable pipedream/required-properties-name */
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
...issueUpdatedInstant,
|
|
9
|
+
key: "linear-issue-updated-instant",
|
|
10
|
+
description: "Emit new event when an issue is updated (OAuth). See the docs [here](https://developers.linear.app/docs/graphql/webhooks)",
|
|
11
|
+
version: "0.1.0",
|
|
12
|
+
props: {
|
|
13
|
+
...common.props,
|
|
14
|
+
},
|
|
15
|
+
};
|