@frogbotai/piece-linear 0.31.0 → 0.32.0
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/README.md +10 -2
- package/dist/index.d.ts +38 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -8
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -21,8 +21,8 @@ OAuth linking requires factory `oauth: { clientId, clientSecret }` and
|
|
|
21
21
|
`connections: [{ piece: linear, oauth: true }]`. The built-in recipe requests `actor=app`: a workspace
|
|
22
22
|
admin installs the application, and actions use the app's identity. It does not authorize actions
|
|
23
23
|
as the installing user. For actions as a person, link their API key or an externally obtained
|
|
24
|
-
user-actor OAuth access token through the credential form.
|
|
25
|
-
|
|
24
|
+
user-actor OAuth access token through the credential form. FrogBot serializes the requested scopes
|
|
25
|
+
with commas for Linear; see [OAuth scopes](#oauth-scopes) to change them.
|
|
26
26
|
|
|
27
27
|
## Channel setup
|
|
28
28
|
|
|
@@ -67,6 +67,14 @@ Linear signs the exact request body in `Linear-Signature` with HMAC-SHA256. Frog
|
|
|
67
67
|
invalid, or stale signed deliveries before channel or trigger dispatch. Channel replies are handled
|
|
68
68
|
by the adapter; the triggers below remain independent per-subscription workflows.
|
|
69
69
|
|
|
70
|
+
## OAuth scopes
|
|
71
|
+
|
|
72
|
+
Change the requested scopes with the factory's `scopes` option: `createLinear({ oauth, scopes: ({ defaultScopes }) => [...defaultScopes, 'app:assignable'] })` adds one, and an array replaces the defaults. `linearScopes` maps each name to the provider's scope string.
|
|
73
|
+
|
|
74
|
+
- Always requested: `read`.
|
|
75
|
+
- Defaults: `write`, `comments:create`, `issues:create`, `app:mentionable`.
|
|
76
|
+
- Also available: `timeSchedule:write`, `admin`, `app:assignable`.
|
|
77
|
+
|
|
70
78
|
## Actions
|
|
71
79
|
|
|
72
80
|
| Upstream action slug | Previous wrapper export | Native action | Notes |
|
package/dist/index.d.ts
CHANGED
|
@@ -4,11 +4,33 @@ import { LinearChannelAdapter } from './adapter.js';
|
|
|
4
4
|
import { createLinearClient } from './client.js';
|
|
5
5
|
export declare const linearActions: readonly ["createIssue", "updateIssue", "createProject", "updateProject", "createComment", "rawGraphqlQuery"];
|
|
6
6
|
export declare const linearTriggers: readonly ["commentCreated", "issueCreated", "issueUpdated", "issueRemoved", "projectCreated", "projectUpdated", "projectRemoved"];
|
|
7
|
-
export declare const linearScopes:
|
|
7
|
+
export declare const linearScopes: {
|
|
8
|
+
readonly read: "read";
|
|
9
|
+
readonly write: "write";
|
|
10
|
+
readonly 'issues:create': "issues:create";
|
|
11
|
+
readonly 'comments:create': "comments:create";
|
|
12
|
+
readonly 'timeSchedule:write': "timeSchedule:write";
|
|
13
|
+
readonly admin: "admin";
|
|
14
|
+
readonly 'app:assignable': "app:assignable";
|
|
15
|
+
readonly 'app:mentionable': "app:mentionable";
|
|
16
|
+
};
|
|
8
17
|
export declare const linearOAuth: {
|
|
9
18
|
authorizationUrl: string;
|
|
10
19
|
tokenUrl: string;
|
|
11
|
-
scopes:
|
|
20
|
+
scopes: {
|
|
21
|
+
catalog: {
|
|
22
|
+
readonly read: "read";
|
|
23
|
+
readonly write: "write";
|
|
24
|
+
readonly 'issues:create': "issues:create";
|
|
25
|
+
readonly 'comments:create': "comments:create";
|
|
26
|
+
readonly 'timeSchedule:write': "timeSchedule:write";
|
|
27
|
+
readonly admin: "admin";
|
|
28
|
+
readonly 'app:assignable': "app:assignable";
|
|
29
|
+
readonly 'app:mentionable': "app:mentionable";
|
|
30
|
+
};
|
|
31
|
+
defaults: ("write" | "issues:create" | "comments:create" | "app:mentionable")[];
|
|
32
|
+
required: "read"[];
|
|
33
|
+
};
|
|
12
34
|
scopeSeparator: ",";
|
|
13
35
|
params: {
|
|
14
36
|
actor: string;
|
|
@@ -54,7 +76,20 @@ export declare const createLinear: import("frogbot").PieceFactory<{
|
|
|
54
76
|
readonly oauth: {
|
|
55
77
|
authorizationUrl: string;
|
|
56
78
|
tokenUrl: string;
|
|
57
|
-
scopes:
|
|
79
|
+
scopes: {
|
|
80
|
+
catalog: {
|
|
81
|
+
readonly read: "read";
|
|
82
|
+
readonly write: "write";
|
|
83
|
+
readonly 'issues:create': "issues:create";
|
|
84
|
+
readonly 'comments:create': "comments:create";
|
|
85
|
+
readonly 'timeSchedule:write': "timeSchedule:write";
|
|
86
|
+
readonly admin: "admin";
|
|
87
|
+
readonly 'app:assignable': "app:assignable";
|
|
88
|
+
readonly 'app:mentionable': "app:mentionable";
|
|
89
|
+
};
|
|
90
|
+
defaults: ("write" | "issues:create" | "comments:create" | "app:mentionable")[];
|
|
91
|
+
required: "read"[];
|
|
92
|
+
};
|
|
58
93
|
scopeSeparator: ",";
|
|
59
94
|
params: {
|
|
60
95
|
actor: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAQzC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQ7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAe,MAAM,aAAa,CAAC;AAY9D,eAAO,MAAM,aAAa,+GAOhB,CAAC;AACX,eAAO,MAAM,cAAc,mIAQjB,CAAC;AACX,eAAO,MAAM,YAAY;;;;;;;;;CASf,CAAC;AAEX,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BvB,CAAC;AA0BF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAXkB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkClE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -34,17 +34,31 @@ export const linearTriggers = [
|
|
|
34
34
|
'projectUpdated',
|
|
35
35
|
'projectRemoved'
|
|
36
36
|
];
|
|
37
|
-
export const linearScopes =
|
|
37
|
+
export const linearScopes = {
|
|
38
|
+
read: 'read',
|
|
39
|
+
write: 'write',
|
|
40
|
+
'issues:create': 'issues:create',
|
|
41
|
+
'comments:create': 'comments:create',
|
|
42
|
+
'timeSchedule:write': 'timeSchedule:write',
|
|
43
|
+
admin: 'admin',
|
|
44
|
+
'app:assignable': 'app:assignable',
|
|
45
|
+
'app:mentionable': 'app:mentionable'
|
|
46
|
+
};
|
|
38
47
|
export const linearOAuth = {
|
|
39
48
|
authorizationUrl: 'https://linear.app/oauth/authorize',
|
|
40
49
|
tokenUrl: 'https://api.linear.app/oauth/token',
|
|
41
|
-
scopes:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
scopes: {
|
|
51
|
+
catalog: linearScopes,
|
|
52
|
+
defaults: [
|
|
53
|
+
'write',
|
|
54
|
+
'comments:create',
|
|
55
|
+
'issues:create',
|
|
56
|
+
'app:mentionable'
|
|
57
|
+
],
|
|
58
|
+
required: [
|
|
59
|
+
'read'
|
|
60
|
+
]
|
|
61
|
+
},
|
|
48
62
|
scopeSeparator: ',',
|
|
49
63
|
params: {
|
|
50
64
|
actor: 'app'
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["definePiece","findUserByEmail","createComment","createIssue","createProject","rawGraphqlQuery","updateIssue","updateProject","LinearChannelAdapter","createLinearClient","linearAuth","linearOptions","linearQuestions","commentCreated","issueCreated","issueRemoved","issueUpdated","projectCreated","projectRemoved","projectUpdated","linearWebhook","linearActions","linearTriggers","linearScopes","linearOAuth","authorizationUrl","tokenUrl","scopes","scopeSeparator","params","actor","toAuth","tokens","access_token","trim","Error","accessToken","account","client","viewer","email","id","label","name","linearChannel","adapter","auth","options","webhookSecret","apiKey","mode","channelMode","userName","botUsername","identity","author","req","user","userId","toLowerCase","questions","createLinear","slug","
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["definePiece","findUserByEmail","createComment","createIssue","createProject","rawGraphqlQuery","updateIssue","updateProject","LinearChannelAdapter","createLinearClient","linearAuth","linearOptions","linearQuestions","commentCreated","issueCreated","issueRemoved","issueUpdated","projectCreated","projectRemoved","projectUpdated","linearWebhook","linearActions","linearTriggers","linearScopes","read","write","admin","linearOAuth","authorizationUrl","tokenUrl","scopes","catalog","defaults","required","scopeSeparator","params","actor","toAuth","tokens","access_token","trim","Error","accessToken","account","client","viewer","email","id","label","name","linearChannel","adapter","auth","options","webhookSecret","apiKey","mode","channelMode","userName","botUsername","identity","author","req","user","userId","toLowerCase","questions","createLinear","slug","description","group","oauth","webhook","channel","actions","triggers"],"mappings":"AACA,SACEA,WAAW,EACXC,eAAe,QAIV,iBAAiB;AAGxB,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,WAAW,QAAQ,2BAA2B;AACvD,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,WAAW,QAAQ,2BAA2B;AACvD,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,kBAAkB,QAAqB,cAAc;AAC9D,SAASC,UAAU,EAAEC,aAAa,QAAQ,cAAc;AACxD,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,cAAc,QAAQ,+BAA+B;AAC9D,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,cAAc,QAAQ,+BAA+B;AAC9D,SAASC,cAAc,QAAQ,+BAA+B;AAC9D,SAASC,cAAc,QAAQ,+BAA+B;AAC9D,SAASC,aAAa,QAAQ,eAAe;AAE7C,OAAO,MAAMC,gBAAgB;IAC3B;IACA;IACA;IACA;IACA;IACA;CACD,CAAU;AACX,OAAO,MAAMC,iBAAiB;IAC5B;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAU;AACX,OAAO,MAAMC,eAAe;IAC1BC,MAAM;IACNC,OAAO;IACP,iBAAiB;IACjB,mBAAmB;IACnB,sBAAsB;IACtBC,OAAO;IACP,kBAAkB;IAClB,mBAAmB;AACrB,EAAW;AAEX,OAAO,MAAMC,cAAc;IACzBC,kBAAkB;IAClBC,UAAU;IACVC,QAAQ;QACNC,SAASR;QACTS,UAAU;YAAC;YAAS;YAAmB;YAAiB;SAAkB;QAC1EC,UAAU;YAAC;SAAO;I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O;IACT;IACAlB,MAAM1C;IACN2C,SAAS1C;IACT4D,OAAO5C;IACPiB,QAAQnC;IACR+D,SAASpD;IACTqD,SAASvB;IACTwB,SAAS;QAACvE;QAAaG;QAAaF;QAAeG;QAAeL;QAAeG;KAAgB;IACjGsE,UAAU;QACR9D;QACAC;QACAE;QACAD;QACAE;QACAE;QACAD;KACD;AACH,GAAG","file":"index.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frogbotai/piece-linear",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "Linear tools for FrogBot.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Colby Gilbert",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"zod": "^4.3.6"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"frogbot": "0.
|
|
32
|
+
"frogbot": "0.32.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"typescript": "5.6.2",
|
|
36
|
-
"frogbot": "0.
|
|
36
|
+
"frogbot": "0.32.0"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|