@alasano/pi-linear 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,44 @@
1
+ import { Type } from '@sinclair/typebox';
2
+ import { GenericObjectSchema } from './util';
3
+
4
+ export const PaginationParams = {
5
+ after: Type.Optional(Type.String({ description: 'Pagination cursor.' })),
6
+ before: Type.Optional(Type.String({ description: 'Pagination cursor.' })),
7
+ first: Type.Optional(
8
+ Type.Integer({
9
+ minimum: 1,
10
+ maximum: 100,
11
+ description: 'Maximum number of items to fetch.',
12
+ }),
13
+ ),
14
+ last: Type.Optional(
15
+ Type.Integer({
16
+ minimum: 1,
17
+ maximum: 100,
18
+ description: 'Fetch the last N items (with before cursor).',
19
+ }),
20
+ ),
21
+ includeArchived: Type.Optional(Type.Boolean({ description: 'Include archived resources.' })),
22
+ orderBy: Type.Optional(
23
+ Type.String({
24
+ description: 'PaginationOrderBy enum value (for example: updatedAt, createdAt).',
25
+ }),
26
+ ),
27
+ };
28
+
29
+ export const SortParam = {
30
+ sort: Type.Optional(Type.Array(GenericObjectSchema, { description: 'Sort input array.' })),
31
+ };
32
+
33
+ export const FilterParam = {
34
+ filter: Type.Optional(GenericObjectSchema),
35
+ };
36
+
37
+ export const RawInputParam = {
38
+ input: Type.Optional(GenericObjectSchema),
39
+ };
40
+
41
+ export const TeamConvenienceParams = {
42
+ teamId: Type.Optional(Type.String({ description: 'Team id.' })),
43
+ teamKey: Type.Optional(Type.String({ description: 'Team key (e.g. ENG).' })),
44
+ };
@@ -0,0 +1,327 @@
1
+ export const ISSUE_SELECTION = `
2
+ id
3
+ identifier
4
+ number
5
+ title
6
+ description
7
+ priority
8
+ url
9
+ branchName
10
+ dueDate
11
+ createdAt
12
+ updatedAt
13
+ estimate
14
+ priorityLabel
15
+ completedAt
16
+ startedAt
17
+ archivedAt
18
+ trashed
19
+ state {
20
+ id
21
+ name
22
+ type
23
+ }
24
+ team {
25
+ id
26
+ key
27
+ name
28
+ }
29
+ assignee {
30
+ id
31
+ name
32
+ email
33
+ }
34
+ labels {
35
+ nodes {
36
+ id
37
+ name
38
+ }
39
+ }
40
+ project {
41
+ id
42
+ name
43
+ }
44
+ parent {
45
+ id
46
+ identifier
47
+ title
48
+ }
49
+ cycle {
50
+ id
51
+ name
52
+ number
53
+ }
54
+ creator {
55
+ id
56
+ name
57
+ email
58
+ }
59
+ `;
60
+
61
+ export const WORKFLOW_STATE_SELECTION = `
62
+ id
63
+ name
64
+ type
65
+ color
66
+ position
67
+ description
68
+ createdAt
69
+ updatedAt
70
+ team {
71
+ id
72
+ key
73
+ name
74
+ }
75
+ `;
76
+
77
+ export const ISSUE_LABEL_SELECTION = `
78
+ id
79
+ name
80
+ description
81
+ color
82
+ isGroup
83
+ createdAt
84
+ updatedAt
85
+ retiredAt
86
+ team {
87
+ id
88
+ key
89
+ name
90
+ }
91
+ parent {
92
+ id
93
+ name
94
+ }
95
+ `;
96
+
97
+ export const PROJECT_SELECTION = `
98
+ id
99
+ name
100
+ description
101
+ color
102
+ icon
103
+ state
104
+ priority
105
+ slugId
106
+ startDate
107
+ targetDate
108
+ completedAt
109
+ canceledAt
110
+ health
111
+ progress
112
+ startedAt
113
+ archivedAt
114
+ trashed
115
+ priorityLabel
116
+ createdAt
117
+ updatedAt
118
+ url
119
+ teams {
120
+ nodes {
121
+ id
122
+ key
123
+ name
124
+ }
125
+ }
126
+ lead {
127
+ id
128
+ name
129
+ email
130
+ }
131
+ members {
132
+ nodes {
133
+ id
134
+ name
135
+ email
136
+ }
137
+ }
138
+ status {
139
+ id
140
+ name
141
+ }
142
+ `;
143
+
144
+ export const PROJECT_LABEL_SELECTION = `
145
+ id
146
+ name
147
+ description
148
+ color
149
+ isGroup
150
+ createdAt
151
+ updatedAt
152
+ retiredAt
153
+ parent {
154
+ id
155
+ name
156
+ }
157
+ `;
158
+
159
+ export const DOCUMENT_SELECTION = `
160
+ id
161
+ title
162
+ content
163
+ color
164
+ icon
165
+ slugId
166
+ sortOrder
167
+ hiddenAt
168
+ trashed
169
+ summary
170
+ archivedAt
171
+ createdAt
172
+ updatedAt
173
+ url
174
+ team {
175
+ id
176
+ key
177
+ name
178
+ }
179
+ project {
180
+ id
181
+ name
182
+ }
183
+ issue {
184
+ id
185
+ identifier
186
+ title
187
+ }
188
+ initiative {
189
+ id
190
+ name
191
+ }
192
+ `;
193
+
194
+ export const COMMENT_SELECTION = `
195
+ id
196
+ body
197
+ quotedText
198
+ createdAt
199
+ updatedAt
200
+ editedAt
201
+ resolvedAt
202
+ url
203
+ issue {
204
+ id
205
+ identifier
206
+ title
207
+ }
208
+ parent {
209
+ id
210
+ }
211
+ user {
212
+ id
213
+ name
214
+ email
215
+ }
216
+ `;
217
+
218
+ export const INITIATIVE_SELECTION = `
219
+ id
220
+ name
221
+ description
222
+ content
223
+ status
224
+ color
225
+ icon
226
+ targetDate
227
+ targetDateResolution
228
+ sortOrder
229
+ health
230
+ completedAt
231
+ startedAt
232
+ archivedAt
233
+ trashed
234
+ createdAt
235
+ updatedAt
236
+ url
237
+ owner {
238
+ id
239
+ name
240
+ email
241
+ }
242
+ `;
243
+
244
+ export const MILESTONE_SELECTION = `
245
+ id
246
+ name
247
+ description
248
+ status
249
+ progress
250
+ targetDate
251
+ sortOrder
252
+ createdAt
253
+ updatedAt
254
+ project {
255
+ id
256
+ name
257
+ url
258
+ }
259
+ `;
260
+
261
+ export const ISSUE_RELATION_SELECTION = `
262
+ id
263
+ createdAt
264
+ updatedAt
265
+ type
266
+ issue {
267
+ id
268
+ identifier
269
+ title
270
+ }
271
+ relatedIssue {
272
+ id
273
+ identifier
274
+ title
275
+ }
276
+ `;
277
+
278
+ export const PROJECT_RELATION_SELECTION = `
279
+ id
280
+ createdAt
281
+ updatedAt
282
+ type
283
+ anchorType
284
+ relatedAnchorType
285
+ project {
286
+ id
287
+ name
288
+ }
289
+ projectMilestone {
290
+ id
291
+ name
292
+ }
293
+ relatedProject {
294
+ id
295
+ name
296
+ }
297
+ relatedProjectMilestone {
298
+ id
299
+ name
300
+ }
301
+ `;
302
+
303
+ export const TEAM_SELECTION = `
304
+ id
305
+ key
306
+ name
307
+ description
308
+ color
309
+ icon
310
+ private
311
+ createdAt
312
+ updatedAt
313
+ `;
314
+
315
+ export const USER_SELECTION = `
316
+ id
317
+ name
318
+ displayName
319
+ email
320
+ active
321
+ admin
322
+ guest
323
+ isAssignable
324
+ createdAt
325
+ updatedAt
326
+ url
327
+ `;