@superdurable/connector-linear 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +16 -2
- package/dex-connector.json +574 -0
- package/dist/chunk-SYZELIEF.js +579 -0
- package/dist/connection-DOHnQID8.d.ts +762 -0
- package/dist/index.d.ts +437 -0
- package/dist/index.js +1275 -0
- package/dist/mock.d.ts +203 -0
- package/dist/mock.js +515 -0
- package/package.json +62 -4
package/dist/mock.js
ADDED
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AddCommentDefinition,
|
|
3
|
+
AddCommentInputSchema,
|
|
4
|
+
AddCommentOutputSchema,
|
|
5
|
+
ConnectorID,
|
|
6
|
+
CreateIssueDefinition,
|
|
7
|
+
CreateIssueInputSchema,
|
|
8
|
+
CreateIssueOutputSchema,
|
|
9
|
+
CycleReferenceSchema,
|
|
10
|
+
FindUserByEmailDefinition,
|
|
11
|
+
FindUserByEmailInputSchema,
|
|
12
|
+
GetIssueDefinition,
|
|
13
|
+
GetIssueInputSchema,
|
|
14
|
+
IssueLabelSchema,
|
|
15
|
+
IssueReferenceSchema,
|
|
16
|
+
IssueSchema,
|
|
17
|
+
IssueSearchFilterSchema,
|
|
18
|
+
IssueSummarySchema,
|
|
19
|
+
ListWorkflowStatesDefinition,
|
|
20
|
+
ListWorkflowStatesInputSchema,
|
|
21
|
+
ListWorkflowStatesOutputSchema,
|
|
22
|
+
ProjectReferenceSchema,
|
|
23
|
+
ProviderID,
|
|
24
|
+
SearchIssuesDefinition,
|
|
25
|
+
SearchIssuesInputSchema,
|
|
26
|
+
SearchIssuesOutputSchema,
|
|
27
|
+
TeamReferenceSchema,
|
|
28
|
+
UpdateIssueDefinition,
|
|
29
|
+
UpdateIssueInputSchema,
|
|
30
|
+
UpdateIssueOutputSchema,
|
|
31
|
+
UserReferenceSchema,
|
|
32
|
+
UserSchema,
|
|
33
|
+
WorkflowStateReferenceSchema,
|
|
34
|
+
WorkflowStateSchema,
|
|
35
|
+
newConnectionWithOperations
|
|
36
|
+
} from "./chunk-SYZELIEF.js";
|
|
37
|
+
|
|
38
|
+
// src/generated/mock.ts
|
|
39
|
+
import { branchCase, retryCase, newMutation, newQuery } from "@superdurable/connectors-sdk/connectormock";
|
|
40
|
+
var emptyIssueSearchFilter = IssueSearchFilterSchema.parse({});
|
|
41
|
+
var emptySearchIssuesInput = SearchIssuesInputSchema.parse({
|
|
42
|
+
"filter": emptyIssueSearchFilter
|
|
43
|
+
});
|
|
44
|
+
var emptyTeamReference = TeamReferenceSchema.parse({
|
|
45
|
+
"id": "",
|
|
46
|
+
"key": "",
|
|
47
|
+
"name": ""
|
|
48
|
+
});
|
|
49
|
+
var emptyWorkflowStateReference = WorkflowStateReferenceSchema.parse({
|
|
50
|
+
"id": "",
|
|
51
|
+
"name": "",
|
|
52
|
+
"type": ""
|
|
53
|
+
});
|
|
54
|
+
var emptyIssueSummary = IssueSummarySchema.parse({
|
|
55
|
+
"id": "",
|
|
56
|
+
"identifier": "",
|
|
57
|
+
"title": "",
|
|
58
|
+
"url": "",
|
|
59
|
+
"team": emptyTeamReference,
|
|
60
|
+
"state": emptyWorkflowStateReference,
|
|
61
|
+
"priority": 0,
|
|
62
|
+
"createdAt": "0001-01-01T00:00:00Z",
|
|
63
|
+
"updatedAt": "0001-01-01T00:00:00Z"
|
|
64
|
+
});
|
|
65
|
+
var emptySearchIssuesOutput = SearchIssuesOutputSchema.parse({
|
|
66
|
+
"issues": []
|
|
67
|
+
});
|
|
68
|
+
var emptyGetIssueInput = GetIssueInputSchema.parse({
|
|
69
|
+
"issueId": ""
|
|
70
|
+
});
|
|
71
|
+
var emptyUserReference = UserReferenceSchema.parse({
|
|
72
|
+
"id": ""
|
|
73
|
+
});
|
|
74
|
+
var emptyIssueLabel = IssueLabelSchema.parse({
|
|
75
|
+
"id": "",
|
|
76
|
+
"name": ""
|
|
77
|
+
});
|
|
78
|
+
var emptyProjectReference = ProjectReferenceSchema.parse({
|
|
79
|
+
"id": "",
|
|
80
|
+
"name": ""
|
|
81
|
+
});
|
|
82
|
+
var emptyCycleReference = CycleReferenceSchema.parse({
|
|
83
|
+
"id": "",
|
|
84
|
+
"number": 0
|
|
85
|
+
});
|
|
86
|
+
var emptyIssueReference = IssueReferenceSchema.parse({
|
|
87
|
+
"id": "",
|
|
88
|
+
"identifier": ""
|
|
89
|
+
});
|
|
90
|
+
var emptyIssue = IssueSchema.parse({
|
|
91
|
+
"id": "",
|
|
92
|
+
"identifier": "",
|
|
93
|
+
"title": "",
|
|
94
|
+
"url": "",
|
|
95
|
+
"team": emptyTeamReference,
|
|
96
|
+
"state": emptyWorkflowStateReference,
|
|
97
|
+
"priority": 0,
|
|
98
|
+
"createdAt": "0001-01-01T00:00:00Z",
|
|
99
|
+
"updatedAt": "0001-01-01T00:00:00Z",
|
|
100
|
+
"number": 0
|
|
101
|
+
});
|
|
102
|
+
var emptyCreateIssueInput = CreateIssueInputSchema.parse({
|
|
103
|
+
"teamId": "",
|
|
104
|
+
"title": ""
|
|
105
|
+
});
|
|
106
|
+
var emptyCreateIssueOutput = CreateIssueOutputSchema.parse({
|
|
107
|
+
"teamId": "",
|
|
108
|
+
"title": ""
|
|
109
|
+
});
|
|
110
|
+
var emptyUpdateIssueInput = UpdateIssueInputSchema.parse({
|
|
111
|
+
"issueId": ""
|
|
112
|
+
});
|
|
113
|
+
var emptyUpdateIssueOutput = UpdateIssueOutputSchema.parse({
|
|
114
|
+
"issueId": ""
|
|
115
|
+
});
|
|
116
|
+
var emptyAddCommentInput = AddCommentInputSchema.parse({
|
|
117
|
+
"issueId": "",
|
|
118
|
+
"body": ""
|
|
119
|
+
});
|
|
120
|
+
var emptyAddCommentOutput = AddCommentOutputSchema.parse({
|
|
121
|
+
"issueId": ""
|
|
122
|
+
});
|
|
123
|
+
var emptyFindUserByEmailInput = FindUserByEmailInputSchema.parse({
|
|
124
|
+
"email": ""
|
|
125
|
+
});
|
|
126
|
+
var emptyUser = UserSchema.parse({
|
|
127
|
+
"id": "",
|
|
128
|
+
"name": "",
|
|
129
|
+
"displayName": "",
|
|
130
|
+
"email": "",
|
|
131
|
+
"active": false
|
|
132
|
+
});
|
|
133
|
+
var emptyListWorkflowStatesInput = ListWorkflowStatesInputSchema.parse({
|
|
134
|
+
"teamId": ""
|
|
135
|
+
});
|
|
136
|
+
var emptyWorkflowState = WorkflowStateSchema.parse({
|
|
137
|
+
"id": "",
|
|
138
|
+
"name": "",
|
|
139
|
+
"type": "",
|
|
140
|
+
"position": 0
|
|
141
|
+
});
|
|
142
|
+
var emptyListWorkflowStatesOutput = ListWorkflowStatesOutputSchema.parse({
|
|
143
|
+
"teamId": "",
|
|
144
|
+
"states": []
|
|
145
|
+
});
|
|
146
|
+
function searchIssuesSearched(value, failure) {
|
|
147
|
+
return branchCase("searched", value, failure);
|
|
148
|
+
}
|
|
149
|
+
function searchIssuesProviderRejected(value, failure) {
|
|
150
|
+
return branchCase("providerRejected", value, failure);
|
|
151
|
+
}
|
|
152
|
+
function searchIssuesInvalidResponse(value, failure) {
|
|
153
|
+
return branchCase("invalidResponse", value, failure);
|
|
154
|
+
}
|
|
155
|
+
function searchIssuesDefect(value, failure) {
|
|
156
|
+
return branchCase("defect", value, failure);
|
|
157
|
+
}
|
|
158
|
+
function searchIssuesRetry(failure, retryAfterMs = 0) {
|
|
159
|
+
return retryCase(failure, retryAfterMs);
|
|
160
|
+
}
|
|
161
|
+
function searchIssuesEngineeringIssues() {
|
|
162
|
+
const value = emptySearchIssuesOutput;
|
|
163
|
+
return branchCase("searched", value);
|
|
164
|
+
}
|
|
165
|
+
function searchIssuesDefault() {
|
|
166
|
+
return searchIssuesEngineeringIssues();
|
|
167
|
+
}
|
|
168
|
+
function searchIssuesNoOpenFireDrillIssue() {
|
|
169
|
+
const value = SearchIssuesOutputSchema.parse({ "issues": [] });
|
|
170
|
+
return branchCase("searched", value);
|
|
171
|
+
}
|
|
172
|
+
function searchIssuesInvalidIssueCursor() {
|
|
173
|
+
const value = emptySearchIssuesOutput;
|
|
174
|
+
return branchCase("providerRejected", value, { kind: "VALIDATION", provider: ConnectorID, operation: "searchIssues", message: "Linear rejected the search cursor." });
|
|
175
|
+
}
|
|
176
|
+
function getIssueFound(value, failure) {
|
|
177
|
+
return branchCase("found", value, failure);
|
|
178
|
+
}
|
|
179
|
+
function getIssueNotFound(value, failure) {
|
|
180
|
+
return branchCase("notFound", value, failure);
|
|
181
|
+
}
|
|
182
|
+
function getIssueProviderRejected(value, failure) {
|
|
183
|
+
return branchCase("providerRejected", value, failure);
|
|
184
|
+
}
|
|
185
|
+
function getIssueInvalidResponse(value, failure) {
|
|
186
|
+
return branchCase("invalidResponse", value, failure);
|
|
187
|
+
}
|
|
188
|
+
function getIssueDefect(value, failure) {
|
|
189
|
+
return branchCase("defect", value, failure);
|
|
190
|
+
}
|
|
191
|
+
function getIssueRetry(failure, retryAfterMs = 0) {
|
|
192
|
+
return retryCase(failure, retryAfterMs);
|
|
193
|
+
}
|
|
194
|
+
function getIssueMovedFireDrillIssue() {
|
|
195
|
+
const value = IssueSchema.parse({ "assigneeId": "7c3d4e5f-6a7b-4c8d-ae9f-1a2b3c4d5e6f", "createdAt": "2026-10-26T09:00:00Z", "description": "Check every panel on **all** floors.", "id": "44444444-4444-4444-8444-444444444444", "identifier": "ENG-210", "number": 210, "priority": 0, "state": { "id": "33333333-3333-4333-8333-333333333333", "name": "In Progress", "type": "started" }, "team": { "id": "2f6b7c1e-3d4a-4b5c-8d6e-7f8091a2b3c4", "key": "ENG", "name": "Engineering" }, "title": "Monthly Fire Drill Checklist - February", "updatedAt": "2026-10-26T09:10:00Z", "url": "https://linear.app/contoso/issue/ENG-210/monthly-fire-drill-checklist-february" });
|
|
196
|
+
return branchCase("found", value);
|
|
197
|
+
}
|
|
198
|
+
function getIssueDefault() {
|
|
199
|
+
return getIssueMovedFireDrillIssue();
|
|
200
|
+
}
|
|
201
|
+
function getIssueIssueMissing() {
|
|
202
|
+
const value = emptyIssue;
|
|
203
|
+
return branchCase("notFound", value, { kind: "NOT_FOUND", provider: ConnectorID, operation: "getIssue", message: "Linear has no issue with this ID that the connection can see." });
|
|
204
|
+
}
|
|
205
|
+
function getIssueIssueNotVisible() {
|
|
206
|
+
const value = emptyIssue;
|
|
207
|
+
return branchCase("notFound", value, { kind: "NOT_FOUND", provider: ConnectorID, operation: "getIssue", message: "Linear has no issue with this ID that the connection can see." });
|
|
208
|
+
}
|
|
209
|
+
function getIssueIssueReadKeyRevoked() {
|
|
210
|
+
const value = emptyIssue;
|
|
211
|
+
return branchCase("providerRejected", value, { kind: "AUTHENTICATION", provider: ConnectorID, operation: "getIssue", message: "Linear rejected the credential (HTTP 401)" });
|
|
212
|
+
}
|
|
213
|
+
function createIssueCreated(value, failure) {
|
|
214
|
+
return branchCase("created", value, failure);
|
|
215
|
+
}
|
|
216
|
+
function createIssueProviderRejected(value, failure) {
|
|
217
|
+
return branchCase("providerRejected", value, failure);
|
|
218
|
+
}
|
|
219
|
+
function createIssueDefect(value, failure) {
|
|
220
|
+
return branchCase("defect", value, failure);
|
|
221
|
+
}
|
|
222
|
+
function createIssueRetry(failure, retryAfterMs = 0) {
|
|
223
|
+
return retryCase(failure, retryAfterMs);
|
|
224
|
+
}
|
|
225
|
+
function createIssueCreatedFireDrillIssue() {
|
|
226
|
+
const value = CreateIssueOutputSchema.parse({ "issue": { "assigneeId": "7c3d4e5f-6a7b-4c8d-ae9f-1a2b3c4d5e6f", "createdAt": "2026-10-26T09:00:00Z", "id": "44444444-4444-4444-8444-444444444444", "identifier": "ENG-210", "priority": 0, "state": { "id": "22222222-2222-4222-8222-222222222222", "name": "Todo", "type": "unstarted" }, "team": { "id": "2f6b7c1e-3d4a-4b5c-8d6e-7f8091a2b3c4", "key": "ENG", "name": "Engineering" }, "title": "Monthly Fire Drill Checklist - February", "updatedAt": "2026-10-26T09:00:00Z", "url": "https://linear.app/contoso/issue/ENG-210/monthly-fire-drill-checklist-february" }, "issueId": "44444444-4444-4444-8444-444444444444", "teamId": "2f6b7c1e-3d4a-4b5c-8d6e-7f8091a2b3c4", "title": "Monthly Fire Drill Checklist - February" });
|
|
227
|
+
return branchCase("created", value);
|
|
228
|
+
}
|
|
229
|
+
function createIssueDefault() {
|
|
230
|
+
return createIssueCreatedFireDrillIssue();
|
|
231
|
+
}
|
|
232
|
+
function createIssueUnknownTeamRejectsCreate() {
|
|
233
|
+
const value = CreateIssueOutputSchema.parse({ "teamId": "00000000-0000-4000-8000-000000000000", "title": "Monthly Fire Drill Checklist - February" });
|
|
234
|
+
return branchCase("providerRejected", value, { kind: "VALIDATION", provider: ConnectorID, operation: "createIssue", message: "Linear rejected the unknown team." });
|
|
235
|
+
}
|
|
236
|
+
function updateIssueUpdated(value, failure) {
|
|
237
|
+
return branchCase("updated", value, failure);
|
|
238
|
+
}
|
|
239
|
+
function updateIssueNotFound(value, failure) {
|
|
240
|
+
return branchCase("notFound", value, failure);
|
|
241
|
+
}
|
|
242
|
+
function updateIssueProviderRejected(value, failure) {
|
|
243
|
+
return branchCase("providerRejected", value, failure);
|
|
244
|
+
}
|
|
245
|
+
function updateIssueInvalidResponse(value, failure) {
|
|
246
|
+
return branchCase("invalidResponse", value, failure);
|
|
247
|
+
}
|
|
248
|
+
function updateIssueDefect(value, failure) {
|
|
249
|
+
return branchCase("defect", value, failure);
|
|
250
|
+
}
|
|
251
|
+
function updateIssueRetry(failure, retryAfterMs = 0) {
|
|
252
|
+
return retryCase(failure, retryAfterMs);
|
|
253
|
+
}
|
|
254
|
+
function updateIssueMovedFireDrillToProgress() {
|
|
255
|
+
const value = UpdateIssueOutputSchema.parse({ "issue": { "assigneeId": "7c3d4e5f-6a7b-4c8d-ae9f-1a2b3c4d5e6f", "createdAt": "2026-10-26T09:00:00Z", "id": "44444444-4444-4444-8444-444444444444", "identifier": "ENG-210", "priority": 0, "state": { "id": "33333333-3333-4333-8333-333333333333", "name": "In Progress", "type": "started" }, "team": { "id": "2f6b7c1e-3d4a-4b5c-8d6e-7f8091a2b3c4", "key": "ENG", "name": "Engineering" }, "title": "Monthly Fire Drill Checklist - February", "updatedAt": "2026-10-26T09:10:00Z", "url": "https://linear.app/contoso/issue/ENG-210/monthly-fire-drill-checklist-february" }, "issueId": "44444444-4444-4444-8444-444444444444" });
|
|
256
|
+
return branchCase("updated", value);
|
|
257
|
+
}
|
|
258
|
+
function updateIssueDefault() {
|
|
259
|
+
return updateIssueMovedFireDrillToProgress();
|
|
260
|
+
}
|
|
261
|
+
function updateIssueUpdateMissingIssue() {
|
|
262
|
+
const value = UpdateIssueOutputSchema.parse({ "issueId": "ENG-999" });
|
|
263
|
+
return branchCase("notFound", value, { kind: "NOT_FOUND", provider: ConnectorID, operation: "updateIssue", message: "Linear has no issue with this ID that the connection can see." });
|
|
264
|
+
}
|
|
265
|
+
function updateIssueStateFromAnotherTeam() {
|
|
266
|
+
const value = emptyUpdateIssueOutput;
|
|
267
|
+
return branchCase("providerRejected", value, { kind: "VALIDATION", provider: ConnectorID, operation: "updateIssue", message: "Linear rejected the workflow state of another team." });
|
|
268
|
+
}
|
|
269
|
+
function addCommentAdded(value, failure) {
|
|
270
|
+
return branchCase("added", value, failure);
|
|
271
|
+
}
|
|
272
|
+
function addCommentNotFound(value, failure) {
|
|
273
|
+
return branchCase("notFound", value, failure);
|
|
274
|
+
}
|
|
275
|
+
function addCommentProviderRejected(value, failure) {
|
|
276
|
+
return branchCase("providerRejected", value, failure);
|
|
277
|
+
}
|
|
278
|
+
function addCommentDefect(value, failure) {
|
|
279
|
+
return branchCase("defect", value, failure);
|
|
280
|
+
}
|
|
281
|
+
function addCommentRetry(failure, retryAfterMs = 0) {
|
|
282
|
+
return retryCase(failure, retryAfterMs);
|
|
283
|
+
}
|
|
284
|
+
function addCommentCommentedFireDrill() {
|
|
285
|
+
const value = AddCommentOutputSchema.parse({ "commentId": "55555555-5555-4555-8555-555555555555", "createdAt": "2026-10-26T09:11:00Z", "issueId": "44444444-4444-4444-8444-444444444444", "url": "https://linear.app/contoso/issue/ENG-210/monthly-fire-drill-checklist-february#comment-55555555" });
|
|
286
|
+
return branchCase("added", value);
|
|
287
|
+
}
|
|
288
|
+
function addCommentDefault() {
|
|
289
|
+
return addCommentCommentedFireDrill();
|
|
290
|
+
}
|
|
291
|
+
function addCommentCommentIssueMissing() {
|
|
292
|
+
const value = AddCommentOutputSchema.parse({ "issueId": "ENG-999" });
|
|
293
|
+
return branchCase("notFound", value, { kind: "NOT_FOUND", provider: ConnectorID, operation: "addComment", message: "Linear has no issue with this ID that the connection can see." });
|
|
294
|
+
}
|
|
295
|
+
function addCommentCommentForbidden() {
|
|
296
|
+
const value = emptyAddCommentOutput;
|
|
297
|
+
return branchCase("providerRejected", value, { kind: "AUTHORIZATION", provider: ConnectorID, operation: "addComment", message: "Linear denied permission to comment." });
|
|
298
|
+
}
|
|
299
|
+
function findUserByEmailFound(value, failure) {
|
|
300
|
+
return branchCase("found", value, failure);
|
|
301
|
+
}
|
|
302
|
+
function findUserByEmailNotFound(value, failure) {
|
|
303
|
+
return branchCase("notFound", value, failure);
|
|
304
|
+
}
|
|
305
|
+
function findUserByEmailProviderRejected(value, failure) {
|
|
306
|
+
return branchCase("providerRejected", value, failure);
|
|
307
|
+
}
|
|
308
|
+
function findUserByEmailInvalidResponse(value, failure) {
|
|
309
|
+
return branchCase("invalidResponse", value, failure);
|
|
310
|
+
}
|
|
311
|
+
function findUserByEmailDefect(value, failure) {
|
|
312
|
+
return branchCase("defect", value, failure);
|
|
313
|
+
}
|
|
314
|
+
function findUserByEmailRetry(failure, retryAfterMs = 0) {
|
|
315
|
+
return retryCase(failure, retryAfterMs);
|
|
316
|
+
}
|
|
317
|
+
function findUserByEmailAliceAssignee() {
|
|
318
|
+
const value = UserSchema.parse({ "active": true, "displayName": "alice", "email": "alice@example.com", "id": "7c3d4e5f-6a7b-4c8d-ae9f-1a2b3c4d5e6f", "name": "Alice Nguyen", "url": "https://linear.app/contoso/profiles/alice" });
|
|
319
|
+
return branchCase("found", value);
|
|
320
|
+
}
|
|
321
|
+
function findUserByEmailDefault() {
|
|
322
|
+
return findUserByEmailAliceAssignee();
|
|
323
|
+
}
|
|
324
|
+
function findUserByEmailAssigneeMissing() {
|
|
325
|
+
const value = emptyUser;
|
|
326
|
+
return branchCase("notFound", value, { kind: "NOT_FOUND", provider: ConnectorID, operation: "findUserByEmail", message: "Linear has no active user with that email." });
|
|
327
|
+
}
|
|
328
|
+
function findUserByEmailAssigneeLookupForbidden() {
|
|
329
|
+
const value = emptyUser;
|
|
330
|
+
return branchCase("providerRejected", value, { kind: "AUTHORIZATION", provider: ConnectorID, operation: "findUserByEmail", message: "Linear denied permission to find users." });
|
|
331
|
+
}
|
|
332
|
+
function listWorkflowStatesListed(value, failure) {
|
|
333
|
+
return branchCase("listed", value, failure);
|
|
334
|
+
}
|
|
335
|
+
function listWorkflowStatesNotFound(value, failure) {
|
|
336
|
+
return branchCase("notFound", value, failure);
|
|
337
|
+
}
|
|
338
|
+
function listWorkflowStatesProviderRejected(value, failure) {
|
|
339
|
+
return branchCase("providerRejected", value, failure);
|
|
340
|
+
}
|
|
341
|
+
function listWorkflowStatesInvalidResponse(value, failure) {
|
|
342
|
+
return branchCase("invalidResponse", value, failure);
|
|
343
|
+
}
|
|
344
|
+
function listWorkflowStatesDefect(value, failure) {
|
|
345
|
+
return branchCase("defect", value, failure);
|
|
346
|
+
}
|
|
347
|
+
function listWorkflowStatesRetry(failure, retryAfterMs = 0) {
|
|
348
|
+
return retryCase(failure, retryAfterMs);
|
|
349
|
+
}
|
|
350
|
+
function listWorkflowStatesEngineeringStates() {
|
|
351
|
+
const value = ListWorkflowStatesOutputSchema.parse({ "states": [{ "color": "#bec2c8", "id": "11111111-1111-4111-8111-111111111111", "name": "Backlog", "position": 0, "type": "backlog" }, { "color": "#e2e2e2", "id": "22222222-2222-4222-8222-222222222222", "name": "Todo", "position": 0, "type": "unstarted" }, { "color": "#f2c94c", "id": "33333333-3333-4333-8333-333333333333", "name": "In Progress", "position": 0, "type": "started" }, { "color": "#5e6ad2", "id": "99999999-9999-4999-8999-999999999999", "name": "Done", "position": 0, "type": "completed" }], "teamId": "2f6b7c1e-3d4a-4b5c-8d6e-7f8091a2b3c4" });
|
|
352
|
+
return branchCase("listed", value);
|
|
353
|
+
}
|
|
354
|
+
function listWorkflowStatesDefault() {
|
|
355
|
+
return listWorkflowStatesEngineeringStates();
|
|
356
|
+
}
|
|
357
|
+
function listWorkflowStatesTeamMissing() {
|
|
358
|
+
const value = ListWorkflowStatesOutputSchema.parse({ "states": [], "teamId": "00000000-0000-4000-8000-000000000000" });
|
|
359
|
+
return branchCase("notFound", value, { kind: "NOT_FOUND", provider: ConnectorID, operation: "listWorkflowStates", message: "Linear has no team with this ID that the connection can see." });
|
|
360
|
+
}
|
|
361
|
+
function listWorkflowStatesTeamStatesNotVisible() {
|
|
362
|
+
const value = ListWorkflowStatesOutputSchema.parse({ "states": [], "teamId": "2f6b7c1e-3d4a-4b5c-8d6e-7f8091a2b3c4" });
|
|
363
|
+
return branchCase("notFound", value, { kind: "NOT_FOUND", provider: ConnectorID, operation: "listWorkflowStates", message: "Linear has no team with this ID that the connection can see." });
|
|
364
|
+
}
|
|
365
|
+
function listWorkflowStatesTeamStatesKeyRevoked() {
|
|
366
|
+
const value = ListWorkflowStatesOutputSchema.parse({ "states": [], "teamId": "2f6b7c1e-3d4a-4b5c-8d6e-7f8091a2b3c4" });
|
|
367
|
+
return branchCase("providerRejected", value, { kind: "AUTHENTICATION", provider: ConnectorID, operation: "listWorkflowStates", message: "Linear rejected the credential (HTTP 401)" });
|
|
368
|
+
}
|
|
369
|
+
var GeneratedMock = class {
|
|
370
|
+
#searchIssues;
|
|
371
|
+
#getIssue;
|
|
372
|
+
#createIssue;
|
|
373
|
+
#updateIssue;
|
|
374
|
+
#addComment;
|
|
375
|
+
#findUserByEmail;
|
|
376
|
+
#listWorkflowStates;
|
|
377
|
+
#connection;
|
|
378
|
+
constructor(connectionName) {
|
|
379
|
+
this.#searchIssues = newQuery(SearchIssuesDefinition).default(searchIssuesDefault());
|
|
380
|
+
this.#getIssue = newQuery(GetIssueDefinition).default(getIssueDefault());
|
|
381
|
+
this.#createIssue = newMutation(CreateIssueDefinition).default(createIssueDefault());
|
|
382
|
+
this.#updateIssue = newMutation(UpdateIssueDefinition).default(updateIssueDefault());
|
|
383
|
+
this.#addComment = newMutation(AddCommentDefinition).default(addCommentDefault());
|
|
384
|
+
this.#findUserByEmail = newQuery(FindUserByEmailDefinition).default(findUserByEmailDefault());
|
|
385
|
+
this.#listWorkflowStates = newQuery(ListWorkflowStatesDefinition).default(listWorkflowStatesDefault());
|
|
386
|
+
this.#connection = newConnectionWithOperations(this, { provider: ProviderID, name: connectionName });
|
|
387
|
+
}
|
|
388
|
+
connection() {
|
|
389
|
+
return this.#connection;
|
|
390
|
+
}
|
|
391
|
+
searchIssues() {
|
|
392
|
+
return this.#searchIssues;
|
|
393
|
+
}
|
|
394
|
+
getIssue() {
|
|
395
|
+
return this.#getIssue;
|
|
396
|
+
}
|
|
397
|
+
createIssue() {
|
|
398
|
+
return this.#createIssue;
|
|
399
|
+
}
|
|
400
|
+
updateIssue() {
|
|
401
|
+
return this.#updateIssue;
|
|
402
|
+
}
|
|
403
|
+
addComment() {
|
|
404
|
+
return this.#addComment;
|
|
405
|
+
}
|
|
406
|
+
findUserByEmail() {
|
|
407
|
+
return this.#findUserByEmail;
|
|
408
|
+
}
|
|
409
|
+
listWorkflowStates() {
|
|
410
|
+
return this.#listWorkflowStates;
|
|
411
|
+
}
|
|
412
|
+
assertNoFailures() {
|
|
413
|
+
this.#searchIssues.assertNoFailures();
|
|
414
|
+
this.#getIssue.assertNoFailures();
|
|
415
|
+
this.#createIssue.assertNoFailures();
|
|
416
|
+
this.#updateIssue.assertNoFailures();
|
|
417
|
+
this.#addComment.assertNoFailures();
|
|
418
|
+
this.#findUserByEmail.assertNoFailures();
|
|
419
|
+
this.#listWorkflowStates.assertNoFailures();
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
export {
|
|
423
|
+
GeneratedMock,
|
|
424
|
+
addCommentAdded,
|
|
425
|
+
addCommentCommentForbidden,
|
|
426
|
+
addCommentCommentIssueMissing,
|
|
427
|
+
addCommentCommentedFireDrill,
|
|
428
|
+
addCommentDefault,
|
|
429
|
+
addCommentDefect,
|
|
430
|
+
addCommentNotFound,
|
|
431
|
+
addCommentProviderRejected,
|
|
432
|
+
addCommentRetry,
|
|
433
|
+
createIssueCreated,
|
|
434
|
+
createIssueCreatedFireDrillIssue,
|
|
435
|
+
createIssueDefault,
|
|
436
|
+
createIssueDefect,
|
|
437
|
+
createIssueProviderRejected,
|
|
438
|
+
createIssueRetry,
|
|
439
|
+
createIssueUnknownTeamRejectsCreate,
|
|
440
|
+
emptyAddCommentInput,
|
|
441
|
+
emptyAddCommentOutput,
|
|
442
|
+
emptyCreateIssueInput,
|
|
443
|
+
emptyCreateIssueOutput,
|
|
444
|
+
emptyCycleReference,
|
|
445
|
+
emptyFindUserByEmailInput,
|
|
446
|
+
emptyGetIssueInput,
|
|
447
|
+
emptyIssue,
|
|
448
|
+
emptyIssueLabel,
|
|
449
|
+
emptyIssueReference,
|
|
450
|
+
emptyIssueSearchFilter,
|
|
451
|
+
emptyIssueSummary,
|
|
452
|
+
emptyListWorkflowStatesInput,
|
|
453
|
+
emptyListWorkflowStatesOutput,
|
|
454
|
+
emptyProjectReference,
|
|
455
|
+
emptySearchIssuesInput,
|
|
456
|
+
emptySearchIssuesOutput,
|
|
457
|
+
emptyTeamReference,
|
|
458
|
+
emptyUpdateIssueInput,
|
|
459
|
+
emptyUpdateIssueOutput,
|
|
460
|
+
emptyUser,
|
|
461
|
+
emptyUserReference,
|
|
462
|
+
emptyWorkflowState,
|
|
463
|
+
emptyWorkflowStateReference,
|
|
464
|
+
findUserByEmailAliceAssignee,
|
|
465
|
+
findUserByEmailAssigneeLookupForbidden,
|
|
466
|
+
findUserByEmailAssigneeMissing,
|
|
467
|
+
findUserByEmailDefault,
|
|
468
|
+
findUserByEmailDefect,
|
|
469
|
+
findUserByEmailFound,
|
|
470
|
+
findUserByEmailInvalidResponse,
|
|
471
|
+
findUserByEmailNotFound,
|
|
472
|
+
findUserByEmailProviderRejected,
|
|
473
|
+
findUserByEmailRetry,
|
|
474
|
+
getIssueDefault,
|
|
475
|
+
getIssueDefect,
|
|
476
|
+
getIssueFound,
|
|
477
|
+
getIssueInvalidResponse,
|
|
478
|
+
getIssueIssueMissing,
|
|
479
|
+
getIssueIssueNotVisible,
|
|
480
|
+
getIssueIssueReadKeyRevoked,
|
|
481
|
+
getIssueMovedFireDrillIssue,
|
|
482
|
+
getIssueNotFound,
|
|
483
|
+
getIssueProviderRejected,
|
|
484
|
+
getIssueRetry,
|
|
485
|
+
listWorkflowStatesDefault,
|
|
486
|
+
listWorkflowStatesDefect,
|
|
487
|
+
listWorkflowStatesEngineeringStates,
|
|
488
|
+
listWorkflowStatesInvalidResponse,
|
|
489
|
+
listWorkflowStatesListed,
|
|
490
|
+
listWorkflowStatesNotFound,
|
|
491
|
+
listWorkflowStatesProviderRejected,
|
|
492
|
+
listWorkflowStatesRetry,
|
|
493
|
+
listWorkflowStatesTeamMissing,
|
|
494
|
+
listWorkflowStatesTeamStatesKeyRevoked,
|
|
495
|
+
listWorkflowStatesTeamStatesNotVisible,
|
|
496
|
+
searchIssuesDefault,
|
|
497
|
+
searchIssuesDefect,
|
|
498
|
+
searchIssuesEngineeringIssues,
|
|
499
|
+
searchIssuesInvalidIssueCursor,
|
|
500
|
+
searchIssuesInvalidResponse,
|
|
501
|
+
searchIssuesNoOpenFireDrillIssue,
|
|
502
|
+
searchIssuesProviderRejected,
|
|
503
|
+
searchIssuesRetry,
|
|
504
|
+
searchIssuesSearched,
|
|
505
|
+
updateIssueDefault,
|
|
506
|
+
updateIssueDefect,
|
|
507
|
+
updateIssueInvalidResponse,
|
|
508
|
+
updateIssueMovedFireDrillToProgress,
|
|
509
|
+
updateIssueNotFound,
|
|
510
|
+
updateIssueProviderRejected,
|
|
511
|
+
updateIssueRetry,
|
|
512
|
+
updateIssueStateFromAnotherTeam,
|
|
513
|
+
updateIssueUpdateMissingIssue,
|
|
514
|
+
updateIssueUpdated
|
|
515
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdurable/connector-linear",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Linear issue operations for Dex Flows",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/superdurable/dex-connectors-library.git",
|
|
8
|
+
"directory": "connectors/linear/typescript"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public",
|
|
13
|
+
"registry": "https://registry.npmjs.org"
|
|
14
|
+
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": "^22.0.0 || ^24.0.0"
|
|
17
|
+
},
|
|
18
|
+
"module": "./dist/index.js",
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"import": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./mock": {
|
|
26
|
+
"types": "./dist/mock.d.ts",
|
|
27
|
+
"import": "./dist/mock.js"
|
|
28
|
+
},
|
|
29
|
+
"./dex-connector.json": "./dex-connector.json"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"dex-connector.json",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsup src/index.ts src/mock.ts --format esm --dts --clean",
|
|
39
|
+
"typecheck": "tsc --noEmit",
|
|
40
|
+
"lint": "eslint src test examples",
|
|
41
|
+
"test": "npm run build && vitest run --exclude 'test/integration/**'",
|
|
42
|
+
"test:integration": "npm run build && vitest run test/integration/*.integration.test.ts",
|
|
43
|
+
"check": "npm test && npm run typecheck && npm run lint",
|
|
44
|
+
"example:issue-search": "npm run build && tsx examples/issue-search/main.ts",
|
|
45
|
+
"example:issue-search:start": "npm run build && tsx examples/issue-search/start.ts"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@superdurable/connectors-sdk": "0.7.0",
|
|
49
|
+
"@superdurable/dex": ">=1.28.0",
|
|
50
|
+
"zod": "^4.1.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@eslint/js": "^9.0.0",
|
|
54
|
+
"@types/node": "^22.0.0",
|
|
55
|
+
"eslint": "^9.0.0",
|
|
56
|
+
"tsup": "^8.0.0",
|
|
57
|
+
"tsx": "^4.23.15",
|
|
58
|
+
"typescript": "^5.9.0",
|
|
59
|
+
"typescript-eslint": "^8.0.0",
|
|
60
|
+
"vitest": "^3.0.0",
|
|
61
|
+
"yaml": "^2.9.1"
|
|
62
|
+
},
|
|
63
|
+
"license": "MIT"
|
|
64
|
+
}
|