@superdurable/connector-linear 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +16 -2
- package/dex-connector.json +257 -0
- package/dist/chunk-E64K42A5.js +563 -0
- package/dist/connection-CCTEpuH6.d.ts +756 -0
- package/dist/index.d.ts +437 -0
- package/dist/index.js +1261 -0
- package/dist/mock.d.ts +203 -0
- package/dist/mock.js +515 -0
- package/package.json +61 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Super Durable
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Linear TypeScript connector
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@superdurable/connector-linear` provides the seven Linear GraphQL operations declared in `connector.yaml` for Dex TypeScript Flows: `searchIssues`, `getIssue`, `createIssue`, `updateIssue`, `addComment`, `findUserByEmail`, and `listWorkflowStates`. The signed `issueEventReceived` webhook Trigger remains Go only.
|
|
4
|
+
|
|
5
|
+
Install with `npm install @superdurable/connector-linear@0.1.0`. The package requires `@superdurable/connectors-sdk@0.5.0` and Node.js 22 or 24. Generated models, Step factories, mock outcomes, OAuth refresh declarations, and credential decoders are under `src/generated/`; edit the manifest or Go source and rerun `connectorctl generate` instead of editing those files.
|
|
6
|
+
|
|
7
|
+
## Connection and example
|
|
8
|
+
|
|
9
|
+
Create a Linear personal API key at <https://linear.app/settings/account/security> under **Personal API keys > New API key**, or configure a Linear OAuth application at <https://linear.app/settings/api/applications/new>. In Dex Web **Connections**, follow the manifest's authorization guide, select the static connection name `linear-issue-search`, and leave the optional configuration fields blank for their displayed defaults. OAuth refresh, rotating refresh token storage, and reauthorization use the generated manifest refresh declaration. The personal key is sent as a raw `Authorization` header; OAuth uses `Bearer`.
|
|
10
|
+
|
|
11
|
+
The runnable [issue search example](examples/issue-search/README.md) opens `newProjectConnection(project, ConnectionName)` in [main.ts](examples/issue-search/main.ts), binds `newSearchIssuesStep`, persists the page, and completes. Only its happy `searched` branch is wired. Other optional branches fail the Flow. The same package exports typed factories and `newConnection` for applications that supply a client directly.
|
|
12
|
+
|
|
13
|
+
## Provider and retry behavior
|
|
14
|
+
|
|
15
|
+
Queries use bounded named GraphQL documents and classify HTTP 429 or 5xx as Retry. Writes use the Dex Call ID to derive stable client UUIDs for creates and comments; updates set absolute values. Create and comment operations read back by those IDs after an ambiguous answer. A conclusive provider rejection chooses its optional branch. Credentials, provider response text, and OAuth refresh tokens never enter Flow state or receipts.
|
|
16
|
+
|
|
17
|
+
Run `npm ci && npm run check` for the TypeScript package, then `make test-connector-conformance CONNECTOR_DIRECTORY=connectors/linear` from the repository root for Go-recorded provider replay. For the real Dex integration test, start `dexcli dev` and set `DEX_FLOW_SERVICE_ADDRESS` before `npm run test:integration`. The provider stand-in listens on an OS-assigned port. Live Linear workspace authorization, issue writes, token refresh, and webhook delivery have not been verified by this TypeScript package.
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
{
|
|
2
|
+
"connectorId": "linear",
|
|
3
|
+
"releaseTag": "connectors/linear/go/v0.24.0",
|
|
4
|
+
"package": {
|
|
5
|
+
"ecosystem": "npm",
|
|
6
|
+
"name": "@superdurable/connector-linear",
|
|
7
|
+
"version": "0.1.0"
|
|
8
|
+
},
|
|
9
|
+
"factories": [
|
|
10
|
+
{
|
|
11
|
+
"name": "newSearchIssuesStep",
|
|
12
|
+
"kind": "query",
|
|
13
|
+
"operationId": "searchIssues",
|
|
14
|
+
"fields": {
|
|
15
|
+
"stepType": "stepType",
|
|
16
|
+
"annotations": "annotations",
|
|
17
|
+
"connectionName": "connectionName",
|
|
18
|
+
"resultAttribute": "resultAttribute"
|
|
19
|
+
},
|
|
20
|
+
"branches": [
|
|
21
|
+
{
|
|
22
|
+
"id": "searched",
|
|
23
|
+
"field": "searched",
|
|
24
|
+
"optional": false
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "providerRejected",
|
|
28
|
+
"field": "providerRejected",
|
|
29
|
+
"optional": true
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "invalidResponse",
|
|
33
|
+
"field": "invalidResponse",
|
|
34
|
+
"optional": true
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "defect",
|
|
38
|
+
"field": "defect",
|
|
39
|
+
"optional": true
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "newGetIssueStep",
|
|
45
|
+
"kind": "query",
|
|
46
|
+
"operationId": "getIssue",
|
|
47
|
+
"fields": {
|
|
48
|
+
"stepType": "stepType",
|
|
49
|
+
"annotations": "annotations",
|
|
50
|
+
"connectionName": "connectionName",
|
|
51
|
+
"resultAttribute": "resultAttribute"
|
|
52
|
+
},
|
|
53
|
+
"branches": [
|
|
54
|
+
{
|
|
55
|
+
"id": "found",
|
|
56
|
+
"field": "found",
|
|
57
|
+
"optional": false
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "notFound",
|
|
61
|
+
"field": "notFound",
|
|
62
|
+
"optional": true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "providerRejected",
|
|
66
|
+
"field": "providerRejected",
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "invalidResponse",
|
|
71
|
+
"field": "invalidResponse",
|
|
72
|
+
"optional": true
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "defect",
|
|
76
|
+
"field": "defect",
|
|
77
|
+
"optional": true
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "newCreateIssueStep",
|
|
83
|
+
"kind": "mutation",
|
|
84
|
+
"operationId": "createIssue",
|
|
85
|
+
"fields": {
|
|
86
|
+
"stepType": "stepType",
|
|
87
|
+
"annotations": "annotations",
|
|
88
|
+
"connectionName": "connectionName",
|
|
89
|
+
"resultAttribute": "resultAttribute"
|
|
90
|
+
},
|
|
91
|
+
"branches": [
|
|
92
|
+
{
|
|
93
|
+
"id": "created",
|
|
94
|
+
"field": "created",
|
|
95
|
+
"optional": false
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "providerRejected",
|
|
99
|
+
"field": "providerRejected",
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "defect",
|
|
104
|
+
"field": "defect",
|
|
105
|
+
"optional": true
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "newUpdateIssueStep",
|
|
111
|
+
"kind": "mutation",
|
|
112
|
+
"operationId": "updateIssue",
|
|
113
|
+
"fields": {
|
|
114
|
+
"stepType": "stepType",
|
|
115
|
+
"annotations": "annotations",
|
|
116
|
+
"connectionName": "connectionName",
|
|
117
|
+
"resultAttribute": "resultAttribute"
|
|
118
|
+
},
|
|
119
|
+
"branches": [
|
|
120
|
+
{
|
|
121
|
+
"id": "updated",
|
|
122
|
+
"field": "updated",
|
|
123
|
+
"optional": false
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"id": "notFound",
|
|
127
|
+
"field": "notFound",
|
|
128
|
+
"optional": true
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "providerRejected",
|
|
132
|
+
"field": "providerRejected",
|
|
133
|
+
"optional": true
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id": "invalidResponse",
|
|
137
|
+
"field": "invalidResponse",
|
|
138
|
+
"optional": true
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"id": "defect",
|
|
142
|
+
"field": "defect",
|
|
143
|
+
"optional": true
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "newAddCommentStep",
|
|
149
|
+
"kind": "mutation",
|
|
150
|
+
"operationId": "addComment",
|
|
151
|
+
"fields": {
|
|
152
|
+
"stepType": "stepType",
|
|
153
|
+
"annotations": "annotations",
|
|
154
|
+
"connectionName": "connectionName",
|
|
155
|
+
"resultAttribute": "resultAttribute"
|
|
156
|
+
},
|
|
157
|
+
"branches": [
|
|
158
|
+
{
|
|
159
|
+
"id": "added",
|
|
160
|
+
"field": "added",
|
|
161
|
+
"optional": false
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"id": "notFound",
|
|
165
|
+
"field": "notFound",
|
|
166
|
+
"optional": true
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"id": "providerRejected",
|
|
170
|
+
"field": "providerRejected",
|
|
171
|
+
"optional": true
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"id": "defect",
|
|
175
|
+
"field": "defect",
|
|
176
|
+
"optional": true
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"name": "newFindUserByEmailStep",
|
|
182
|
+
"kind": "query",
|
|
183
|
+
"operationId": "findUserByEmail",
|
|
184
|
+
"fields": {
|
|
185
|
+
"stepType": "stepType",
|
|
186
|
+
"annotations": "annotations",
|
|
187
|
+
"connectionName": "connectionName",
|
|
188
|
+
"resultAttribute": "resultAttribute"
|
|
189
|
+
},
|
|
190
|
+
"branches": [
|
|
191
|
+
{
|
|
192
|
+
"id": "found",
|
|
193
|
+
"field": "found",
|
|
194
|
+
"optional": false
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"id": "notFound",
|
|
198
|
+
"field": "notFound",
|
|
199
|
+
"optional": true
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"id": "providerRejected",
|
|
203
|
+
"field": "providerRejected",
|
|
204
|
+
"optional": true
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"id": "invalidResponse",
|
|
208
|
+
"field": "invalidResponse",
|
|
209
|
+
"optional": true
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"id": "defect",
|
|
213
|
+
"field": "defect",
|
|
214
|
+
"optional": true
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "newListWorkflowStatesStep",
|
|
220
|
+
"kind": "query",
|
|
221
|
+
"operationId": "listWorkflowStates",
|
|
222
|
+
"fields": {
|
|
223
|
+
"stepType": "stepType",
|
|
224
|
+
"annotations": "annotations",
|
|
225
|
+
"connectionName": "connectionName",
|
|
226
|
+
"resultAttribute": "resultAttribute"
|
|
227
|
+
},
|
|
228
|
+
"branches": [
|
|
229
|
+
{
|
|
230
|
+
"id": "listed",
|
|
231
|
+
"field": "listed",
|
|
232
|
+
"optional": false
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"id": "notFound",
|
|
236
|
+
"field": "notFound",
|
|
237
|
+
"optional": true
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"id": "providerRejected",
|
|
241
|
+
"field": "providerRejected",
|
|
242
|
+
"optional": true
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"id": "invalidResponse",
|
|
246
|
+
"field": "invalidResponse",
|
|
247
|
+
"optional": true
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"id": "defect",
|
|
251
|
+
"field": "defect",
|
|
252
|
+
"optional": true
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
}
|