@enrichlayer/el-linear 1.9.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 +139 -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/attachments.js +2 -1
- package/dist/commands/batch.js +18 -21
- package/dist/commands/comments.js +22 -33
- package/dist/commands/config.js +178 -5
- package/dist/commands/cycles.js +2 -1
- package/dist/commands/documents.js +2 -1
- package/dist/commands/graphql.js +4 -6
- 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/issue-id.js +1 -3
- package/dist/commands/issues/branch.js +9 -1
- package/dist/commands/issues/description.js +2 -6
- package/dist/commands/issues/link-references.d.ts +21 -0
- package/dist/commands/issues/link-references.js +171 -0
- package/dist/commands/issues/relations.d.ts +44 -0
- package/dist/commands/issues/relations.js +132 -0
- package/dist/commands/issues.js +269 -309
- package/dist/commands/labels.js +15 -24
- package/dist/commands/profile.js +1 -0
- package/dist/commands/project-milestones.js +13 -20
- package/dist/commands/projects.d.ts +2 -0
- package/dist/commands/projects.js +157 -44
- package/dist/commands/read-shortcut.d.ts +1 -1
- package/dist/commands/read-shortcut.js +28 -8
- package/dist/commands/refs.js +75 -8
- package/dist/commands/releases.js +26 -30
- package/dist/commands/search.js +49 -33
- package/dist/commands/teams.js +2 -1
- package/dist/commands/templates.js +9 -14
- package/dist/commands/users.js +5 -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 +11 -5
- package/dist/main.js +13 -1
- package/dist/queries/attachments-types.d.ts +30 -0
- package/dist/queries/attachments-types.js +5 -0
- package/dist/queries/comments-types.d.ts +55 -0
- package/dist/queries/comments-types.js +5 -0
- package/dist/queries/common.d.ts +2 -2
- package/dist/queries/common.js +8 -0
- package/dist/queries/documents-types.d.ts +62 -0
- package/dist/queries/documents-types.js +9 -0
- package/dist/queries/introspect-types.d.ts +58 -0
- package/dist/queries/introspect-types.js +10 -0
- package/dist/queries/issues-types.d.ts +481 -0
- package/dist/queries/issues-types.js +23 -0
- package/dist/queries/issues.d.ts +51 -10
- package/dist/queries/issues.js +147 -5
- package/dist/queries/labels-types.d.ts +65 -0
- package/dist/queries/labels-types.js +5 -0
- package/dist/queries/project-milestones-types.d.ts +92 -0
- package/dist/queries/project-milestones-types.js +10 -0
- package/dist/queries/project-milestones.d.ts +1 -1
- package/dist/queries/projects-types.d.ts +76 -0
- package/dist/queries/projects-types.js +5 -0
- package/dist/queries/projects.d.ts +2 -0
- package/dist/queries/projects.js +22 -0
- package/dist/queries/releases-types.d.ts +85 -0
- package/dist/queries/releases-types.js +5 -0
- package/dist/queries/search-types.d.ts +102 -0
- package/dist/queries/search-types.js +6 -0
- package/dist/queries/templates-types.d.ts +62 -0
- package/dist/queries/templates-types.js +9 -0
- package/dist/types/linear.d.ts +21 -3
- package/dist/utils/auto-link-references.d.ts +3 -3
- package/dist/utils/auto-link-references.js +30 -34
- 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-attachments-service.js +6 -9
- package/dist/utils/graphql-documents-service.js +19 -25
- package/dist/utils/graphql-issues-service.d.ts +112 -46
- package/dist/utils/graphql-issues-service.js +398 -206
- 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 +82 -2
- package/dist/utils/output.js +76 -11
- 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.d.ts +5 -1
- package/dist/utils/workspace-url.js +53 -7
- package/package.json +2 -2
package/dist/queries/issues.js
CHANGED
|
@@ -41,12 +41,23 @@ export const FILTERED_SEARCH_ISSUES_QUERY = `
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
`;
|
|
44
|
+
/**
|
|
45
|
+
* Batch-resolves a search's team/project/assignee/delegate filter inputs.
|
|
46
|
+
*
|
|
47
|
+
* The `projects` block is `@include`-gated: Linear treats a null filter
|
|
48
|
+
* comparator as "no filter", so an always-on block with an unset
|
|
49
|
+
* `$projectName` would fetch an arbitrary project. (Search resolves a UUID
|
|
50
|
+
* `--project` directly without consulting this block, so only the
|
|
51
|
+
* name-resolution arm is needed here.)
|
|
52
|
+
*/
|
|
44
53
|
export const BATCH_RESOLVE_FOR_SEARCH_QUERY = `
|
|
45
54
|
query BatchResolveForSearch(
|
|
46
55
|
$teamKey: String
|
|
47
56
|
$teamName: String
|
|
48
57
|
$projectName: String
|
|
58
|
+
$hasProjectName: Boolean = false
|
|
49
59
|
$assigneeEmail: String
|
|
60
|
+
$delegateEmail: String
|
|
50
61
|
) {
|
|
51
62
|
teams(
|
|
52
63
|
filter: {
|
|
@@ -64,7 +75,10 @@ export const BATCH_RESOLVE_FOR_SEARCH_QUERY = `
|
|
|
64
75
|
}
|
|
65
76
|
}
|
|
66
77
|
|
|
67
|
-
projects(
|
|
78
|
+
projects(
|
|
79
|
+
filter: { name: { eqIgnoreCase: $projectName } }
|
|
80
|
+
first: 1
|
|
81
|
+
) @include(if: $hasProjectName) {
|
|
68
82
|
nodes {
|
|
69
83
|
id
|
|
70
84
|
name
|
|
@@ -78,6 +92,14 @@ export const BATCH_RESOLVE_FOR_SEARCH_QUERY = `
|
|
|
78
92
|
email
|
|
79
93
|
}
|
|
80
94
|
}
|
|
95
|
+
|
|
96
|
+
delegates: users(filter: { email: { eq: $delegateEmail } }, first: 1) {
|
|
97
|
+
nodes {
|
|
98
|
+
id
|
|
99
|
+
name
|
|
100
|
+
email
|
|
101
|
+
}
|
|
102
|
+
}
|
|
81
103
|
}
|
|
82
104
|
`;
|
|
83
105
|
export const GET_ISSUE_BY_ID_QUERY = `
|
|
@@ -102,14 +124,46 @@ export const GET_ISSUE_BY_IDENTIFIER_QUERY = `
|
|
|
102
124
|
}
|
|
103
125
|
}
|
|
104
126
|
`;
|
|
127
|
+
/**
|
|
128
|
+
* Batch-resolves an update's project/milestone/issue inputs.
|
|
129
|
+
*
|
|
130
|
+
* The project and milestone blocks are `@include`-gated for the same
|
|
131
|
+
* reason as `BATCH_RESOLVE_FOR_CREATE_QUERY`: a null filter comparator is
|
|
132
|
+
* a no-op that returns an arbitrary record. A UUID `--project` is resolved
|
|
133
|
+
* by `id` (`projectsById`) so its milestones are still fetched for
|
|
134
|
+
* `--project-milestone` name resolution; a name uses `projectsByName`.
|
|
135
|
+
*/
|
|
105
136
|
export const BATCH_RESOLVE_FOR_UPDATE_QUERY = `
|
|
106
137
|
query BatchResolveForUpdate(
|
|
107
138
|
$projectName: String
|
|
139
|
+
$projectId: ID
|
|
140
|
+
$hasProjectName: Boolean = false
|
|
141
|
+
$hasProjectId: Boolean = false
|
|
108
142
|
$teamKey: String
|
|
109
143
|
$issueNumber: Float
|
|
110
144
|
$milestoneName: String
|
|
145
|
+
$hasMilestoneName: Boolean = false
|
|
111
146
|
) {
|
|
112
|
-
projects(
|
|
147
|
+
projectsByName: projects(
|
|
148
|
+
filter: { name: { eqIgnoreCase: $projectName } }
|
|
149
|
+
first: 1
|
|
150
|
+
) @include(if: $hasProjectName) {
|
|
151
|
+
nodes {
|
|
152
|
+
id
|
|
153
|
+
name
|
|
154
|
+
projectMilestones {
|
|
155
|
+
nodes {
|
|
156
|
+
id
|
|
157
|
+
name
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
projectsById: projects(
|
|
164
|
+
filter: { id: { eq: $projectId } }
|
|
165
|
+
first: 1
|
|
166
|
+
) @include(if: $hasProjectId) {
|
|
113
167
|
nodes {
|
|
114
168
|
id
|
|
115
169
|
name
|
|
@@ -125,7 +179,7 @@ export const BATCH_RESOLVE_FOR_UPDATE_QUERY = `
|
|
|
125
179
|
milestones: projectMilestones(
|
|
126
180
|
filter: { name: { eq: $milestoneName } }
|
|
127
181
|
first: 1
|
|
128
|
-
) {
|
|
182
|
+
) @include(if: $hasMilestoneName) {
|
|
129
183
|
nodes {
|
|
130
184
|
id
|
|
131
185
|
name
|
|
@@ -187,14 +241,59 @@ export const UPDATE_ISSUE_MUTATION = `
|
|
|
187
241
|
}
|
|
188
242
|
}
|
|
189
243
|
`;
|
|
244
|
+
export const ARCHIVE_ISSUE_MUTATION = `
|
|
245
|
+
mutation ArchiveIssue($id: String!) {
|
|
246
|
+
issueArchive(id: $id) {
|
|
247
|
+
success
|
|
248
|
+
lastSyncId
|
|
249
|
+
entity {
|
|
250
|
+
id
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
`;
|
|
255
|
+
export const DELETE_ISSUE_MUTATION = `
|
|
256
|
+
mutation DeleteIssue($id: String!, $permanentlyDelete: Boolean) {
|
|
257
|
+
issueDelete(id: $id, permanentlyDelete: $permanentlyDelete) {
|
|
258
|
+
success
|
|
259
|
+
lastSyncId
|
|
260
|
+
entity {
|
|
261
|
+
id
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
`;
|
|
266
|
+
/**
|
|
267
|
+
* Batch-resolves a create's team/project/milestone/parent inputs in one
|
|
268
|
+
* round-trip.
|
|
269
|
+
*
|
|
270
|
+
* The project and milestone blocks are gated behind `@include` directives
|
|
271
|
+
* rather than left always-on. Linear treats a null filter comparator
|
|
272
|
+
* (`{ name: { eqIgnoreCase: null } }`) as "no filter" — so an always-on
|
|
273
|
+
* `projects` block with an unset `$projectName` returns an *arbitrary*
|
|
274
|
+
* project, which the caller would then mistake for the user's project
|
|
275
|
+
* (e.g. auto-switching the team to that unrelated project's team). The
|
|
276
|
+
* `has*` booleans ensure a block is fetched only when its input exists.
|
|
277
|
+
*
|
|
278
|
+
* A UUID `--project` is resolved by `id` (`projectsById`) so its team
|
|
279
|
+
* associations are still fetched for team-project validation; a name is
|
|
280
|
+
* resolved by `name` (`projectsByName`). The two are mutually exclusive,
|
|
281
|
+
* but GraphQL forbids two same-aliased fields with differing arguments,
|
|
282
|
+
* so they carry distinct aliases and the service folds whichever ran
|
|
283
|
+
* into `resolveResult.projects`.
|
|
284
|
+
*/
|
|
190
285
|
export const BATCH_RESOLVE_FOR_CREATE_QUERY = `
|
|
191
286
|
query BatchResolveForCreate(
|
|
192
287
|
$teamKey: String
|
|
193
288
|
$teamName: String
|
|
194
289
|
$projectName: String
|
|
290
|
+
$projectId: ID
|
|
291
|
+
$hasProjectName: Boolean = false
|
|
292
|
+
$hasProjectId: Boolean = false
|
|
195
293
|
$parentTeamKey: String
|
|
196
294
|
$parentIssueNumber: Float
|
|
197
295
|
$milestoneName: String
|
|
296
|
+
$hasMilestoneName: Boolean = false
|
|
198
297
|
) {
|
|
199
298
|
teams(
|
|
200
299
|
filter: {
|
|
@@ -212,7 +311,26 @@ export const BATCH_RESOLVE_FOR_CREATE_QUERY = `
|
|
|
212
311
|
}
|
|
213
312
|
}
|
|
214
313
|
|
|
215
|
-
projects(
|
|
314
|
+
projectsByName: projects(
|
|
315
|
+
filter: { name: { eqIgnoreCase: $projectName } }
|
|
316
|
+
first: 1
|
|
317
|
+
) @include(if: $hasProjectName) {
|
|
318
|
+
nodes {
|
|
319
|
+
id
|
|
320
|
+
name
|
|
321
|
+
teams {
|
|
322
|
+
nodes { id key }
|
|
323
|
+
}
|
|
324
|
+
projectMilestones {
|
|
325
|
+
nodes { id name }
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
projectsById: projects(
|
|
331
|
+
filter: { id: { eq: $projectId } }
|
|
332
|
+
first: 1
|
|
333
|
+
) @include(if: $hasProjectId) {
|
|
216
334
|
nodes {
|
|
217
335
|
id
|
|
218
336
|
name
|
|
@@ -228,7 +346,7 @@ export const BATCH_RESOLVE_FOR_CREATE_QUERY = `
|
|
|
228
346
|
milestones: projectMilestones(
|
|
229
347
|
filter: { name: { eq: $milestoneName } }
|
|
230
348
|
first: 1
|
|
231
|
-
) {
|
|
349
|
+
) @include(if: $hasMilestoneName) {
|
|
232
350
|
nodes {
|
|
233
351
|
id
|
|
234
352
|
name
|
|
@@ -310,6 +428,30 @@ export const GET_ISSUE_TEAM_QUERY = `
|
|
|
310
428
|
}
|
|
311
429
|
}
|
|
312
430
|
`;
|
|
431
|
+
export const GET_ISSUE_START_CONTEXT_QUERY = `
|
|
432
|
+
query GetIssueStartContext($id: String!) {
|
|
433
|
+
issue(id: $id) {
|
|
434
|
+
id
|
|
435
|
+
identifier
|
|
436
|
+
state { id name type }
|
|
437
|
+
team { id key name }
|
|
438
|
+
delegate { id name url }
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
`;
|
|
442
|
+
export const TEAM_STARTED_STATUSES_QUERY = `
|
|
443
|
+
query TeamStartedStatuses($teamId: String!) {
|
|
444
|
+
team(id: $teamId) {
|
|
445
|
+
states(filter: { type: { eq: "started" } }) {
|
|
446
|
+
nodes {
|
|
447
|
+
id
|
|
448
|
+
name
|
|
449
|
+
position
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
`;
|
|
313
455
|
export const ISSUE_RELATION_CREATE_MUTATION = `
|
|
314
456
|
mutation IssueRelationCreate($input: IssueRelationCreateInput!) {
|
|
315
457
|
issueRelationCreate(input: $input) {
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed response shapes for the queries in `./labels.ts`.
|
|
3
|
+
* See `./issues-types.ts` for the rationale (ALL-937).
|
|
4
|
+
*/
|
|
5
|
+
interface LabelTeamRef {
|
|
6
|
+
id: string;
|
|
7
|
+
key: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
interface LabelParentRef {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
}
|
|
14
|
+
/** Mirrors the issueLabel selection set on `CREATE_LABEL_MUTATION`. */
|
|
15
|
+
interface CreatedLabelNode {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
color: string;
|
|
19
|
+
team: LabelTeamRef | null;
|
|
20
|
+
parent: LabelParentRef | null;
|
|
21
|
+
}
|
|
22
|
+
/** Mirrors the issueLabel selection set on `RETIRE_LABEL_MUTATION`. */
|
|
23
|
+
interface RetiredLabelNode {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
color: string;
|
|
27
|
+
retiredAt: string | null;
|
|
28
|
+
team: LabelTeamRef | null;
|
|
29
|
+
}
|
|
30
|
+
/** Mirrors the issueLabel selection set on `RESTORE_LABEL_MUTATION`. */
|
|
31
|
+
interface RestoredLabelNode {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
color: string;
|
|
35
|
+
team: LabelTeamRef | null;
|
|
36
|
+
}
|
|
37
|
+
interface ParentLabelNode {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
isGroup: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface FindParentLabelResponse {
|
|
43
|
+
issueLabels: {
|
|
44
|
+
nodes: ParentLabelNode[];
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export interface CreateLabelResponse {
|
|
48
|
+
issueLabelCreate: {
|
|
49
|
+
success: boolean;
|
|
50
|
+
issueLabel: CreatedLabelNode | null;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export interface RetireLabelResponse {
|
|
54
|
+
issueLabelRetire: {
|
|
55
|
+
success: boolean;
|
|
56
|
+
issueLabel: RetiredLabelNode | null;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface RestoreLabelResponse {
|
|
60
|
+
issueLabelRestore: {
|
|
61
|
+
success: boolean;
|
|
62
|
+
issueLabel: RestoredLabelNode | null;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed response shapes for the queries in `./project-milestones.ts`.
|
|
3
|
+
* See `./issues-types.ts` for the rationale (ALL-937).
|
|
4
|
+
*
|
|
5
|
+
* The selection sets vary across queries — some include `description`
|
|
6
|
+
* + `createdAt`, others only the lookup-relevant fields. Modelled as
|
|
7
|
+
* a base `MilestoneBaseRef` with extension shapes per query so each
|
|
8
|
+
* consumer reads only what was actually selected.
|
|
9
|
+
*/
|
|
10
|
+
import type { IssueNode } from "./issues-types.js";
|
|
11
|
+
interface MilestoneProjectRef {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Mirrors the milestone selection set in `LIST_PROJECT_MILESTONES_QUERY`
|
|
17
|
+
* — full milestone fields without the project-back-reference.
|
|
18
|
+
*/
|
|
19
|
+
interface MilestoneListNode {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
description: string | null;
|
|
23
|
+
targetDate: string | null;
|
|
24
|
+
sortOrder: number;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Mirrors the milestone selection set in `GET_PROJECT_MILESTONE_BY_ID_QUERY`
|
|
30
|
+
* — list shape + project + issues connection.
|
|
31
|
+
*/
|
|
32
|
+
interface MilestoneDetailNode extends MilestoneListNode {
|
|
33
|
+
project: MilestoneProjectRef;
|
|
34
|
+
issues: {
|
|
35
|
+
nodes: IssueNode[];
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Mirrors the milestone selection set in `FIND_PROJECT_MILESTONE_BY_NAME_*`
|
|
40
|
+
* — minimal lookup shape with project back-reference.
|
|
41
|
+
*/
|
|
42
|
+
export interface MilestoneLookupNode {
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
targetDate: string | null;
|
|
46
|
+
sortOrder: number;
|
|
47
|
+
project: MilestoneProjectRef;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Mirrors the milestone selection set on the create / update mutations —
|
|
51
|
+
* list shape + project (no issues connection).
|
|
52
|
+
*/
|
|
53
|
+
interface MutatedMilestoneNode extends MilestoneListNode {
|
|
54
|
+
project: MilestoneProjectRef;
|
|
55
|
+
}
|
|
56
|
+
export interface ListProjectMilestonesResponse {
|
|
57
|
+
project: {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
projectMilestones: {
|
|
61
|
+
nodes: MilestoneListNode[];
|
|
62
|
+
};
|
|
63
|
+
} | null;
|
|
64
|
+
}
|
|
65
|
+
export interface GetProjectMilestoneByIdResponse {
|
|
66
|
+
projectMilestone: MilestoneDetailNode | null;
|
|
67
|
+
}
|
|
68
|
+
export interface FindProjectMilestoneScopedResponse {
|
|
69
|
+
project: {
|
|
70
|
+
projectMilestones: {
|
|
71
|
+
nodes: MilestoneLookupNode[];
|
|
72
|
+
};
|
|
73
|
+
} | null;
|
|
74
|
+
}
|
|
75
|
+
export interface FindProjectMilestoneGlobalResponse {
|
|
76
|
+
projectMilestones: {
|
|
77
|
+
nodes: MilestoneLookupNode[];
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export interface CreateProjectMilestoneResponse {
|
|
81
|
+
projectMilestoneCreate: {
|
|
82
|
+
success: boolean;
|
|
83
|
+
projectMilestone: MutatedMilestoneNode | null;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export interface UpdateProjectMilestoneResponse {
|
|
87
|
+
projectMilestoneUpdate: {
|
|
88
|
+
success: boolean;
|
|
89
|
+
projectMilestone: MutatedMilestoneNode | null;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed response shapes for the queries in `./project-milestones.ts`.
|
|
3
|
+
* See `./issues-types.ts` for the rationale (ALL-937).
|
|
4
|
+
*
|
|
5
|
+
* The selection sets vary across queries — some include `description`
|
|
6
|
+
* + `createdAt`, others only the lookup-relevant fields. Modelled as
|
|
7
|
+
* a base `MilestoneBaseRef` with extension shapes per query so each
|
|
8
|
+
* consumer reads only what was actually selected.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const LIST_PROJECT_MILESTONES_QUERY = "\n query ListProjectMilestones($projectId: String!, $first: Int!) {\n project(id: $projectId) {\n id\n name\n projectMilestones(first: $first) {\n nodes {\n id\n name\n description\n targetDate\n sortOrder\n createdAt\n updatedAt\n }\n }\n }\n }\n";
|
|
2
|
-
export declare const GET_PROJECT_MILESTONE_BY_ID_QUERY = "\n query GetProjectMilestone($id: String!, $issuesFirst: Int) {\n projectMilestone(id: $id) {\n id\n name\n description\n targetDate\n sortOrder\n createdAt\n updatedAt\n project {\n id\n name\n }\n issues(first: $issuesFirst) {\n nodes {\n \n \n id\n identifier\n title\n description\n summary { content generationStatus }\n branchName\n priority\n estimate\n dueDate\n url\n createdAt\n updatedAt\n\n \n state {\n id\n name\n }\n\n \n assignee {\n id\n name\n url\n }\n\n \n team {\n id\n key\n name\n }\n\n \n project {\n id\n name\n }\n\n \n labels {\n nodes {\n id\n name\n }\n }\n\n \n cycle {\n id\n name\n number\n }\n\n \n projectMilestone {\n id\n name\n targetDate\n }\n\n \n parent {\n id\n identifier\n title\n }\n\n \n children {\n nodes {\n id\n identifier\n title\n }\n }\n\n\n }\n }\n }\n }\n";
|
|
2
|
+
export declare const GET_PROJECT_MILESTONE_BY_ID_QUERY = "\n query GetProjectMilestone($id: String!, $issuesFirst: Int) {\n projectMilestone(id: $id) {\n id\n name\n description\n targetDate\n sortOrder\n createdAt\n updatedAt\n project {\n id\n name\n }\n issues(first: $issuesFirst) {\n nodes {\n \n \n id\n identifier\n title\n description\n summary { content generationStatus }\n branchName\n priority\n estimate\n dueDate\n url\n createdAt\n updatedAt\n\n \n state {\n id\n name\n }\n\n \n assignee {\n id\n name\n url\n }\n\n \n delegate {\n id\n name\n url\n }\n\n \n team {\n id\n key\n name\n }\n\n \n project {\n id\n name\n }\n\n \n labels {\n nodes {\n id\n name\n }\n }\n\n \n cycle {\n id\n name\n number\n }\n\n \n projectMilestone {\n id\n name\n targetDate\n }\n\n \n parent {\n id\n identifier\n title\n }\n\n \n children {\n nodes {\n id\n identifier\n title\n }\n }\n\n\n }\n }\n }\n }\n";
|
|
3
3
|
export declare const FIND_PROJECT_MILESTONE_BY_NAME_SCOPED = "\n query FindProjectMilestoneScoped($name: String!, $projectId: String!) {\n project(id: $projectId) {\n projectMilestones(filter: { name: { eq: $name } }, first: 10) {\n nodes {\n id\n name\n targetDate\n sortOrder\n project {\n id\n name\n }\n }\n }\n }\n }\n";
|
|
4
4
|
export declare const FIND_PROJECT_MILESTONE_BY_NAME_GLOBAL = "\n query FindProjectMilestoneGlobal($name: String!) {\n projectMilestones(filter: { name: { eq: $name } }, first: 10) {\n nodes {\n id\n name\n targetDate\n sortOrder\n project {\n id\n name\n }\n }\n }\n }\n";
|
|
5
5
|
export declare const CREATE_PROJECT_MILESTONE_MUTATION = "\n mutation CreateProjectMilestone($projectId: String!, $name: String!, $description: String, $targetDate: TimelessDate) {\n projectMilestoneCreate(input: {\n projectId: $projectId\n name: $name\n description: $description\n targetDate: $targetDate\n }) {\n success\n projectMilestone {\n id\n name\n description\n targetDate\n sortOrder\n createdAt\n updatedAt\n project {\n id\n name\n }\n }\n }\n }\n";
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed response shapes for the queries in `./projects.ts`.
|
|
3
|
+
* See `./issues-types.ts` for the rationale (ALL-937).
|
|
4
|
+
*/
|
|
5
|
+
interface ProjectTeamRef {
|
|
6
|
+
id: string;
|
|
7
|
+
key: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
interface ProjectBaseNode {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
teams: {
|
|
14
|
+
nodes: ProjectTeamRef[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Mirrors the project selection set used by `SEARCH_PROJECTS_BY_NAME_QUERY`
|
|
19
|
+
* and `CREATE_PROJECT_MUTATION` — base fields + state.
|
|
20
|
+
*/
|
|
21
|
+
interface ProjectWithStateNode extends ProjectBaseNode {
|
|
22
|
+
state: string;
|
|
23
|
+
}
|
|
24
|
+
interface ProjectIssueRef {
|
|
25
|
+
id: string;
|
|
26
|
+
identifier: string;
|
|
27
|
+
title: string;
|
|
28
|
+
}
|
|
29
|
+
interface ProjectWithIssuesNode extends ProjectBaseNode {
|
|
30
|
+
issues: {
|
|
31
|
+
nodes: ProjectIssueRef[];
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export interface ProjectByIdResponse {
|
|
35
|
+
project: ProjectBaseNode | null;
|
|
36
|
+
}
|
|
37
|
+
export interface GetProjectResponse {
|
|
38
|
+
projects: {
|
|
39
|
+
nodes: ProjectBaseNode[];
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export interface GetProjectTeamIssuesResponse {
|
|
43
|
+
project: ProjectWithIssuesNode | null;
|
|
44
|
+
}
|
|
45
|
+
export interface SearchProjectsByNameResponse {
|
|
46
|
+
projects: {
|
|
47
|
+
nodes: ProjectWithStateNode[];
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export interface CreateProjectResponse {
|
|
51
|
+
projectCreate: {
|
|
52
|
+
success: boolean;
|
|
53
|
+
project: ProjectWithStateNode | null;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface UpdateProjectResponse {
|
|
57
|
+
projectUpdate: {
|
|
58
|
+
success: boolean;
|
|
59
|
+
project: ProjectBaseNode | null;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
interface ProjectArchiveEntity {
|
|
63
|
+
id: string;
|
|
64
|
+
}
|
|
65
|
+
interface ProjectArchivePayload {
|
|
66
|
+
success: boolean;
|
|
67
|
+
lastSyncId: number;
|
|
68
|
+
entity: ProjectArchiveEntity | null;
|
|
69
|
+
}
|
|
70
|
+
export interface ArchiveProjectResponse {
|
|
71
|
+
projectArchive: ProjectArchivePayload;
|
|
72
|
+
}
|
|
73
|
+
export interface DeleteProjectResponse {
|
|
74
|
+
projectDelete: ProjectArchivePayload;
|
|
75
|
+
}
|
|
76
|
+
export {};
|
|
@@ -5,3 +5,5 @@ export declare const GET_PROJECT_TEAM_ISSUES_QUERY = "\n query GetProjectTeamIs
|
|
|
5
5
|
export declare const SEARCH_PROJECTS_BY_NAME_QUERY = "\n query SearchProjectsByName($name: String!) {\n projects(filter: { name: { containsIgnoreCase: $name } }, first: 10) {\n nodes {\n id\n name\n state\n teams {\n nodes { id key name }\n }\n }\n }\n }\n";
|
|
6
6
|
export declare const CREATE_PROJECT_MUTATION = "\n mutation CreateProject($input: ProjectCreateInput!) {\n projectCreate(input: $input) {\n success\n project {\n id\n name\n state\n teams {\n nodes { id key name }\n }\n }\n }\n }\n";
|
|
7
7
|
export declare const UPDATE_PROJECT_MUTATION = "\n mutation UpdateProject($id: String!, $input: ProjectUpdateInput!) {\n projectUpdate(id: $id, input: $input) {\n success\n project {\n id\n name\n teams {\n nodes {\n id\n key\n name\n }\n }\n }\n }\n }\n";
|
|
8
|
+
export declare const ARCHIVE_PROJECT_MUTATION = "\n mutation ArchiveProject($id: String!) {\n projectArchive(id: $id) {\n success\n lastSyncId\n entity {\n id\n }\n }\n }\n";
|
|
9
|
+
export declare const DELETE_PROJECT_MUTATION = "\n mutation DeleteProject($id: String!) {\n projectDelete(id: $id) {\n success\n lastSyncId\n entity {\n id\n }\n }\n }\n";
|
package/dist/queries/projects.js
CHANGED
|
@@ -102,3 +102,25 @@ export const UPDATE_PROJECT_MUTATION = `
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
`;
|
|
105
|
+
export const ARCHIVE_PROJECT_MUTATION = `
|
|
106
|
+
mutation ArchiveProject($id: String!) {
|
|
107
|
+
projectArchive(id: $id) {
|
|
108
|
+
success
|
|
109
|
+
lastSyncId
|
|
110
|
+
entity {
|
|
111
|
+
id
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
`;
|
|
116
|
+
export const DELETE_PROJECT_MUTATION = `
|
|
117
|
+
mutation DeleteProject($id: String!) {
|
|
118
|
+
projectDelete(id: $id) {
|
|
119
|
+
success
|
|
120
|
+
lastSyncId
|
|
121
|
+
entity {
|
|
122
|
+
id
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
`;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed response shapes for the queries in `./releases.ts`.
|
|
3
|
+
* See `./issues-types.ts` for the rationale (ALL-937).
|
|
4
|
+
*/
|
|
5
|
+
interface ReleaseStageRef {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
type: string;
|
|
9
|
+
color: string | null;
|
|
10
|
+
}
|
|
11
|
+
interface ReleasePipelineRef {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
}
|
|
15
|
+
interface ReleaseDocumentRef {
|
|
16
|
+
id: string;
|
|
17
|
+
title: string;
|
|
18
|
+
slugId: string;
|
|
19
|
+
}
|
|
20
|
+
/** Mirrors the release selection set used by `GET_RELEASES_QUERY`. */
|
|
21
|
+
export interface ReleaseListNode {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string | null;
|
|
25
|
+
version: string | null;
|
|
26
|
+
url: string | null;
|
|
27
|
+
startDate: string | null;
|
|
28
|
+
targetDate: string | null;
|
|
29
|
+
startedAt: string | null;
|
|
30
|
+
completedAt: string | null;
|
|
31
|
+
canceledAt: string | null;
|
|
32
|
+
stage: ReleaseStageRef | null;
|
|
33
|
+
pipeline: ReleasePipelineRef | null;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
}
|
|
37
|
+
/** Mirrors `GET_RELEASE_BY_ID_QUERY` — adds `documents`. */
|
|
38
|
+
export interface ReleaseDetailNode extends ReleaseListNode {
|
|
39
|
+
documents: {
|
|
40
|
+
nodes: ReleaseDocumentRef[];
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Mirrors the release selection set on `CREATE_RELEASE_MUTATION` —
|
|
45
|
+
* a subset of `ReleaseListNode` (no startDate/targetDate/lifecycle
|
|
46
|
+
* timestamps; no documents).
|
|
47
|
+
*/
|
|
48
|
+
export interface CreatedReleaseNode {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
description: string | null;
|
|
52
|
+
version: string | null;
|
|
53
|
+
url: string | null;
|
|
54
|
+
stage: ReleaseStageRef | null;
|
|
55
|
+
pipeline: ReleasePipelineRef | null;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
}
|
|
59
|
+
interface ReleasePipelineNode {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
stages: {
|
|
63
|
+
nodes: ReleaseStageRef[];
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export interface GetReleasesResponse {
|
|
67
|
+
releases: {
|
|
68
|
+
nodes: ReleaseListNode[];
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export interface GetReleaseByIdResponse {
|
|
72
|
+
release: ReleaseDetailNode | null;
|
|
73
|
+
}
|
|
74
|
+
export interface CreateReleaseResponse {
|
|
75
|
+
releaseCreate: {
|
|
76
|
+
success: boolean;
|
|
77
|
+
release: CreatedReleaseNode | null;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export interface GetReleasePipelinesResponse {
|
|
81
|
+
releasePipelines: {
|
|
82
|
+
nodes: ReleasePipelineNode[];
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export {};
|