@enrichlayer/el-linear 1.10.0 → 1.15.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 +126 -10
- package/claude-skills/linear-operations/SKILL.md +41 -1
- package/dist/auth/linear-credential.d.ts +27 -0
- package/dist/auth/linear-credential.js +1 -0
- package/dist/auth/oauth-app-config.d.ts +4 -3
- package/dist/auth/oauth-app-config.js +13 -2
- package/dist/auth/oauth-callback.d.ts +2 -3
- package/dist/auth/oauth-callback.js +2 -2
- package/dist/auth/oauth-client.d.ts +8 -2
- package/dist/auth/oauth-client.js +26 -0
- package/dist/auth/oauth-fs.d.ts +2 -1
- package/dist/auth/oauth-headless.d.ts +2 -1
- package/dist/auth/oauth-storage.d.ts +5 -1
- package/dist/auth/oauth-storage.js +1 -1
- package/dist/auth/oauth-token.d.ts +4 -3
- package/dist/auth/oauth-token.js +16 -4
- package/dist/auth/token-resolver.d.ts +14 -5
- package/dist/auth/token-resolver.js +6 -1
- package/dist/commands/batch.js +18 -21
- package/dist/commands/comments.js +5 -5
- package/dist/commands/config.js +178 -5
- package/dist/commands/init/aliases.js +1 -1
- package/dist/commands/init/defaults.d.ts +2 -1
- package/dist/commands/init/index.js +45 -35
- package/dist/commands/init/oauth.d.ts +4 -1
- package/dist/commands/init/oauth.js +22 -4
- package/dist/commands/init/shared.d.ts +24 -2
- package/dist/commands/init/shared.js +35 -4
- package/dist/commands/init/token.d.ts +3 -3
- package/dist/commands/init/token.js +5 -24
- package/dist/commands/init/workspace.d.ts +2 -1
- package/dist/commands/init/workspace.js +1 -1
- package/dist/commands/introspect.d.ts +27 -0
- package/dist/commands/introspect.js +178 -0
- package/dist/commands/issues/branch.js +9 -1
- package/dist/commands/issues/relations.d.ts +3 -14
- package/dist/commands/issues/relations.js +3 -3
- package/dist/commands/issues.js +222 -43
- package/dist/commands/labels.js +2 -1
- package/dist/commands/profile.js +1 -0
- package/dist/commands/projects.d.ts +2 -0
- package/dist/commands/projects.js +91 -7
- package/dist/commands/read-shortcut.d.ts +1 -1
- package/dist/commands/read-shortcut.js +28 -8
- package/dist/commands/refs.js +67 -8
- package/dist/commands/search.js +30 -5
- package/dist/commands/users.js +4 -2
- package/dist/config/config.d.ts +99 -1
- package/dist/config/config.js +264 -52
- package/dist/config/error-enrichment.d.ts +62 -0
- package/dist/config/error-enrichment.js +417 -0
- package/dist/config/issue-validation.d.ts +37 -0
- package/dist/config/issue-validation.js +63 -1
- package/dist/config/paths.d.ts +2 -8
- package/dist/config/paths.js +4 -2
- package/dist/config/resolver.d.ts +8 -1
- package/dist/config/resolver.js +9 -2
- package/dist/main.js +13 -1
- package/dist/queries/comments-types.d.ts +15 -9
- package/dist/queries/common.d.ts +2 -2
- package/dist/queries/common.js +8 -0
- package/dist/queries/documents-types.d.ts +4 -3
- package/dist/queries/introspect-types.d.ts +8 -7
- package/dist/queries/issues-types.d.ts +92 -27
- package/dist/queries/issues.d.ts +49 -10
- package/dist/queries/issues.js +125 -5
- package/dist/queries/labels-types.d.ts +7 -6
- package/dist/queries/project-milestones-types.d.ts +5 -4
- package/dist/queries/project-milestones.d.ts +1 -1
- package/dist/queries/projects-types.d.ts +8 -7
- package/dist/queries/releases-types.d.ts +5 -4
- package/dist/queries/search-types.d.ts +28 -12
- package/dist/queries/templates-types.d.ts +3 -2
- package/dist/types/linear.d.ts +13 -1
- package/dist/utils/auto-link-references.d.ts +3 -3
- package/dist/utils/auto-link-references.js +1 -10
- package/dist/utils/extract-field.d.ts +19 -0
- package/dist/utils/extract-field.js +99 -0
- package/dist/utils/file-service.d.ts +6 -13
- package/dist/utils/file-service.js +0 -2
- package/dist/utils/formatters/summary.js +6 -1
- package/dist/utils/graphql-issues-service.d.ts +101 -45
- package/dist/utils/graphql-issues-service.js +252 -39
- package/dist/utils/graphql-service.d.ts +10 -12
- package/dist/utils/graphql-service.js +0 -3
- package/dist/utils/issue-reference-extractor.d.ts +7 -0
- package/dist/utils/issue-reference-extractor.js +5 -3
- package/dist/utils/issues-service-bootstrap.d.ts +28 -0
- package/dist/utils/issues-service-bootstrap.js +27 -0
- package/dist/utils/linear-service.d.ts +21 -14
- package/dist/utils/linear-service.js +73 -11
- package/dist/utils/markdown-prosemirror.js +12 -12
- package/dist/utils/mention-resolver.js +1 -1
- package/dist/utils/output.d.ts +81 -3
- package/dist/utils/output.js +61 -6
- package/dist/utils/project-slug.d.ts +21 -0
- package/dist/utils/project-slug.js +45 -0
- package/dist/utils/protected-ranges.d.ts +14 -0
- package/dist/utils/protected-ranges.js +88 -2
- package/dist/utils/sanitize-for-log.d.ts +24 -0
- package/dist/utils/sanitize-for-log.js +38 -0
- package/dist/utils/table-formatter.js +24 -0
- package/dist/utils/validators.d.ts +7 -2
- package/dist/utils/validators.js +6 -0
- package/dist/utils/workspace-url.js +20 -4
- package/package.json +2 -2
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract a named section from a Linear issue's markdown description.
|
|
3
|
+
*
|
|
4
|
+
* Linear issue bodies follow a small set of repeated structures —
|
|
5
|
+
* "Why we need this", "Done when", "Scope", "Out of scope", etc. —
|
|
6
|
+
* usually as `##` or `###` headers, sometimes as bold pseudo-headers
|
|
7
|
+
* (`**Done when**`). Agents end up repeatedly piping
|
|
8
|
+
* `el-linear issues read X | python -c '...desc.find("Done when")...'`
|
|
9
|
+
* to pull one section out. This helper centralizes that.
|
|
10
|
+
*
|
|
11
|
+
* Matching is case-insensitive on the header text. The first matching
|
|
12
|
+
* header wins. Content is everything between that header and the next
|
|
13
|
+
* header line (any `#{1,6}` or bold pseudo-header at line start) or EOF,
|
|
14
|
+
* trimmed of surrounding whitespace.
|
|
15
|
+
*
|
|
16
|
+
* Returns `null` when the field isn't found, so callers can distinguish
|
|
17
|
+
* "missing" from "empty body".
|
|
18
|
+
*/
|
|
19
|
+
// Header forms accepted:
|
|
20
|
+
// `# ... `, `## ...`, `### ...`, ... up to `######`
|
|
21
|
+
// `**Done when**`, `**Done when:**` (bold pseudo-headers)
|
|
22
|
+
// Trailing colons after the header text are stripped.
|
|
23
|
+
const ATX_HEADER_RE = /^(?:#{1,6})\s+([^\n]+?)(?::\s*)?\s*$/;
|
|
24
|
+
const BOLD_PSEUDO_HEADER_RE = /^\*\*([^*\n]+?)(?::\s*)?\*\*\s*$/;
|
|
25
|
+
// Fenced code block delimiters per CommonMark: at least three backticks or
|
|
26
|
+
// tildes at the start of a line, with up to 3 leading SPACES of indent (4+
|
|
27
|
+
// is an indented code block, which is a different construct; tabs are not
|
|
28
|
+
// permitted as fence indent per the CommonMark spec). We toggle an inFence
|
|
29
|
+
// flag while scanning so section headers inside code samples don't
|
|
30
|
+
// terminate the real section.
|
|
31
|
+
const FENCE_RE = /^ {0,3}(`{3,}|~{3,})/;
|
|
32
|
+
function normalize(s) {
|
|
33
|
+
return s.toLowerCase().trim().replace(/\s+/g, " ");
|
|
34
|
+
}
|
|
35
|
+
// Bold pseudo-header heuristic: any `**...**` line could be a header, but
|
|
36
|
+
// inline emphasis paragraphs (e.g. a single bolded sentence in prose) are
|
|
37
|
+
// false positives. Require either a trailing colon OR ≤6 words so that
|
|
38
|
+
// "**Done when:**" and "**Why we need this**" qualify but "**Note that all
|
|
39
|
+
// downstream consumers ...**" does not.
|
|
40
|
+
function isLikelyBoldHeader(text, hadTrailingColon) {
|
|
41
|
+
if (hadTrailingColon)
|
|
42
|
+
return true;
|
|
43
|
+
const wordCount = text.trim().split(/\s+/).filter(Boolean).length;
|
|
44
|
+
return wordCount > 0 && wordCount <= 6;
|
|
45
|
+
}
|
|
46
|
+
function matchHeader(line) {
|
|
47
|
+
const atx = line.match(ATX_HEADER_RE);
|
|
48
|
+
if (atx)
|
|
49
|
+
return { text: atx[1] };
|
|
50
|
+
const bold = line.match(BOLD_PSEUDO_HEADER_RE);
|
|
51
|
+
if (bold) {
|
|
52
|
+
const text = bold[1];
|
|
53
|
+
// match[1] excludes the bold delimiters; the regex consumed a trailing
|
|
54
|
+
// colon if present, so detect by re-checking the raw line.
|
|
55
|
+
const hadColon = /:\*\*\s*$/.test(line);
|
|
56
|
+
if (!isLikelyBoldHeader(text, hadColon))
|
|
57
|
+
return null;
|
|
58
|
+
return { text };
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
export function extractField(body, fieldName) {
|
|
63
|
+
if (!body)
|
|
64
|
+
return null;
|
|
65
|
+
const target = normalize(fieldName);
|
|
66
|
+
const lines = body.split("\n");
|
|
67
|
+
let inFence = false;
|
|
68
|
+
let startIdx = -1;
|
|
69
|
+
for (let i = 0; i < lines.length; i++) {
|
|
70
|
+
if (FENCE_RE.test(lines[i])) {
|
|
71
|
+
inFence = !inFence;
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
if (inFence)
|
|
75
|
+
continue;
|
|
76
|
+
const match = matchHeader(lines[i]);
|
|
77
|
+
if (!match)
|
|
78
|
+
continue;
|
|
79
|
+
if (normalize(match.text) === target) {
|
|
80
|
+
startIdx = i + 1;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (startIdx === -1)
|
|
85
|
+
return null;
|
|
86
|
+
const out = [];
|
|
87
|
+
let sectionInFence = false;
|
|
88
|
+
for (let i = startIdx; i < lines.length; i++) {
|
|
89
|
+
if (FENCE_RE.test(lines[i])) {
|
|
90
|
+
sectionInFence = !sectionInFence;
|
|
91
|
+
out.push(lines[i]);
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
if (!sectionInFence && matchHeader(lines[i]) !== null)
|
|
95
|
+
break;
|
|
96
|
+
out.push(lines[i]);
|
|
97
|
+
}
|
|
98
|
+
return out.join("\n").trim();
|
|
99
|
+
}
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
+
import type { LinearCredential } from "../auth/linear-credential.js";
|
|
1
2
|
import type { FileDownloadResult, FileUploadResult } from "../types/linear.js";
|
|
2
3
|
/**
|
|
3
|
-
* Constructor arg
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `Authorization: Bearer <token>`).
|
|
8
|
-
*
|
|
9
|
-
* The string variant exists because dozens of tests construct `FileService`
|
|
10
|
-
* with a plain string. We continue to support it indefinitely.
|
|
4
|
+
* Constructor arg for `FileService`. Re-exported alias of the shared
|
|
5
|
+
* `LinearCredential` union (`{ apiKey } | { oauthToken }`). See
|
|
6
|
+
* `src/auth/linear-credential.ts` for the contract. The bare-string
|
|
7
|
+
* legacy arm was dropped in DEV-4068 T7.
|
|
11
8
|
*/
|
|
12
|
-
export type FileServiceAuth =
|
|
13
|
-
apiKey: string;
|
|
14
|
-
} | {
|
|
15
|
-
oauthToken: string;
|
|
16
|
-
};
|
|
9
|
+
export type FileServiceAuth = LinearCredential;
|
|
17
10
|
export declare class FileService {
|
|
18
11
|
private readonly authHeader;
|
|
19
12
|
constructor(auth: FileServiceAuth);
|
|
@@ -38,8 +38,6 @@ function getMimeType(filePath) {
|
|
|
38
38
|
return MIME_TYPES[ext] || "application/octet-stream";
|
|
39
39
|
}
|
|
40
40
|
function buildAuthHeader(auth) {
|
|
41
|
-
if (typeof auth === "string")
|
|
42
|
-
return auth;
|
|
43
41
|
if ("oauthToken" in auth)
|
|
44
42
|
return `Bearer ${auth.oauthToken}`;
|
|
45
43
|
return auth.apiKey;
|
|
@@ -591,7 +591,12 @@ function formatGenericInline(v) {
|
|
|
591
591
|
if (o)
|
|
592
592
|
return s(o.name ?? o.displayName ?? o.identifier ?? o.id ?? "{…}");
|
|
593
593
|
if (typeof v === "string" && v.length > 80) {
|
|
594
|
-
|
|
594
|
+
// Route through sanitizeForTerminal (via `s()`) before slicing so that
|
|
595
|
+
// long strings from the generic-fallback path can't smuggle ANSI
|
|
596
|
+
// escapes (cursor moves, clear-screen, OSC 8 hyperlinks) into the
|
|
597
|
+
// user's terminal. Every other branch in this function already goes
|
|
598
|
+
// through `s()`; this one previously didn't.
|
|
599
|
+
return `${s(v).slice(0, 80)}…`;
|
|
595
600
|
}
|
|
596
601
|
return s(v);
|
|
597
602
|
}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import type { IssueArchiveEntity, IssueNode, IssueWithCommentsNode } from "../queries/issues-types.js";
|
|
2
|
-
import type { LinearIssue } from "../types/linear.js";
|
|
2
|
+
import type { LinearIssue, LinearPriority } from "../types/linear.js";
|
|
3
3
|
import type { GraphQLService } from "./graphql-service.js";
|
|
4
4
|
import type { LinearService } from "./linear-service.js";
|
|
5
|
+
/**
|
|
6
|
+
* Project filter for `SearchIssueArgs`. Discriminated on `kind` so the
|
|
7
|
+
* "filter by project" and "filter to issues with no project" cases are
|
|
8
|
+
* mutually exclusive at the type level — the old `projectId?: string;
|
|
9
|
+
* noProject?: boolean` pair allowed `{ projectId: "x", noProject: true }`
|
|
10
|
+
* to compile but had to be detangled at runtime (`noProject` won by
|
|
11
|
+
* convention). The discriminant is the contract.
|
|
12
|
+
*/
|
|
13
|
+
export type SearchIssueProject = {
|
|
14
|
+
kind: "id";
|
|
15
|
+
id: string;
|
|
16
|
+
} | {
|
|
17
|
+
kind: "none";
|
|
18
|
+
};
|
|
5
19
|
/**
|
|
6
20
|
* Arguments accepted by `GraphQLIssuesService.searchIssues`. Two
|
|
7
21
|
* modes:
|
|
@@ -15,52 +29,80 @@ export interface SearchIssueArgs {
|
|
|
15
29
|
query?: string;
|
|
16
30
|
/** Team key, name, or UUID. */
|
|
17
31
|
teamId?: string;
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Project filter. `{ kind: "id", id }` filters to a specific project
|
|
34
|
+
* (name or UUID accepted); `{ kind: "none" }` matches issues with no
|
|
35
|
+
* project. Undefined leaves the filter off.
|
|
36
|
+
*/
|
|
37
|
+
project?: SearchIssueProject;
|
|
23
38
|
/** Assignee name, email, alias, or UUID. */
|
|
24
39
|
assigneeId?: string;
|
|
40
|
+
/** Agent user name, email, alias, or UUID delegated to the issue. */
|
|
41
|
+
delegateId?: string;
|
|
25
42
|
/** Issue states to include (e.g. `["Todo", "In Progress"]`). */
|
|
26
43
|
status?: string[];
|
|
27
44
|
/** Label names to require (intersection). */
|
|
28
45
|
labelNames?: string[];
|
|
29
46
|
/** Priority values (0-4) to include. */
|
|
30
|
-
priority?:
|
|
47
|
+
priority?: LinearPriority[];
|
|
31
48
|
/** Result cap; defaults to 10 when not set. */
|
|
32
49
|
limit?: number;
|
|
33
50
|
/** Linear orderBy enum (`createdAt` / `updatedAt`). */
|
|
34
51
|
orderBy?: string;
|
|
35
52
|
}
|
|
36
53
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* `
|
|
54
|
+
* Fields shared by `CreateIssueArgs` and `UpdateIssueArgs`. Both mutations
|
|
55
|
+
* accept the same scalar/foreign-key fields — only their lifecycle
|
|
56
|
+
* fields differ. `Create` adds `teamInput`/`subscriberIds`/`templateId`
|
|
57
|
+
* (initial-state-only); `Update` adds the required `id` and widens
|
|
58
|
+
* `cycleId` to `| null` (Linear's API uses `null` to detach from a
|
|
59
|
+
* cycle on update).
|
|
60
|
+
*
|
|
61
|
+
* Pre-fix this lived as two parallel 13-field interfaces. A field added
|
|
62
|
+
* to one would silently diverge from the other; the shared base now
|
|
63
|
+
* forces a deliberate per-side decision.
|
|
41
64
|
*/
|
|
42
|
-
|
|
43
|
-
/** Issue identifier (e.g. `DEV-3592`) or UUID. Required. */
|
|
44
|
-
id: string;
|
|
65
|
+
interface IssueMutationFields {
|
|
45
66
|
title?: string;
|
|
67
|
+
/** Team key, name, or UUID. Required on create unless `templateId` is set. */
|
|
68
|
+
teamId?: string;
|
|
46
69
|
description?: string;
|
|
47
70
|
/** Assignee name, email, alias, or UUID. */
|
|
48
71
|
assigneeId?: string;
|
|
49
|
-
|
|
72
|
+
/** Agent user name, email, alias, or UUID delegated to work on the issue. */
|
|
73
|
+
delegateId?: string | null;
|
|
74
|
+
/** Linear priority: 0 (none), 1 (urgent), 2 (high), 3 (medium), 4 (low). */
|
|
75
|
+
priority?: LinearPriority;
|
|
76
|
+
/** Project name or UUID. */
|
|
50
77
|
projectId?: string;
|
|
78
|
+
/** Status name or UUID — resolved per team. */
|
|
51
79
|
statusId?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Hint for the team-aware label resolver when the issue is being
|
|
54
|
-
* moved between teams.
|
|
55
|
-
*/
|
|
56
|
-
teamId?: string;
|
|
80
|
+
/** Label names or UUIDs — auto-created on the team if missing. */
|
|
57
81
|
labelIds?: string[];
|
|
82
|
+
/** Parent issue identifier or UUID. */
|
|
58
83
|
parentId?: string;
|
|
84
|
+
/** Project milestone name or UUID — resolved within the project. */
|
|
59
85
|
milestoneId?: string;
|
|
60
|
-
|
|
86
|
+
/** Due date, ISO 8601. */
|
|
61
87
|
dueDate?: string;
|
|
88
|
+
/** Story-points / estimate. */
|
|
62
89
|
estimate?: number;
|
|
63
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Arguments accepted by `GraphQLIssuesService.updateIssue`. Same field
|
|
93
|
+
* shapes as `CreateIssueArgs` (UUID-or-name where applicable), but with
|
|
94
|
+
* `id` required (the issue to update) and the create-only initial-state
|
|
95
|
+
* fields (`teamInput` / `subscriberIds` / `templateId`) omitted.
|
|
96
|
+
*/
|
|
97
|
+
export interface UpdateIssueArgs extends IssueMutationFields {
|
|
98
|
+
/** Issue identifier (e.g. `DEV-3592`) or UUID. Required. */
|
|
99
|
+
id: string;
|
|
100
|
+
/**
|
|
101
|
+
* On update, `null` detaches the issue from its current cycle.
|
|
102
|
+
* (`undefined` leaves it unchanged; a UUID/number/name moves it.)
|
|
103
|
+
*/
|
|
104
|
+
cycleId?: string | null;
|
|
105
|
+
}
|
|
64
106
|
/**
|
|
65
107
|
* Arguments accepted by `GraphQLIssuesService.createIssue`. Most fields
|
|
66
108
|
* may be passed as a Linear UUID OR a name/identifier — the service
|
|
@@ -73,35 +115,13 @@ export interface UpdateIssueArgs {
|
|
|
73
115
|
* `assigneeId` compiled cleanly and silently dropped the field. With
|
|
74
116
|
* the typed shape, `tsc` catches the typo.
|
|
75
117
|
*/
|
|
76
|
-
export interface CreateIssueArgs {
|
|
77
|
-
title?: string;
|
|
78
|
-
/** Team key, name, or UUID. Required unless `templateId` is set. */
|
|
79
|
-
teamId?: string;
|
|
118
|
+
export interface CreateIssueArgs extends IssueMutationFields {
|
|
80
119
|
/** Original team token (key or name) — used in label resolution error messages. */
|
|
81
120
|
teamInput?: string;
|
|
82
|
-
|
|
83
|
-
/** Assignee name, email, alias, or UUID. */
|
|
84
|
-
assigneeId?: string;
|
|
85
|
-
/** Linear priority: 0 (none), 1 (urgent), 2 (high), 3 (medium), 4 (low). */
|
|
86
|
-
priority?: number;
|
|
87
|
-
/** Project name or UUID. */
|
|
88
|
-
projectId?: string;
|
|
89
|
-
/** Status name or UUID — resolved per team. */
|
|
90
|
-
statusId?: string;
|
|
91
|
-
/** Label names or UUIDs — auto-created on the team if missing. */
|
|
92
|
-
labelIds?: string[];
|
|
93
|
-
/** Parent issue identifier or UUID. */
|
|
94
|
-
parentId?: string;
|
|
95
|
-
/** Project milestone name or UUID — resolved within the project. */
|
|
96
|
-
milestoneId?: string;
|
|
97
|
-
/** Cycle number, name, or UUID — resolved per team. */
|
|
121
|
+
/** Cycle number, name, or UUID — resolved per team. (No `null` on create.) */
|
|
98
122
|
cycleId?: string;
|
|
99
123
|
/** Subscriber names, emails, aliases, or UUIDs. */
|
|
100
124
|
subscriberIds?: string[];
|
|
101
|
-
/** Due date, ISO 8601. */
|
|
102
|
-
dueDate?: string;
|
|
103
|
-
/** Story-points / estimate. */
|
|
104
|
-
estimate?: number;
|
|
105
125
|
/** Linear server-side template UUID for `--from-template`. */
|
|
106
126
|
templateId?: string;
|
|
107
127
|
}
|
|
@@ -110,12 +130,26 @@ export interface IssueArchiveOperationResult {
|
|
|
110
130
|
entity?: IssueArchiveEntity;
|
|
111
131
|
lastSyncId: number;
|
|
112
132
|
}
|
|
133
|
+
export interface StartIssueResult {
|
|
134
|
+
issue: LinearIssue;
|
|
135
|
+
previousState?: {
|
|
136
|
+
id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
type: string;
|
|
139
|
+
};
|
|
140
|
+
started: boolean;
|
|
141
|
+
targetState?: {
|
|
142
|
+
id: string;
|
|
143
|
+
name: string;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
113
146
|
export declare class GraphQLIssuesService {
|
|
114
147
|
private readonly graphQLService;
|
|
115
148
|
private readonly linearService;
|
|
116
149
|
constructor(graphQLService: GraphQLService, linearService: LinearService);
|
|
117
150
|
getIssues(limit?: number): Promise<LinearIssue[]>;
|
|
118
151
|
getIssueById(issueId: string): Promise<LinearIssue>;
|
|
152
|
+
startIssue(issueId: string): Promise<StartIssueResult>;
|
|
119
153
|
updateIssue(args: UpdateIssueArgs, labelMode?: string): Promise<LinearIssue>;
|
|
120
154
|
archiveIssue(issueId: string): Promise<IssueArchiveOperationResult>;
|
|
121
155
|
deleteIssue(issueId: string, options?: {
|
|
@@ -124,6 +158,19 @@ export declare class GraphQLIssuesService {
|
|
|
124
158
|
private extractMilestoneNodes;
|
|
125
159
|
private executeUpdateMutation;
|
|
126
160
|
createIssue(args: CreateIssueArgs): Promise<LinearIssue>;
|
|
161
|
+
/**
|
|
162
|
+
* Folds the `@include`-gated `projectsByName` / `projectsById` aliases
|
|
163
|
+
* from a create batch response into the single `projects` field the
|
|
164
|
+
* field-resolution helpers expect. At most one project alias is ever
|
|
165
|
+
* present, since a `--project` input is either a name or a UUID.
|
|
166
|
+
*/
|
|
167
|
+
private foldCreateBatchResult;
|
|
168
|
+
/**
|
|
169
|
+
* Folds the `@include`-gated `projectsByName` / `projectsById` aliases
|
|
170
|
+
* from an update batch response into the single `projects` field the
|
|
171
|
+
* field-resolution helpers expect. See `foldCreateBatchResult`.
|
|
172
|
+
*/
|
|
173
|
+
private foldUpdateBatchResult;
|
|
127
174
|
private resolveCreateFields;
|
|
128
175
|
private executeCreateMutation;
|
|
129
176
|
searchIssues(args: SearchIssueArgs): Promise<LinearIssue[]>;
|
|
@@ -149,9 +196,17 @@ export declare class GraphQLIssuesService {
|
|
|
149
196
|
private applySearchFilters;
|
|
150
197
|
private buildSearchFilter;
|
|
151
198
|
private resolveAssigneeId;
|
|
199
|
+
private resolveDelegateId;
|
|
152
200
|
private resolveUpdateContext;
|
|
153
201
|
private resolveCycleIdForUpdate;
|
|
154
202
|
private resolveStatusIdForUpdate;
|
|
203
|
+
/**
|
|
204
|
+
* Pre-resolve URL/slug-id project inputs to UUIDs before the batch
|
|
205
|
+
* resolver runs. Plain names and UUIDs pass through unchanged; only
|
|
206
|
+
* URL/slug-id forms incur a separate slug→UUID round-trip (the batch
|
|
207
|
+
* query's `name eqIgnoreCase` filter can't match a URL string).
|
|
208
|
+
*/
|
|
209
|
+
private withNormalizedProjectId;
|
|
155
210
|
private buildCreateResolveVariables;
|
|
156
211
|
private resolveParentId;
|
|
157
212
|
transformIssueData(issue: IssueNode | IssueWithCommentsNode): LinearIssue;
|
|
@@ -160,3 +215,4 @@ export declare class GraphQLIssuesService {
|
|
|
160
215
|
private transformIssueHierarchy;
|
|
161
216
|
private transformIssueComments;
|
|
162
217
|
}
|
|
218
|
+
export {};
|