@enrichlayer/el-linear 1.9.0 → 1.10.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.
Files changed (60) hide show
  1. package/README.md +13 -0
  2. package/dist/commands/attachments.js +2 -1
  3. package/dist/commands/comments.js +17 -28
  4. package/dist/commands/cycles.js +2 -1
  5. package/dist/commands/documents.js +2 -1
  6. package/dist/commands/graphql.js +4 -6
  7. package/dist/commands/issue-id.js +1 -3
  8. package/dist/commands/issues/description.js +2 -6
  9. package/dist/commands/issues/link-references.d.ts +21 -0
  10. package/dist/commands/issues/link-references.js +171 -0
  11. package/dist/commands/issues/relations.d.ts +55 -0
  12. package/dist/commands/issues/relations.js +132 -0
  13. package/dist/commands/issues.js +65 -284
  14. package/dist/commands/labels.js +13 -23
  15. package/dist/commands/project-milestones.js +13 -20
  16. package/dist/commands/projects.js +67 -38
  17. package/dist/commands/refs.js +8 -0
  18. package/dist/commands/releases.js +26 -30
  19. package/dist/commands/search.js +21 -30
  20. package/dist/commands/teams.js +2 -1
  21. package/dist/commands/templates.js +9 -14
  22. package/dist/commands/users.js +2 -1
  23. package/dist/config/resolver.js +2 -3
  24. package/dist/queries/attachments-types.d.ts +30 -0
  25. package/dist/queries/attachments-types.js +5 -0
  26. package/dist/queries/comments-types.d.ts +49 -0
  27. package/dist/queries/comments-types.js +5 -0
  28. package/dist/queries/documents-types.d.ts +61 -0
  29. package/dist/queries/documents-types.js +9 -0
  30. package/dist/queries/introspect-types.d.ts +57 -0
  31. package/dist/queries/introspect-types.js +10 -0
  32. package/dist/queries/issues-types.d.ts +416 -0
  33. package/dist/queries/issues-types.js +23 -0
  34. package/dist/queries/issues.d.ts +2 -0
  35. package/dist/queries/issues.js +22 -0
  36. package/dist/queries/labels-types.d.ts +64 -0
  37. package/dist/queries/labels-types.js +5 -0
  38. package/dist/queries/project-milestones-types.d.ts +91 -0
  39. package/dist/queries/project-milestones-types.js +10 -0
  40. package/dist/queries/projects-types.d.ts +75 -0
  41. package/dist/queries/projects-types.js +5 -0
  42. package/dist/queries/projects.d.ts +2 -0
  43. package/dist/queries/projects.js +22 -0
  44. package/dist/queries/releases-types.d.ts +84 -0
  45. package/dist/queries/releases-types.js +5 -0
  46. package/dist/queries/search-types.d.ts +86 -0
  47. package/dist/queries/search-types.js +6 -0
  48. package/dist/queries/templates-types.d.ts +61 -0
  49. package/dist/queries/templates-types.js +9 -0
  50. package/dist/types/linear.d.ts +8 -2
  51. package/dist/utils/auto-link-references.js +29 -24
  52. package/dist/utils/graphql-attachments-service.js +6 -9
  53. package/dist/utils/graphql-documents-service.js +19 -25
  54. package/dist/utils/graphql-issues-service.d.ts +12 -2
  55. package/dist/utils/graphql-issues-service.js +151 -172
  56. package/dist/utils/output.d.ts +2 -0
  57. package/dist/utils/output.js +16 -6
  58. package/dist/utils/workspace-url.d.ts +5 -1
  59. package/dist/utils/workspace-url.js +35 -5
  60. package/package.json +1 -1
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Typed response shapes for the queries in `./documents.ts`.
3
+ *
4
+ * Mirrors `DOCUMENT_FRAGMENT` so the consumer in
5
+ * `graphql-documents-service.ts` can read fields without recursive
6
+ * `Record<string, unknown>` casts. See `./issues-types.ts` for the
7
+ * full rationale and pattern (ALL-937).
8
+ */
9
+ export interface DocumentCreatorRef {
10
+ id: string;
11
+ name: string;
12
+ }
13
+ export interface DocumentProjectRef {
14
+ id: string;
15
+ name: string;
16
+ }
17
+ export interface DocumentIssueRef {
18
+ id: string;
19
+ identifier: string;
20
+ title: string;
21
+ }
22
+ /** Mirrors `DOCUMENT_FRAGMENT` from `src/queries/documents.ts`. */
23
+ export interface DocumentNode {
24
+ id: string;
25
+ title: string;
26
+ content: string | null;
27
+ slugId: string | null;
28
+ url: string | null;
29
+ icon: string | null;
30
+ color: string | null;
31
+ createdAt: string | null;
32
+ updatedAt: string | null;
33
+ creator: DocumentCreatorRef | null;
34
+ project: DocumentProjectRef | null;
35
+ issue: DocumentIssueRef | null;
36
+ }
37
+ export interface CreateDocumentResponse {
38
+ documentCreate: {
39
+ success: boolean;
40
+ document: DocumentNode | null;
41
+ };
42
+ }
43
+ export interface UpdateDocumentResponse {
44
+ documentUpdate: {
45
+ success: boolean;
46
+ document: DocumentNode | null;
47
+ };
48
+ }
49
+ export interface GetDocumentResponse {
50
+ document: DocumentNode | null;
51
+ }
52
+ export interface ListDocumentsResponse {
53
+ documents: {
54
+ nodes: DocumentNode[];
55
+ };
56
+ }
57
+ export interface DeleteDocumentResponse {
58
+ documentDelete: {
59
+ success: boolean;
60
+ };
61
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Typed response shapes for the queries in `./documents.ts`.
3
+ *
4
+ * Mirrors `DOCUMENT_FRAGMENT` so the consumer in
5
+ * `graphql-documents-service.ts` can read fields without recursive
6
+ * `Record<string, unknown>` casts. See `./issues-types.ts` for the
7
+ * full rationale and pattern (ALL-937).
8
+ */
9
+ export {};
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Typed response shapes for `INTROSPECT_TYPE_QUERY` /
3
+ * `INTROSPECT_ROOT_QUERY`. See `./issues-types.ts` for the
4
+ * rationale (ALL-937).
5
+ *
6
+ * GraphQL introspection types are recursive (a type contains
7
+ * fields whose types contain fields…). We model the recursion
8
+ * shallowly — only as deep as the queries actually select.
9
+ */
10
+ export interface IntrospectTypeRefShallow {
11
+ name: string | null;
12
+ kind: string;
13
+ ofType: {
14
+ name: string | null;
15
+ } | null;
16
+ }
17
+ export interface IntrospectTypeRef {
18
+ name: string | null;
19
+ kind: string;
20
+ ofType: IntrospectTypeRefShallow | null;
21
+ }
22
+ export interface IntrospectArg {
23
+ name: string;
24
+ type: IntrospectTypeRef;
25
+ }
26
+ export interface IntrospectField {
27
+ name: string;
28
+ description: string | null;
29
+ type: IntrospectTypeRef;
30
+ args: IntrospectArg[];
31
+ }
32
+ export interface IntrospectEnumValue {
33
+ name: string;
34
+ description: string | null;
35
+ }
36
+ export interface IntrospectInputField {
37
+ name: string;
38
+ type: IntrospectTypeRef;
39
+ }
40
+ /** Mirrors the inner `__type` shape selected by `INTROSPECT_TYPE_QUERY`. */
41
+ export interface IntrospectTypeNode {
42
+ name: string;
43
+ kind: string;
44
+ description: string | null;
45
+ fields: IntrospectField[] | null;
46
+ enumValues: IntrospectEnumValue[] | null;
47
+ inputFields: IntrospectInputField[] | null;
48
+ }
49
+ export interface IntrospectTypeResponse {
50
+ __type: IntrospectTypeNode | null;
51
+ }
52
+ /** `INTROSPECT_ROOT_QUERY` selects only fields (with args). */
53
+ export interface IntrospectRootResponse {
54
+ __type: {
55
+ fields: IntrospectField[];
56
+ } | null;
57
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Typed response shapes for `INTROSPECT_TYPE_QUERY` /
3
+ * `INTROSPECT_ROOT_QUERY`. See `./issues-types.ts` for the
4
+ * rationale (ALL-937).
5
+ *
6
+ * GraphQL introspection types are recursive (a type contains
7
+ * fields whose types contain fields…). We model the recursion
8
+ * shallowly — only as deep as the queries actually select.
9
+ */
10
+ export {};
@@ -0,0 +1,416 @@
1
+ /**
2
+ * Typed response shapes for the GraphQL queries in `./issues.ts`.
3
+ *
4
+ * Pre-fix, every consumer used `GraphQLResponseData` (a recursive
5
+ * `Record<string, unknown>`) and re-cast every field with `as
6
+ * string` / `as GraphQLResponseData`. A renamed Linear field would
7
+ * silently produce `undefined` at runtime; transformers had no
8
+ * compile-time check that they were reading the fields the queries
9
+ * actually requested.
10
+ *
11
+ * These interfaces mirror the shape of `COMPLETE_ISSUE_FRAGMENT` /
12
+ * `COMPLETE_ISSUE_WITH_COMMENTS_FRAGMENT` (defined in
13
+ * `./common.ts`) so the transformer can consume a typed node and
14
+ * the compiler catches drift between query and consumer.
15
+ *
16
+ * Pattern for adding new types: define a `Foo` node interface +
17
+ * a `GetFooResponse` (or list-shape) wrapper. Co-locate them in
18
+ * this file or a sibling `*-types.ts` so they live next to the
19
+ * query string.
20
+ *
21
+ * Refs ALL-937.
22
+ */
23
+ /** A reference to a related entity — id + display fields. */
24
+ export interface IdNameRef {
25
+ id: string;
26
+ name: string;
27
+ }
28
+ export interface IdKeyNameRef {
29
+ id: string;
30
+ key: string;
31
+ name: string;
32
+ }
33
+ export interface IdIdentifierTitleRef {
34
+ id: string;
35
+ identifier: string;
36
+ title: string;
37
+ }
38
+ export interface AssigneeNode {
39
+ id: string;
40
+ name: string;
41
+ url?: string;
42
+ }
43
+ export interface CommentNode {
44
+ id: string;
45
+ body: string;
46
+ createdAt: string;
47
+ updatedAt: string;
48
+ user: AssigneeNode | null;
49
+ }
50
+ export interface CycleNode {
51
+ id: string;
52
+ name: string | null;
53
+ number: number;
54
+ }
55
+ export interface ProjectMilestoneNode {
56
+ id: string;
57
+ name: string;
58
+ targetDate: string | null;
59
+ }
60
+ export interface IssueSummary {
61
+ content: unknown;
62
+ generationStatus: "completed" | "pending" | "failed" | string;
63
+ }
64
+ /**
65
+ * Mirrors `COMPLETE_ISSUE_FRAGMENT` from `src/queries/common.ts`.
66
+ * The transformer in `graphql-issues-service.ts` reads these
67
+ * fields. Keep the shapes in lock-step — if you add a field to
68
+ * the fragment, add it here.
69
+ */
70
+ export interface IssueNode {
71
+ id: string;
72
+ identifier: string;
73
+ title: string;
74
+ description: string | null;
75
+ summary: IssueSummary | null;
76
+ branchName: string;
77
+ priority: number;
78
+ estimate: number | null;
79
+ dueDate: string | null;
80
+ url: string;
81
+ createdAt: string;
82
+ updatedAt: string;
83
+ state: IdNameRef | null;
84
+ assignee: AssigneeNode | null;
85
+ team: IdKeyNameRef | null;
86
+ project: IdNameRef | null;
87
+ labels: {
88
+ nodes: IdNameRef[];
89
+ };
90
+ cycle: CycleNode | null;
91
+ projectMilestone: ProjectMilestoneNode | null;
92
+ parent: IdIdentifierTitleRef | null;
93
+ children: {
94
+ nodes: IdIdentifierTitleRef[];
95
+ };
96
+ }
97
+ /**
98
+ * Mirrors `COMPLETE_ISSUE_WITH_COMMENTS_FRAGMENT` — same as
99
+ * `IssueNode` but with the comments connection materialized.
100
+ */
101
+ export interface IssueWithCommentsNode extends IssueNode {
102
+ comments: {
103
+ nodes: CommentNode[];
104
+ };
105
+ }
106
+ /** Response shape for `GET_ISSUE_BY_ID_QUERY`. */
107
+ export interface GetIssueByIdResponse {
108
+ issue: IssueWithCommentsNode | null;
109
+ }
110
+ /** Response shape for `GET_ISSUE_BY_IDENTIFIER_QUERY`. */
111
+ export interface GetIssueByIdentifierResponse {
112
+ issues: {
113
+ nodes: IssueWithCommentsNode[];
114
+ };
115
+ }
116
+ /** Response shape for `GET_ISSUES_QUERY`. */
117
+ export interface GetIssuesResponse {
118
+ issues: {
119
+ nodes: IssueNode[];
120
+ };
121
+ }
122
+ /** Response shape for `SEARCH_ISSUES_QUERY` (full-text). */
123
+ export interface SearchIssuesResponse {
124
+ searchIssues: {
125
+ nodes: IssueNode[];
126
+ };
127
+ }
128
+ /**
129
+ * Response shape for `FILTERED_SEARCH_ISSUES_QUERY`. Same shape as
130
+ * `GetIssuesResponse` (both return `issues.nodes`) but kept as a
131
+ * named alias so the call site documents intent.
132
+ */
133
+ export type FilteredSearchIssuesResponse = GetIssuesResponse;
134
+ /** Response shape for `CREATE_ISSUE_MUTATION`. */
135
+ export interface CreateIssueResponse {
136
+ issueCreate: {
137
+ success: boolean;
138
+ issue: IssueNode | null;
139
+ };
140
+ }
141
+ /** Response shape for `UPDATE_ISSUE_MUTATION`. */
142
+ export interface UpdateIssueResponse {
143
+ issueUpdate: {
144
+ success: boolean;
145
+ issue: IssueNode | null;
146
+ };
147
+ }
148
+ export interface IssueArchiveEntity {
149
+ id: string;
150
+ }
151
+ export interface IssueArchivePayload {
152
+ success: boolean;
153
+ lastSyncId: number;
154
+ entity: IssueArchiveEntity | null;
155
+ }
156
+ /** Response shape for `ARCHIVE_ISSUE_MUTATION`. */
157
+ export interface ArchiveIssueResponse {
158
+ issueArchive: IssueArchivePayload;
159
+ }
160
+ /** Response shape for `DELETE_ISSUE_MUTATION`. */
161
+ export interface DeleteIssueResponse {
162
+ issueDelete: IssueArchivePayload;
163
+ }
164
+ /** Response shape for `GET_ISSUE_TEAM_QUERY`. */
165
+ export interface GetIssueTeamResponse {
166
+ issue: {
167
+ team: {
168
+ id: string;
169
+ } | null;
170
+ } | null;
171
+ }
172
+ /**
173
+ * Issue summary returned by `GET_ISSUE_RELATIONS_QUERY` on the
174
+ * `relatedIssue` / `issue` peer of each relation. Smaller than
175
+ * `IssueNode` — just enough to display a sidebar entry.
176
+ */
177
+ export interface RelationPeerNode {
178
+ id: string;
179
+ identifier: string;
180
+ title: string;
181
+ state: {
182
+ id: string;
183
+ name: string;
184
+ } | null;
185
+ priority: number | null;
186
+ assignee: {
187
+ id: string;
188
+ name: string;
189
+ } | null;
190
+ team: {
191
+ id: string;
192
+ key: string;
193
+ name: string;
194
+ } | null;
195
+ }
196
+ export interface RelationOutgoingNode {
197
+ id: string;
198
+ type: string;
199
+ relatedIssue: RelationPeerNode | null;
200
+ }
201
+ export interface RelationIncomingNode {
202
+ id: string;
203
+ type: string;
204
+ issue: RelationPeerNode | null;
205
+ }
206
+ export interface BatchResolveProjectMilestoneRef {
207
+ id: string;
208
+ name: string;
209
+ }
210
+ export interface BatchResolveProjectNode {
211
+ id: string;
212
+ name: string;
213
+ /** Present on `BATCH_RESOLVE_FOR_CREATE_QUERY`. */
214
+ teams?: {
215
+ nodes: {
216
+ id: string;
217
+ key: string;
218
+ }[];
219
+ };
220
+ /** Present on `BATCH_RESOLVE_FOR_CREATE_QUERY` and `BATCH_RESOLVE_FOR_UPDATE_QUERY`. */
221
+ projectMilestones?: {
222
+ nodes: BatchResolveProjectMilestoneRef[];
223
+ };
224
+ }
225
+ export interface BatchResolveLabelNode {
226
+ id: string;
227
+ name: string;
228
+ isGroup: boolean;
229
+ team: {
230
+ id: string;
231
+ } | null;
232
+ }
233
+ export interface BatchResolveIssueForUpdate {
234
+ id: string;
235
+ identifier: string;
236
+ team: {
237
+ id: string;
238
+ key: string;
239
+ } | null;
240
+ labels: {
241
+ nodes: {
242
+ id: string;
243
+ name: string;
244
+ }[];
245
+ };
246
+ project: {
247
+ id: string;
248
+ projectMilestones: {
249
+ nodes: BatchResolveProjectMilestoneRef[];
250
+ };
251
+ } | null;
252
+ }
253
+ export interface BatchResolveForCreateResponse {
254
+ teams: {
255
+ nodes: {
256
+ id: string;
257
+ key: string;
258
+ name: string;
259
+ }[];
260
+ };
261
+ projects: {
262
+ nodes: BatchResolveProjectNode[];
263
+ };
264
+ milestones: {
265
+ nodes: BatchResolveProjectMilestoneRef[];
266
+ };
267
+ parentIssues: {
268
+ nodes: {
269
+ id: string;
270
+ identifier: string;
271
+ }[];
272
+ };
273
+ }
274
+ export interface BatchResolveForSearchResponse {
275
+ teams: {
276
+ nodes: {
277
+ id: string;
278
+ key: string;
279
+ name: string;
280
+ }[];
281
+ };
282
+ projects: {
283
+ nodes: BatchResolveProjectNode[];
284
+ };
285
+ users: {
286
+ nodes: {
287
+ id: string;
288
+ name: string;
289
+ email: string;
290
+ }[];
291
+ };
292
+ }
293
+ export interface BatchResolveForUpdateResponse {
294
+ projects: {
295
+ nodes: BatchResolveProjectNode[];
296
+ };
297
+ milestones: {
298
+ nodes: BatchResolveProjectMilestoneRef[];
299
+ };
300
+ issues: {
301
+ nodes: BatchResolveIssueForUpdate[];
302
+ };
303
+ }
304
+ export interface ResolveLabelsByNameResponse {
305
+ labels: {
306
+ nodes: BatchResolveLabelNode[];
307
+ };
308
+ }
309
+ /**
310
+ * Merged blob threaded through the field-resolution helpers. All
311
+ * fields are optional because the helpers don't know which batch
312
+ * query produced the result — they read only what they need.
313
+ */
314
+ export interface BatchResolveResult {
315
+ teams?: {
316
+ nodes: {
317
+ id: string;
318
+ key: string;
319
+ name: string;
320
+ }[];
321
+ };
322
+ projects?: {
323
+ nodes: BatchResolveProjectNode[];
324
+ };
325
+ milestones?: {
326
+ nodes: BatchResolveProjectMilestoneRef[];
327
+ };
328
+ parentIssues?: {
329
+ nodes: {
330
+ id: string;
331
+ identifier: string;
332
+ }[];
333
+ };
334
+ users?: {
335
+ nodes: {
336
+ id: string;
337
+ name: string;
338
+ email: string;
339
+ }[];
340
+ };
341
+ issues?: {
342
+ nodes: BatchResolveIssueForUpdate[];
343
+ };
344
+ labels?: {
345
+ nodes: BatchResolveLabelNode[];
346
+ };
347
+ }
348
+ /** Response shape for `GET_ISSUE_RELATIONS_QUERY`. */
349
+ export interface GetIssueRelationsResponse {
350
+ issue: {
351
+ id: string;
352
+ identifier: string;
353
+ title: string;
354
+ description: string | null;
355
+ relations: {
356
+ nodes: RelationOutgoingNode[];
357
+ };
358
+ inverseRelations: {
359
+ nodes: RelationIncomingNode[];
360
+ };
361
+ } | null;
362
+ }
363
+ /**
364
+ * Response shape for `ISSUE_RELATION_CREATE_MUTATION`. The relation
365
+ * carries both `issue` and `relatedIssue` peers because the caller
366
+ * decides which side to display based on `reverse`.
367
+ */
368
+ export interface IssueRelationCreateResponse {
369
+ issueRelationCreate: {
370
+ success: boolean;
371
+ issueRelation: {
372
+ id: string;
373
+ type: string;
374
+ issue: {
375
+ id: string;
376
+ identifier: string;
377
+ title: string;
378
+ };
379
+ relatedIssue: {
380
+ id: string;
381
+ identifier: string;
382
+ title: string;
383
+ };
384
+ } | null;
385
+ };
386
+ }
387
+ /** Response shape for `SCAN_ISSUES_QUERY`. */
388
+ export interface ScanIssuesResponse {
389
+ issues: {
390
+ nodes: {
391
+ id: string;
392
+ identifier: string;
393
+ description: string | null;
394
+ }[];
395
+ };
396
+ }
397
+ export interface IssueStateSpanNode {
398
+ state: {
399
+ id: string;
400
+ name: string;
401
+ type: string;
402
+ };
403
+ startedAt: string;
404
+ endedAt: string | null;
405
+ }
406
+ /** Response shape for `GET_ISSUE_STATE_HISTORY_QUERY`. */
407
+ export interface GetIssueStateHistoryResponse {
408
+ issue: {
409
+ id: string;
410
+ identifier: string;
411
+ title: string;
412
+ stateHistory: {
413
+ nodes: IssueStateSpanNode[];
414
+ };
415
+ } | null;
416
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Typed response shapes for the GraphQL queries in `./issues.ts`.
3
+ *
4
+ * Pre-fix, every consumer used `GraphQLResponseData` (a recursive
5
+ * `Record<string, unknown>`) and re-cast every field with `as
6
+ * string` / `as GraphQLResponseData`. A renamed Linear field would
7
+ * silently produce `undefined` at runtime; transformers had no
8
+ * compile-time check that they were reading the fields the queries
9
+ * actually requested.
10
+ *
11
+ * These interfaces mirror the shape of `COMPLETE_ISSUE_FRAGMENT` /
12
+ * `COMPLETE_ISSUE_WITH_COMMENTS_FRAGMENT` (defined in
13
+ * `./common.ts`) so the transformer can consume a typed node and
14
+ * the compiler catches drift between query and consumer.
15
+ *
16
+ * Pattern for adding new types: define a `Foo` node interface +
17
+ * a `GetFooResponse` (or list-shape) wrapper. Co-locate them in
18
+ * this file or a sibling `*-types.ts` so they live next to the
19
+ * query string.
20
+ *
21
+ * Refs ALL-937.
22
+ */
23
+ export {};
@@ -7,6 +7,8 @@ export declare const GET_ISSUE_BY_IDENTIFIER_QUERY = "\n query GetIssueByIdenti
7
7
  export declare const BATCH_RESOLVE_FOR_UPDATE_QUERY = "\n query BatchResolveForUpdate(\n $projectName: String\n $teamKey: String\n $issueNumber: Float\n $milestoneName: String\n ) {\n projects(filter: { name: { eqIgnoreCase: $projectName } }, first: 1) {\n nodes {\n id\n name\n projectMilestones {\n nodes {\n id\n name\n }\n }\n }\n }\n\n milestones: projectMilestones(\n filter: { name: { eq: $milestoneName } }\n first: 1\n ) {\n nodes {\n id\n name\n }\n }\n\n issues(\n filter: {\n and: [\n { team: { key: { eq: $teamKey } } }\n { number: { eq: $issueNumber } }\n ]\n }\n first: 1\n ) {\n nodes {\n id\n identifier\n team {\n id\n key\n }\n labels {\n nodes {\n id\n name\n }\n }\n project {\n id\n projectMilestones {\n nodes {\n id\n name\n }\n }\n }\n }\n }\n }\n";
8
8
  export declare const CREATE_ISSUE_MUTATION = "\n mutation CreateIssue($input: IssueCreateInput!) {\n issueCreate(input: $input) {\n success\n issue {\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";
9
9
  export declare const UPDATE_ISSUE_MUTATION = "\n mutation UpdateIssue($id: String!, $input: IssueUpdateInput!) {\n issueUpdate(id: $id, input: $input) {\n success\n issue {\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";
10
+ export declare const ARCHIVE_ISSUE_MUTATION = "\n mutation ArchiveIssue($id: String!) {\n issueArchive(id: $id) {\n success\n lastSyncId\n entity {\n id\n }\n }\n }\n";
11
+ export declare const DELETE_ISSUE_MUTATION = "\n mutation DeleteIssue($id: String!, $permanentlyDelete: Boolean) {\n issueDelete(id: $id, permanentlyDelete: $permanentlyDelete) {\n success\n lastSyncId\n entity {\n id\n }\n }\n }\n";
10
12
  export declare const BATCH_RESOLVE_FOR_CREATE_QUERY = "\n query BatchResolveForCreate(\n $teamKey: String\n $teamName: String\n $projectName: String\n $parentTeamKey: String\n $parentIssueNumber: Float\n $milestoneName: String\n ) {\n teams(\n filter: {\n or: [\n { key: { eq: $teamKey } }\n { name: { eqIgnoreCase: $teamName } }\n ]\n }\n first: 1\n ) {\n nodes {\n id\n key\n name\n }\n }\n\n projects(filter: { name: { eqIgnoreCase: $projectName } }, first: 1) {\n nodes {\n id\n name\n teams {\n nodes { id key }\n }\n projectMilestones {\n nodes { id name }\n }\n }\n }\n\n milestones: projectMilestones(\n filter: { name: { eq: $milestoneName } }\n first: 1\n ) {\n nodes {\n id\n name\n }\n }\n\n parentIssues: issues(\n filter: {\n and: [\n { team: { key: { eq: $parentTeamKey } } }\n { number: { eq: $parentIssueNumber } }\n ]\n }\n first: 1\n ) {\n nodes {\n id\n identifier\n }\n }\n }\n";
11
13
  /**
12
14
  * Build a label-resolution query filtered by names (case-insensitive).
@@ -187,6 +187,28 @@ export const UPDATE_ISSUE_MUTATION = `
187
187
  }
188
188
  }
189
189
  `;
190
+ export const ARCHIVE_ISSUE_MUTATION = `
191
+ mutation ArchiveIssue($id: String!) {
192
+ issueArchive(id: $id) {
193
+ success
194
+ lastSyncId
195
+ entity {
196
+ id
197
+ }
198
+ }
199
+ }
200
+ `;
201
+ export const DELETE_ISSUE_MUTATION = `
202
+ mutation DeleteIssue($id: String!, $permanentlyDelete: Boolean) {
203
+ issueDelete(id: $id, permanentlyDelete: $permanentlyDelete) {
204
+ success
205
+ lastSyncId
206
+ entity {
207
+ id
208
+ }
209
+ }
210
+ }
211
+ `;
190
212
  export const BATCH_RESOLVE_FOR_CREATE_QUERY = `
191
213
  query BatchResolveForCreate(
192
214
  $teamKey: String
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Typed response shapes for the queries in `./labels.ts`.
3
+ * See `./issues-types.ts` for the rationale (ALL-937).
4
+ */
5
+ export interface LabelTeamRef {
6
+ id: string;
7
+ key: string;
8
+ name: string;
9
+ }
10
+ export interface LabelParentRef {
11
+ id: string;
12
+ name: string;
13
+ }
14
+ /** Mirrors the issueLabel selection set on `CREATE_LABEL_MUTATION`. */
15
+ export 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
+ export 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
+ export interface RestoredLabelNode {
32
+ id: string;
33
+ name: string;
34
+ color: string;
35
+ team: LabelTeamRef | null;
36
+ }
37
+ export 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
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Typed response shapes for the queries in `./labels.ts`.
3
+ * See `./issues-types.ts` for the rationale (ALL-937).
4
+ */
5
+ export {};