@bubblelab/bubble-core 0.1.170 → 0.1.172
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/dist/bubble-bundle.d.ts +157 -112
- package/dist/bubble-factory.d.ts.map +1 -1
- package/dist/bubble-factory.js +4 -0
- package/dist/bubble-factory.js.map +1 -1
- package/dist/bubbles/service-bubble/ai-agent.d.ts +84 -84
- package/dist/bubbles/service-bubble/airtable.d.ts +100 -100
- package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.d.ts +2 -2
- package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.d.ts +8 -8
- package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.d.ts +2 -2
- package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.d.ts +22 -22
- package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-detail.d.ts +38 -38
- package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.d.ts +52 -52
- package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts +6 -6
- package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts +12 -12
- package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts +12 -12
- package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts +126 -126
- package/dist/bubbles/service-bubble/apify/apify.d.ts +14 -14
- package/dist/bubbles/service-bubble/ashby/ashby.d.ts +74 -74
- package/dist/bubbles/service-bubble/ashby/ashby.schema.d.ts +102 -102
- package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +3 -3
- package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts +3 -3
- package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +4 -4
- package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts +8 -8
- package/dist/bubbles/service-bubble/firecrawl.d.ts +202 -202
- package/dist/bubbles/service-bubble/followupboss.d.ts +4 -4
- package/dist/bubbles/service-bubble/github.d.ts +12 -12
- package/dist/bubbles/service-bubble/gmail.d.ts +16 -16
- package/dist/bubbles/service-bubble/google-calendar.d.ts +80 -80
- package/dist/bubbles/service-bubble/google-drive.d.ts +40 -40
- package/dist/bubbles/service-bubble/http.d.ts +6 -6
- package/dist/bubbles/service-bubble/insforge-db.d.ts +6 -6
- package/dist/bubbles/service-bubble/jira/jira.d.ts +16 -16
- package/dist/bubbles/service-bubble/jira/jira.schema.d.ts +18 -18
- package/dist/bubbles/service-bubble/linear/index.d.ts +5 -0
- package/dist/bubbles/service-bubble/linear/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/linear/index.js +5 -0
- package/dist/bubbles/service-bubble/linear/index.js.map +1 -0
- package/dist/bubbles/service-bubble/linear/linear.d.ts +1695 -0
- package/dist/bubbles/service-bubble/linear/linear.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/linear/linear.integration.flow.d.ts +33 -0
- package/dist/bubbles/service-bubble/linear/linear.integration.flow.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/linear/linear.integration.flow.js +432 -0
- package/dist/bubbles/service-bubble/linear/linear.integration.flow.js.map +1 -0
- package/dist/bubbles/service-bubble/linear/linear.js +463 -0
- package/dist/bubbles/service-bubble/linear/linear.js.map +1 -0
- package/dist/bubbles/service-bubble/linear/linear.schema.d.ts +2059 -0
- package/dist/bubbles/service-bubble/linear/linear.schema.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/linear/linear.schema.js +444 -0
- package/dist/bubbles/service-bubble/linear/linear.schema.js.map +1 -0
- package/dist/bubbles/service-bubble/linear/linear.utils.d.ts +24 -0
- package/dist/bubbles/service-bubble/linear/linear.utils.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/linear/linear.utils.js +288 -0
- package/dist/bubbles/service-bubble/linear/linear.utils.js.map +1 -0
- package/dist/bubbles/service-bubble/notion/notion.d.ts +272 -272
- package/dist/bubbles/service-bubble/notion/property-schemas.d.ts +8 -8
- package/dist/bubbles/service-bubble/postgresql.d.ts +6 -6
- package/dist/bubbles/service-bubble/posthog/posthog.d.ts +8 -8
- package/dist/bubbles/service-bubble/posthog/posthog.schema.d.ts +12 -12
- package/dist/bubbles/service-bubble/resend.d.ts +4 -4
- package/dist/bubbles/service-bubble/slack/slack.d.ts +160 -160
- package/dist/bubbles/service-bubble/stripe/stripe.d.ts +24 -24
- package/dist/bubbles/service-bubble/stripe/stripe.schema.d.ts +28 -28
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +6 -6
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts +8 -8
- package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +10 -10
- package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +106 -106
- package/dist/bubbles/tool-bubble/list-capabilities-tool.d.ts +8 -8
- package/dist/bubbles/tool-bubble/people-search-tool.d.ts +10 -10
- package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +8 -8
- package/dist/bubbles/tool-bubble/twitter-tool.d.ts +54 -54
- package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +8 -8
- package/dist/bubbles/tool-bubble/yc-scraper-tool.d.ts +8 -8
- package/dist/bubbles/tool-bubble/youtube-tool.d.ts +20 -20
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +44 -44
- package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +16 -16
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +2 -2
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +34 -34
- package/dist/bubbles.json +1357 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
import { ServiceBubble } from '../../../types/service-bubble-class.js';
|
|
2
|
+
import { CredentialType } from '@bubblelab/shared-schemas';
|
|
3
|
+
import { LinearParamsSchema, LinearResultSchema, } from './linear.schema.js';
|
|
4
|
+
import { makeGraphQLRequest, buildSearchQuery, buildSearchByTextQuery, buildGetIssueQuery, buildCreateIssueMutation, buildUpdateIssueMutation, buildListTeamsQuery, buildListProjectsQuery, buildListWorkflowStatesQuery, buildAddCommentMutation, buildGetCommentsQuery, buildListLabelsQuery, } from './linear.utils.js';
|
|
5
|
+
/**
|
|
6
|
+
* Linear Service Bubble
|
|
7
|
+
*
|
|
8
|
+
* Agent-friendly Linear integration for issue tracking and project management.
|
|
9
|
+
*
|
|
10
|
+
* Core Operations:
|
|
11
|
+
* - search: Find issues with text query and filters
|
|
12
|
+
* - get: Get details for a specific issue
|
|
13
|
+
* - create: Create new issues with markdown support
|
|
14
|
+
* - update: Modify existing issues (including state changes by name)
|
|
15
|
+
*
|
|
16
|
+
* Supporting Operations:
|
|
17
|
+
* - list_teams: List all teams
|
|
18
|
+
* - list_projects: List projects (optionally by team)
|
|
19
|
+
* - list_workflow_states: List workflow states for a team
|
|
20
|
+
* - add_comment: Add a comment to an issue
|
|
21
|
+
* - get_comments: Get comments for an issue
|
|
22
|
+
* - list_labels: List labels (optionally by team)
|
|
23
|
+
*
|
|
24
|
+
* Features:
|
|
25
|
+
* - Markdown descriptions and comments (native support)
|
|
26
|
+
* - State transitions by name (auto-resolved to IDs)
|
|
27
|
+
* - GraphQL API for efficient data fetching
|
|
28
|
+
* - OAuth 2.0 authentication
|
|
29
|
+
*/
|
|
30
|
+
export class LinearBubble extends ServiceBubble {
|
|
31
|
+
static type = 'service';
|
|
32
|
+
static service = 'linear';
|
|
33
|
+
static authType = 'oauth';
|
|
34
|
+
static bubbleName = 'linear';
|
|
35
|
+
static schema = LinearParamsSchema;
|
|
36
|
+
static resultSchema = LinearResultSchema;
|
|
37
|
+
static shortDescription = 'Linear integration for issue tracking and project management';
|
|
38
|
+
static longDescription = `
|
|
39
|
+
Agent-friendly Linear integration for issue tracking and project management.
|
|
40
|
+
|
|
41
|
+
Core Operations:
|
|
42
|
+
- search: Find issues with text query and filters
|
|
43
|
+
- get: Get details for a specific issue
|
|
44
|
+
- create: Create new issues with markdown support
|
|
45
|
+
- update: Modify existing issues (including state changes by name)
|
|
46
|
+
|
|
47
|
+
Supporting Operations:
|
|
48
|
+
- list_teams: List all teams
|
|
49
|
+
- list_projects: List projects (optionally by team)
|
|
50
|
+
- list_workflow_states: List workflow states for a team
|
|
51
|
+
- add_comment: Add a comment to an issue
|
|
52
|
+
- get_comments: Get comments for an issue
|
|
53
|
+
- list_labels: List labels (optionally by team)
|
|
54
|
+
|
|
55
|
+
Features:
|
|
56
|
+
- Markdown descriptions and comments (native Linear markdown support)
|
|
57
|
+
- State transitions by name (auto-resolved to IDs)
|
|
58
|
+
- GraphQL API for efficient data fetching
|
|
59
|
+
- OAuth 2.0 authentication
|
|
60
|
+
`;
|
|
61
|
+
static alias = 'linear';
|
|
62
|
+
constructor(params, context) {
|
|
63
|
+
super(params, context);
|
|
64
|
+
}
|
|
65
|
+
async testCredential() {
|
|
66
|
+
const accessToken = this.chooseCredential();
|
|
67
|
+
if (!accessToken) {
|
|
68
|
+
throw new Error('Linear credentials are required');
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
const data = await makeGraphQLRequest(accessToken, `query { viewer { id } }`);
|
|
72
|
+
const viewer = data.viewer;
|
|
73
|
+
return Boolean(viewer && viewer.id);
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Parse the Linear credential. Unlike Jira (base64 JSON with cloudId),
|
|
81
|
+
* Linear's credential is just the raw access token.
|
|
82
|
+
*/
|
|
83
|
+
parseAccessToken() {
|
|
84
|
+
const { credentials } = this.params;
|
|
85
|
+
if (!credentials || typeof credentials !== 'object') {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
const linearCred = credentials[CredentialType.LINEAR_CRED];
|
|
89
|
+
if (!linearCred) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
return linearCred;
|
|
93
|
+
}
|
|
94
|
+
getAccessToken() {
|
|
95
|
+
const token = this.parseAccessToken();
|
|
96
|
+
if (!token) {
|
|
97
|
+
throw new Error('Linear credentials are required. Connect your Linear account via OAuth.');
|
|
98
|
+
}
|
|
99
|
+
return token;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Resolve an issue identifier (e.g., "LIN-123") to its UUID.
|
|
103
|
+
* If the input is already a UUID, returns it as-is.
|
|
104
|
+
*/
|
|
105
|
+
async resolveIssueId(identifierOrId) {
|
|
106
|
+
// UUIDs are 36 chars with dashes
|
|
107
|
+
if (identifierOrId.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i)) {
|
|
108
|
+
return identifierOrId;
|
|
109
|
+
}
|
|
110
|
+
// It's an identifier like "LIN-123", look it up
|
|
111
|
+
const data = await makeGraphQLRequest(this.getAccessToken(), buildGetIssueQuery(), { id: identifierOrId });
|
|
112
|
+
const issue = data.issue;
|
|
113
|
+
if (!issue || !issue.id) {
|
|
114
|
+
throw new Error(`Issue "${identifierOrId}" not found`);
|
|
115
|
+
}
|
|
116
|
+
return issue.id;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Resolve a workflow state name to its ID for a given team.
|
|
120
|
+
*/
|
|
121
|
+
async resolveStateId(stateName, teamId) {
|
|
122
|
+
const data = await makeGraphQLRequest(this.getAccessToken(), buildListWorkflowStatesQuery(), { filter: { team: { id: { eq: teamId } } } });
|
|
123
|
+
const states = data.workflowStates;
|
|
124
|
+
const match = states.nodes.find((s) => s.name.toLowerCase() === stateName.toLowerCase());
|
|
125
|
+
if (!match) {
|
|
126
|
+
const available = states.nodes.map((s) => `"${s.name}"`).join(', ');
|
|
127
|
+
throw new Error(`Workflow state "${stateName}" not found. Available states: ${available}`);
|
|
128
|
+
}
|
|
129
|
+
return match.id;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Get the team ID for an issue (needed for state name resolution on update).
|
|
133
|
+
*/
|
|
134
|
+
async getIssueTeamId(issueId) {
|
|
135
|
+
const data = await makeGraphQLRequest(this.getAccessToken(), `query GetIssueTeam($id: String!) { issue(id: $id) { team { id } } }`, { id: issueId });
|
|
136
|
+
const issue = data.issue;
|
|
137
|
+
if (!issue?.team?.id) {
|
|
138
|
+
throw new Error(`Could not determine team for issue "${issueId}"`);
|
|
139
|
+
}
|
|
140
|
+
return issue.team.id;
|
|
141
|
+
}
|
|
142
|
+
async performAction(context) {
|
|
143
|
+
void context;
|
|
144
|
+
const { operation } = this.params;
|
|
145
|
+
try {
|
|
146
|
+
const result = await (async () => {
|
|
147
|
+
const parsedParams = this.params;
|
|
148
|
+
switch (operation) {
|
|
149
|
+
case 'search':
|
|
150
|
+
return await this.search(parsedParams);
|
|
151
|
+
case 'get':
|
|
152
|
+
return await this.get(parsedParams);
|
|
153
|
+
case 'create':
|
|
154
|
+
return await this.create(parsedParams);
|
|
155
|
+
case 'update':
|
|
156
|
+
return await this.update(parsedParams);
|
|
157
|
+
case 'list_teams':
|
|
158
|
+
return await this.listTeams(parsedParams);
|
|
159
|
+
case 'list_projects':
|
|
160
|
+
return await this.listProjects(parsedParams);
|
|
161
|
+
case 'list_workflow_states':
|
|
162
|
+
return await this.listWorkflowStates(parsedParams);
|
|
163
|
+
case 'add_comment':
|
|
164
|
+
return await this.addComment(parsedParams);
|
|
165
|
+
case 'get_comments':
|
|
166
|
+
return await this.getComments(parsedParams);
|
|
167
|
+
case 'list_labels':
|
|
168
|
+
return await this.listLabels(parsedParams);
|
|
169
|
+
default:
|
|
170
|
+
throw new Error(`Unsupported operation: ${operation}`);
|
|
171
|
+
}
|
|
172
|
+
})();
|
|
173
|
+
return result;
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
return {
|
|
177
|
+
operation,
|
|
178
|
+
success: false,
|
|
179
|
+
error: error instanceof Error ? error.message : 'Unknown error occurred',
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// -------------------------------------------------------------------------
|
|
184
|
+
// CORE OPERATION 1: search
|
|
185
|
+
// -------------------------------------------------------------------------
|
|
186
|
+
async search(params) {
|
|
187
|
+
const { query, teamId, assigneeId, stateId, labelId, projectId, priority, limit, includeArchived, } = params;
|
|
188
|
+
const accessToken = this.getAccessToken();
|
|
189
|
+
// If text query is provided, use searchIssues; otherwise use issues with filters
|
|
190
|
+
if (query) {
|
|
191
|
+
const variables = {
|
|
192
|
+
term: query,
|
|
193
|
+
first: limit ?? 50,
|
|
194
|
+
};
|
|
195
|
+
const data = await makeGraphQLRequest(accessToken, buildSearchByTextQuery(), variables);
|
|
196
|
+
const searchResult = data.searchIssues;
|
|
197
|
+
return {
|
|
198
|
+
operation: 'search',
|
|
199
|
+
success: true,
|
|
200
|
+
issues: searchResult.nodes,
|
|
201
|
+
total: searchResult.totalCount ?? searchResult.nodes.length,
|
|
202
|
+
error: '',
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
// Use issues with filter
|
|
207
|
+
const filter = {};
|
|
208
|
+
if (teamId)
|
|
209
|
+
filter.team = { id: { eq: teamId } };
|
|
210
|
+
if (assigneeId)
|
|
211
|
+
filter.assignee = { id: { eq: assigneeId } };
|
|
212
|
+
if (stateId)
|
|
213
|
+
filter.state = { id: { eq: stateId } };
|
|
214
|
+
if (labelId)
|
|
215
|
+
filter.labels = { some: { id: { eq: labelId } } };
|
|
216
|
+
if (projectId)
|
|
217
|
+
filter.project = { id: { eq: projectId } };
|
|
218
|
+
if (priority !== undefined)
|
|
219
|
+
filter.priority = { eq: priority };
|
|
220
|
+
const data = await makeGraphQLRequest(accessToken, buildSearchQuery(), {
|
|
221
|
+
filter: Object.keys(filter).length > 0 ? filter : undefined,
|
|
222
|
+
first: limit ?? 50,
|
|
223
|
+
includeArchived: includeArchived ?? false,
|
|
224
|
+
});
|
|
225
|
+
const issuesResult = data.issues;
|
|
226
|
+
return {
|
|
227
|
+
operation: 'search',
|
|
228
|
+
success: true,
|
|
229
|
+
issues: issuesResult.nodes,
|
|
230
|
+
total: issuesResult.nodes.length,
|
|
231
|
+
error: '',
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
// -------------------------------------------------------------------------
|
|
236
|
+
// CORE OPERATION 2: get
|
|
237
|
+
// -------------------------------------------------------------------------
|
|
238
|
+
async get(params) {
|
|
239
|
+
const { identifier } = params;
|
|
240
|
+
const data = await makeGraphQLRequest(this.getAccessToken(), buildGetIssueQuery(), { id: identifier });
|
|
241
|
+
return {
|
|
242
|
+
operation: 'get',
|
|
243
|
+
success: true,
|
|
244
|
+
issue: data.issue,
|
|
245
|
+
error: '',
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
// -------------------------------------------------------------------------
|
|
249
|
+
// CORE OPERATION 3: create
|
|
250
|
+
// -------------------------------------------------------------------------
|
|
251
|
+
async create(params) {
|
|
252
|
+
const { teamId, title, description, assigneeId, priority, stateId, stateName, labelIds, projectId, dueDate, parentId, estimate, } = params;
|
|
253
|
+
const input = {
|
|
254
|
+
teamId,
|
|
255
|
+
title,
|
|
256
|
+
};
|
|
257
|
+
if (description)
|
|
258
|
+
input.description = description;
|
|
259
|
+
if (assigneeId)
|
|
260
|
+
input.assigneeId = assigneeId;
|
|
261
|
+
if (priority !== undefined)
|
|
262
|
+
input.priority = priority;
|
|
263
|
+
if (labelIds && labelIds.length > 0)
|
|
264
|
+
input.labelIds = labelIds;
|
|
265
|
+
if (projectId)
|
|
266
|
+
input.projectId = projectId;
|
|
267
|
+
if (dueDate)
|
|
268
|
+
input.dueDate = dueDate;
|
|
269
|
+
if (parentId)
|
|
270
|
+
input.parentId = parentId;
|
|
271
|
+
if (estimate !== undefined)
|
|
272
|
+
input.estimate = estimate;
|
|
273
|
+
// Resolve state name to ID if provided
|
|
274
|
+
if (stateName && !stateId) {
|
|
275
|
+
input.stateId = await this.resolveStateId(stateName, teamId);
|
|
276
|
+
}
|
|
277
|
+
else if (stateId) {
|
|
278
|
+
input.stateId = stateId;
|
|
279
|
+
}
|
|
280
|
+
const data = await makeGraphQLRequest(this.getAccessToken(), buildCreateIssueMutation(), { input });
|
|
281
|
+
const result = data.issueCreate;
|
|
282
|
+
if (!result.success || !result.issue) {
|
|
283
|
+
throw new Error('Failed to create issue');
|
|
284
|
+
}
|
|
285
|
+
return {
|
|
286
|
+
operation: 'create',
|
|
287
|
+
success: true,
|
|
288
|
+
issue: {
|
|
289
|
+
id: result.issue.id,
|
|
290
|
+
identifier: result.issue.identifier,
|
|
291
|
+
url: result.issue.url,
|
|
292
|
+
},
|
|
293
|
+
error: '',
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
// -------------------------------------------------------------------------
|
|
297
|
+
// CORE OPERATION 4: update
|
|
298
|
+
// -------------------------------------------------------------------------
|
|
299
|
+
async update(params) {
|
|
300
|
+
const { id, title, description, assigneeId, priority, stateId, stateName, labels, projectId, dueDate, estimate, } = params;
|
|
301
|
+
// Resolve the issue ID (might be an identifier like "LIN-123")
|
|
302
|
+
const issueId = await this.resolveIssueId(id);
|
|
303
|
+
const input = {};
|
|
304
|
+
if (title !== undefined)
|
|
305
|
+
input.title = title;
|
|
306
|
+
if (description !== undefined)
|
|
307
|
+
input.description = description;
|
|
308
|
+
if (assigneeId !== undefined)
|
|
309
|
+
input.assigneeId = assigneeId;
|
|
310
|
+
if (priority !== undefined)
|
|
311
|
+
input.priority = priority;
|
|
312
|
+
if (projectId !== undefined)
|
|
313
|
+
input.projectId = projectId;
|
|
314
|
+
if (dueDate !== undefined)
|
|
315
|
+
input.dueDate = dueDate;
|
|
316
|
+
if (estimate !== undefined)
|
|
317
|
+
input.estimate = estimate;
|
|
318
|
+
// Resolve state name to ID if provided
|
|
319
|
+
if (stateName && !stateId) {
|
|
320
|
+
const teamId = await this.getIssueTeamId(issueId);
|
|
321
|
+
input.stateId = await this.resolveStateId(stateName, teamId);
|
|
322
|
+
}
|
|
323
|
+
else if (stateId) {
|
|
324
|
+
input.stateId = stateId;
|
|
325
|
+
}
|
|
326
|
+
// Handle label modifications
|
|
327
|
+
if (labels) {
|
|
328
|
+
if (labels.add && labels.add.length > 0) {
|
|
329
|
+
input.addLabelIds = labels.add;
|
|
330
|
+
}
|
|
331
|
+
if (labels.remove && labels.remove.length > 0) {
|
|
332
|
+
input.removeLabelIds = labels.remove;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
const data = await makeGraphQLRequest(this.getAccessToken(), buildUpdateIssueMutation(), { id: issueId, input });
|
|
336
|
+
const result = data.issueUpdate;
|
|
337
|
+
if (!result.success || !result.issue) {
|
|
338
|
+
throw new Error('Failed to update issue');
|
|
339
|
+
}
|
|
340
|
+
return {
|
|
341
|
+
operation: 'update',
|
|
342
|
+
success: true,
|
|
343
|
+
issue: {
|
|
344
|
+
id: result.issue.id,
|
|
345
|
+
identifier: result.issue.identifier,
|
|
346
|
+
},
|
|
347
|
+
error: '',
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
// -------------------------------------------------------------------------
|
|
351
|
+
// SUPPORTING OPERATION: list_teams
|
|
352
|
+
// -------------------------------------------------------------------------
|
|
353
|
+
async listTeams(_params) {
|
|
354
|
+
const data = await makeGraphQLRequest(this.getAccessToken(), buildListTeamsQuery());
|
|
355
|
+
const teams = data.teams;
|
|
356
|
+
return {
|
|
357
|
+
operation: 'list_teams',
|
|
358
|
+
success: true,
|
|
359
|
+
teams: teams.nodes,
|
|
360
|
+
error: '',
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
// -------------------------------------------------------------------------
|
|
364
|
+
// SUPPORTING OPERATION: list_projects
|
|
365
|
+
// -------------------------------------------------------------------------
|
|
366
|
+
async listProjects(params) {
|
|
367
|
+
const { teamId, limit, includeArchived } = params;
|
|
368
|
+
const variables = {
|
|
369
|
+
first: limit ?? 50,
|
|
370
|
+
includeArchived: includeArchived ?? false,
|
|
371
|
+
};
|
|
372
|
+
if (teamId) {
|
|
373
|
+
variables.filter = {
|
|
374
|
+
accessibleTeams: { some: { id: { eq: teamId } } },
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
const data = await makeGraphQLRequest(this.getAccessToken(), buildListProjectsQuery(), variables);
|
|
378
|
+
const projects = data.projects;
|
|
379
|
+
return {
|
|
380
|
+
operation: 'list_projects',
|
|
381
|
+
success: true,
|
|
382
|
+
projects: projects.nodes,
|
|
383
|
+
error: '',
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
// -------------------------------------------------------------------------
|
|
387
|
+
// SUPPORTING OPERATION: list_workflow_states
|
|
388
|
+
// -------------------------------------------------------------------------
|
|
389
|
+
async listWorkflowStates(params) {
|
|
390
|
+
const { teamId } = params;
|
|
391
|
+
const data = await makeGraphQLRequest(this.getAccessToken(), buildListWorkflowStatesQuery(), { filter: { team: { id: { eq: teamId } } } });
|
|
392
|
+
const states = data.workflowStates;
|
|
393
|
+
return {
|
|
394
|
+
operation: 'list_workflow_states',
|
|
395
|
+
success: true,
|
|
396
|
+
states: states.nodes,
|
|
397
|
+
error: '',
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
// -------------------------------------------------------------------------
|
|
401
|
+
// SUPPORTING OPERATION: add_comment
|
|
402
|
+
// -------------------------------------------------------------------------
|
|
403
|
+
async addComment(params) {
|
|
404
|
+
const { issueId, body } = params;
|
|
405
|
+
// Resolve issue ID (might be an identifier)
|
|
406
|
+
const resolvedId = await this.resolveIssueId(issueId);
|
|
407
|
+
const data = await makeGraphQLRequest(this.getAccessToken(), buildAddCommentMutation(), { input: { issueId: resolvedId, body } });
|
|
408
|
+
const result = data.commentCreate;
|
|
409
|
+
if (!result.success || !result.comment) {
|
|
410
|
+
throw new Error('Failed to add comment');
|
|
411
|
+
}
|
|
412
|
+
return {
|
|
413
|
+
operation: 'add_comment',
|
|
414
|
+
success: true,
|
|
415
|
+
comment: result.comment,
|
|
416
|
+
error: '',
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
// -------------------------------------------------------------------------
|
|
420
|
+
// SUPPORTING OPERATION: get_comments
|
|
421
|
+
// -------------------------------------------------------------------------
|
|
422
|
+
async getComments(params) {
|
|
423
|
+
const { issueId, limit } = params;
|
|
424
|
+
// Resolve issue ID (might be an identifier)
|
|
425
|
+
const resolvedId = await this.resolveIssueId(issueId);
|
|
426
|
+
const data = await makeGraphQLRequest(this.getAccessToken(), buildGetCommentsQuery(), { issueId: resolvedId, first: limit ?? 50 });
|
|
427
|
+
const issue = data.issue;
|
|
428
|
+
const comments = issue?.comments?.nodes ?? [];
|
|
429
|
+
return {
|
|
430
|
+
operation: 'get_comments',
|
|
431
|
+
success: true,
|
|
432
|
+
comments: comments,
|
|
433
|
+
total: comments.length,
|
|
434
|
+
error: '',
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
// -------------------------------------------------------------------------
|
|
438
|
+
// SUPPORTING OPERATION: list_labels
|
|
439
|
+
// -------------------------------------------------------------------------
|
|
440
|
+
async listLabels(params) {
|
|
441
|
+
const { teamId } = params;
|
|
442
|
+
const variables = {};
|
|
443
|
+
if (teamId) {
|
|
444
|
+
variables.filter = { team: { id: { eq: teamId } } };
|
|
445
|
+
}
|
|
446
|
+
const data = await makeGraphQLRequest(this.getAccessToken(), buildListLabelsQuery(), variables);
|
|
447
|
+
const labels = data.issueLabels;
|
|
448
|
+
return {
|
|
449
|
+
operation: 'list_labels',
|
|
450
|
+
success: true,
|
|
451
|
+
labels: labels.nodes,
|
|
452
|
+
error: '',
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
chooseCredential() {
|
|
456
|
+
const { credentials } = this.params;
|
|
457
|
+
if (!credentials || typeof credentials !== 'object') {
|
|
458
|
+
return undefined;
|
|
459
|
+
}
|
|
460
|
+
return credentials[CredentialType.LINEAR_CRED];
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
//# sourceMappingURL=linear.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linear.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/linear/linear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GAcnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,EACtB,4BAA4B,EAC5B,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,OAAO,YAEX,SAAQ,aAGT;IACC,MAAM,CAAU,IAAI,GAAG,SAAkB,CAAC;IAC1C,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC;IACnC,MAAM,CAAU,QAAQ,GAAG,OAAgB,CAAC;IAC5C,MAAM,CAAU,UAAU,GAAG,QAAQ,CAAC;IACtC,MAAM,CAAU,MAAM,GAAG,kBAAkB,CAAC;IAC5C,MAAM,CAAU,YAAY,GAAG,kBAAkB,CAAC;IAClD,MAAM,CAAU,gBAAgB,GAC9B,8DAA8D,CAAC;IACjE,MAAM,CAAU,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;GAsBjC,CAAC;IACF,MAAM,CAAU,KAAK,GAAG,QAAQ,CAAC;IAEjC,YAAY,MAAS,EAAE,OA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