@useairfoil/producer-linear 0.0.2 → 0.0.3
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/LICENSE.txt +201 -0
- package/dist/index.mjs +1 -1
- package/dist/main.mjs +6 -4
- package/dist/main.mjs.map +1 -1
- package/dist/{src-Ci3_ltan.mjs → src-BbzySPR7.mjs} +343 -346
- package/dist/src-BbzySPR7.mjs.map +1 -0
- package/package.json +17 -17
- package/src/create-table.ts +6 -1
- package/src/main.ts +8 -2
- package/src/schemas/comments.ts +36 -16
- package/src/schemas/customers.ts +43 -27
- package/src/schemas/documents.ts +24 -16
- package/src/schemas/initiatives.ts +79 -43
- package/src/schemas/issues.ts +179 -97
- package/src/schemas/projects.ts +118 -62
- package/src/schemas/releases.ts +58 -45
- package/src/schemas/shared.ts +25 -23
- package/src/schemas/teams.ts +87 -54
- package/src/start.ts +2 -2
- package/dist/src-Ci3_ltan.mjs.map +0 -1
package/src/schemas/issues.ts
CHANGED
|
@@ -9,60 +9,102 @@ import {
|
|
|
9
9
|
Ref,
|
|
10
10
|
common,
|
|
11
11
|
deleted,
|
|
12
|
-
field,
|
|
13
|
-
list,
|
|
14
12
|
} from "./shared";
|
|
15
13
|
|
|
16
14
|
export const IssueSchema = Schema.Struct({
|
|
17
15
|
...common("Issue"),
|
|
18
16
|
_deleted: deleted("issue"),
|
|
19
|
-
identifier: Schema.String.pipe(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
identifier: Schema.String.pipe(
|
|
18
|
+
Schema.annotateKey({ description: "Readable ID, such as ENG-123." }),
|
|
19
|
+
),
|
|
20
|
+
number: Schema.Finite.pipe(Schema.annotateKey({ description: "Issue number within its team." })),
|
|
21
|
+
title: Schema.String.pipe(Schema.annotateKey({ description: "Issue title." })),
|
|
22
|
+
description: OptionalString.pipe(Schema.annotateKey({ description: "Description in markdown." })),
|
|
23
|
+
url: Schema.String.pipe(Schema.annotateKey({ description: "Issue URL." })),
|
|
24
|
+
branch_name: Schema.String.pipe(
|
|
25
|
+
Schema.annotateKey({ description: "Suggested Git branch name." }),
|
|
26
|
+
),
|
|
27
|
+
priority: Schema.Finite.pipe(
|
|
28
|
+
Schema.annotateKey({ description: "0 none, 1 urgent, 2 high, 3 medium, 4 low." }),
|
|
29
|
+
),
|
|
30
|
+
priority_label: Schema.String.pipe(Schema.annotateKey({ description: "Priority name." })),
|
|
31
|
+
estimate: Schema.NullOr(Schema.Finite).pipe(
|
|
32
|
+
Schema.annotateKey({ description: "Estimate, on the team's scale." }),
|
|
33
|
+
),
|
|
34
|
+
due_date: OptionalString.pipe(Schema.annotateKey({ description: "Due date, as YYYY-MM-DD." })),
|
|
35
|
+
creator_id: OptionalRef.pipe(Schema.annotateKey({ description: "User who created the issue." })),
|
|
36
|
+
assignee_id: OptionalRef.pipe(Schema.annotateKey({ description: "Assigned user." })),
|
|
37
|
+
delegate_id: OptionalRef.pipe(
|
|
38
|
+
Schema.annotateKey({ description: "Agent user working on the issue." }),
|
|
39
|
+
),
|
|
40
|
+
snoozed_by_id: OptionalRef.pipe(
|
|
41
|
+
Schema.annotateKey({ description: "User who snoozed the issue." }),
|
|
42
|
+
),
|
|
43
|
+
state_id: Ref.pipe(Schema.annotateKey({ description: "Workflow state." })),
|
|
44
|
+
team_id: Ref.pipe(Schema.annotateKey({ description: "Team the issue belongs to." })),
|
|
45
|
+
project_id: OptionalRef.pipe(Schema.annotateKey({ description: "Project." })),
|
|
46
|
+
project_milestone_id: OptionalRef.pipe(Schema.annotateKey({ description: "Project milestone." })),
|
|
47
|
+
cycle_id: OptionalRef.pipe(Schema.annotateKey({ description: "Cycle." })),
|
|
48
|
+
parent_id: OptionalRef.pipe(Schema.annotateKey({ description: "Parent issue." })),
|
|
49
|
+
source_comment_id: OptionalRef.pipe(
|
|
50
|
+
Schema.annotateKey({ description: "Comment the issue was made from." }),
|
|
51
|
+
),
|
|
40
52
|
external_user_creator_id: OptionalRef.pipe(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
Schema.annotateKey({
|
|
54
|
+
description: "External user who created the issue through an integration.",
|
|
55
|
+
}),
|
|
56
|
+
),
|
|
57
|
+
label_ids: Schema.Array(Schema.String).pipe(Schema.annotateKey({ description: "Labels." })),
|
|
58
|
+
previous_identifiers: Schema.Array(Schema.String).pipe(
|
|
59
|
+
Schema.annotateKey({ description: "Earlier readable IDs, from before the issue moved team." }),
|
|
60
|
+
),
|
|
61
|
+
started_at: OptionalTimestamp.pipe(
|
|
62
|
+
Schema.annotateKey({ description: "Time the issue moved to a started state." }),
|
|
63
|
+
),
|
|
64
|
+
completed_at: OptionalTimestamp.pipe(
|
|
65
|
+
Schema.annotateKey({ description: "Time the issue was completed." }),
|
|
66
|
+
),
|
|
67
|
+
canceled_at: OptionalTimestamp.pipe(
|
|
68
|
+
Schema.annotateKey({ description: "Time the issue was canceled." }),
|
|
69
|
+
),
|
|
70
|
+
started_triage_at: OptionalTimestamp.pipe(
|
|
71
|
+
Schema.annotateKey({ description: "Time the issue entered triage." }),
|
|
72
|
+
),
|
|
73
|
+
triaged_at: OptionalTimestamp.pipe(
|
|
74
|
+
Schema.annotateKey({ description: "Time the issue left triage." }),
|
|
75
|
+
),
|
|
76
|
+
auto_closed_at: OptionalTimestamp.pipe(
|
|
77
|
+
Schema.annotateKey({ description: "Time the issue was closed automatically." }),
|
|
78
|
+
),
|
|
79
|
+
auto_archived_at: OptionalTimestamp.pipe(
|
|
80
|
+
Schema.annotateKey({ description: "Time the issue was archived automatically." }),
|
|
81
|
+
),
|
|
82
|
+
added_to_cycle_at: OptionalTimestamp.pipe(
|
|
83
|
+
Schema.annotateKey({ description: "Time the issue was added to its cycle." }),
|
|
84
|
+
),
|
|
55
85
|
added_to_project_at: OptionalTimestamp.pipe(
|
|
56
|
-
|
|
57
|
-
),
|
|
58
|
-
added_to_team_at: OptionalTimestamp.pipe(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
86
|
+
Schema.annotateKey({ description: "Time the issue was added to its project." }),
|
|
87
|
+
),
|
|
88
|
+
added_to_team_at: OptionalTimestamp.pipe(
|
|
89
|
+
Schema.annotateKey({ description: "Time the issue was added to its team." }),
|
|
90
|
+
),
|
|
91
|
+
snoozed_until_at: OptionalTimestamp.pipe(
|
|
92
|
+
Schema.annotateKey({ description: "Time the issue is snoozed until." }),
|
|
93
|
+
),
|
|
94
|
+
sla_type: OptionalString.pipe(Schema.annotateKey({ description: "SLA type." })),
|
|
95
|
+
sla_started_at: OptionalTimestamp.pipe(
|
|
96
|
+
Schema.annotateKey({ description: "Time the SLA started." }),
|
|
97
|
+
),
|
|
98
|
+
sla_breaches_at: OptionalTimestamp.pipe(
|
|
99
|
+
Schema.annotateKey({ description: "Time the SLA breaches." }),
|
|
100
|
+
),
|
|
101
|
+
customer_ticket_count: Long.pipe(Schema.annotateKey({ description: "Linked support tickets." })),
|
|
102
|
+
integration_source_type: OptionalString.pipe(
|
|
103
|
+
Schema.annotateKey({ description: "Integration that created the issue." }),
|
|
104
|
+
),
|
|
105
|
+
trashed: Schema.NullOr(Schema.Boolean).pipe(
|
|
106
|
+
Schema.annotateKey({ description: "Whether the issue is in the trash." }),
|
|
107
|
+
),
|
|
66
108
|
})
|
|
67
109
|
.annotate({ description: "Linear issues, including archived and trashed ones." })
|
|
68
110
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -75,43 +117,69 @@ export const IssueObjectSchema = IssueSchema.mapFields((fields) =>
|
|
|
75
117
|
|
|
76
118
|
export const IssueHistorySchema = Schema.Struct({
|
|
77
119
|
...common("History entry"),
|
|
78
|
-
issue_id: Schema.String.pipe(
|
|
79
|
-
actor_id: OptionalString.pipe(
|
|
80
|
-
from_state_id: OptionalString.pipe(
|
|
81
|
-
to_state_id: OptionalString.pipe(
|
|
82
|
-
from_assignee_id: OptionalString.pipe(
|
|
83
|
-
to_assignee_id: OptionalString.pipe(
|
|
84
|
-
from_cycle_id: OptionalString.pipe(
|
|
85
|
-
to_cycle_id: OptionalString.pipe(
|
|
86
|
-
from_project_id: OptionalString.pipe(
|
|
87
|
-
to_project_id: OptionalString.pipe(
|
|
88
|
-
from_parent_id: OptionalString.pipe(
|
|
89
|
-
to_parent_id: OptionalString.pipe(
|
|
90
|
-
from_team_id: OptionalString.pipe(
|
|
91
|
-
to_team_id: OptionalString.pipe(
|
|
92
|
-
from_priority: Schema.NullOr(Schema.Finite).pipe(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
120
|
+
issue_id: Schema.String.pipe(Schema.annotateKey({ description: "Issue that changed." })),
|
|
121
|
+
actor_id: OptionalString.pipe(Schema.annotateKey({ description: "User who made the change." })),
|
|
122
|
+
from_state_id: OptionalString.pipe(Schema.annotateKey({ description: "Workflow state before." })),
|
|
123
|
+
to_state_id: OptionalString.pipe(Schema.annotateKey({ description: "Workflow state after." })),
|
|
124
|
+
from_assignee_id: OptionalString.pipe(Schema.annotateKey({ description: "Assignee before." })),
|
|
125
|
+
to_assignee_id: OptionalString.pipe(Schema.annotateKey({ description: "Assignee after." })),
|
|
126
|
+
from_cycle_id: OptionalString.pipe(Schema.annotateKey({ description: "Cycle before." })),
|
|
127
|
+
to_cycle_id: OptionalString.pipe(Schema.annotateKey({ description: "Cycle after." })),
|
|
128
|
+
from_project_id: OptionalString.pipe(Schema.annotateKey({ description: "Project before." })),
|
|
129
|
+
to_project_id: OptionalString.pipe(Schema.annotateKey({ description: "Project after." })),
|
|
130
|
+
from_parent_id: OptionalString.pipe(Schema.annotateKey({ description: "Parent issue before." })),
|
|
131
|
+
to_parent_id: OptionalString.pipe(Schema.annotateKey({ description: "Parent issue after." })),
|
|
132
|
+
from_team_id: OptionalString.pipe(Schema.annotateKey({ description: "Team before." })),
|
|
133
|
+
to_team_id: OptionalString.pipe(Schema.annotateKey({ description: "Team after." })),
|
|
134
|
+
from_priority: Schema.NullOr(Schema.Finite).pipe(
|
|
135
|
+
Schema.annotateKey({ description: "Priority before." }),
|
|
136
|
+
),
|
|
137
|
+
to_priority: Schema.NullOr(Schema.Finite).pipe(
|
|
138
|
+
Schema.annotateKey({ description: "Priority after." }),
|
|
139
|
+
),
|
|
140
|
+
from_estimate: Schema.NullOr(Schema.Finite).pipe(
|
|
141
|
+
Schema.annotateKey({ description: "Estimate before." }),
|
|
142
|
+
),
|
|
143
|
+
to_estimate: Schema.NullOr(Schema.Finite).pipe(
|
|
144
|
+
Schema.annotateKey({ description: "Estimate after." }),
|
|
145
|
+
),
|
|
146
|
+
from_due_date: OptionalString.pipe(
|
|
147
|
+
Schema.annotateKey({ description: "Due date before, as YYYY-MM-DD." }),
|
|
148
|
+
),
|
|
149
|
+
to_due_date: OptionalString.pipe(
|
|
150
|
+
Schema.annotateKey({ description: "Due date after, as YYYY-MM-DD." }),
|
|
151
|
+
),
|
|
152
|
+
from_title: OptionalString.pipe(Schema.annotateKey({ description: "Title before." })),
|
|
153
|
+
to_title: OptionalString.pipe(Schema.annotateKey({ description: "Title after." })),
|
|
154
|
+
added_label_ids: Schema.NullOr(Schema.Array(Schema.String)).pipe(
|
|
155
|
+
Schema.annotateKey({ description: "Labels added." }),
|
|
156
|
+
),
|
|
157
|
+
removed_label_ids: Schema.NullOr(Schema.Array(Schema.String)).pipe(
|
|
158
|
+
Schema.annotateKey({ description: "Labels removed." }),
|
|
159
|
+
),
|
|
160
|
+
attachment_id: OptionalString.pipe(
|
|
161
|
+
Schema.annotateKey({ description: "Attachment linked or unlinked." }),
|
|
162
|
+
),
|
|
163
|
+
customer_need_id: OptionalString.pipe(
|
|
164
|
+
Schema.annotateKey({ description: "Customer request linked or unlinked." }),
|
|
165
|
+
),
|
|
166
|
+
to_converted_project_id: OptionalString.pipe(
|
|
167
|
+
Schema.annotateKey({ description: "Project the issue became." }),
|
|
168
|
+
),
|
|
105
169
|
updated_description: Schema.NullOr(Schema.Boolean).pipe(
|
|
106
|
-
|
|
170
|
+
Schema.annotateKey({ description: "Whether the description changed." }),
|
|
171
|
+
),
|
|
172
|
+
archived: Schema.NullOr(Schema.Boolean).pipe(
|
|
173
|
+
Schema.annotateKey({ description: "Whether the issue was archived." }),
|
|
174
|
+
),
|
|
175
|
+
trashed: Schema.NullOr(Schema.Boolean).pipe(
|
|
176
|
+
Schema.annotateKey({ description: "Whether the issue was trashed." }),
|
|
107
177
|
),
|
|
108
|
-
archived: Schema.NullOr(Schema.Boolean).pipe(field(38, "Whether the issue was archived.")),
|
|
109
|
-
trashed: Schema.NullOr(Schema.Boolean).pipe(field(39, "Whether the issue was trashed.")),
|
|
110
178
|
auto_archived: Schema.NullOr(Schema.Boolean).pipe(
|
|
111
|
-
|
|
179
|
+
Schema.annotateKey({ description: "Whether the issue was archived automatically." }),
|
|
112
180
|
),
|
|
113
181
|
auto_closed: Schema.NullOr(Schema.Boolean).pipe(
|
|
114
|
-
|
|
182
|
+
Schema.annotateKey({ description: "Whether the issue was closed automatically." }),
|
|
115
183
|
),
|
|
116
184
|
})
|
|
117
185
|
.annotate({ description: "Linear issue history. One row per change to an issue." })
|
|
@@ -125,9 +193,11 @@ export const IssueHistoryObjectSchema = IssueHistorySchema.mapFields((fields) =>
|
|
|
125
193
|
|
|
126
194
|
export const IssueRelationSchema = Schema.Struct({
|
|
127
195
|
...common("Relation"),
|
|
128
|
-
issue_id: Ref.pipe(
|
|
129
|
-
related_issue_id: Ref.pipe(
|
|
130
|
-
type: Schema.String.pipe(
|
|
196
|
+
issue_id: Ref.pipe(Schema.annotateKey({ description: "Issue the relation starts from." })),
|
|
197
|
+
related_issue_id: Ref.pipe(Schema.annotateKey({ description: "Related issue." })),
|
|
198
|
+
type: Schema.String.pipe(
|
|
199
|
+
Schema.annotateKey({ description: "Relation type: blocks, duplicate, related, or similar." }),
|
|
200
|
+
),
|
|
131
201
|
})
|
|
132
202
|
.annotate({ description: "Linear issue relations. Deleted relations aren't seen." })
|
|
133
203
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -141,13 +211,19 @@ export const IssueRelationObjectSchema = IssueRelationSchema.mapFields((fields)
|
|
|
141
211
|
export const AttachmentSchema = Schema.Struct({
|
|
142
212
|
...common("Attachment"),
|
|
143
213
|
_deleted: deleted("attachment"),
|
|
144
|
-
issue_id: Ref.pipe(
|
|
145
|
-
creator_id: OptionalRef.pipe(
|
|
146
|
-
external_user_creator_id: OptionalRef.pipe(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
214
|
+
issue_id: Ref.pipe(Schema.annotateKey({ description: "Issue the attachment is on." })),
|
|
215
|
+
creator_id: OptionalRef.pipe(Schema.annotateKey({ description: "User who added it." })),
|
|
216
|
+
external_user_creator_id: OptionalRef.pipe(
|
|
217
|
+
Schema.annotateKey({ description: "External user who added it." }),
|
|
218
|
+
),
|
|
219
|
+
title: Schema.String.pipe(Schema.annotateKey({ description: "Title." })),
|
|
220
|
+
subtitle: OptionalString.pipe(Schema.annotateKey({ description: "Subtitle." })),
|
|
221
|
+
url: Schema.String.pipe(
|
|
222
|
+
Schema.annotateKey({ description: "Linked URL, such as a pull request or ticket." }),
|
|
223
|
+
),
|
|
224
|
+
source_type: OptionalString.pipe(
|
|
225
|
+
Schema.annotateKey({ description: "Source, such as github or zendesk." }),
|
|
226
|
+
),
|
|
151
227
|
})
|
|
152
228
|
.annotate({ description: "Linear issue attachments: links to pull requests, tickets, and more." })
|
|
153
229
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -161,14 +237,20 @@ export const AttachmentObjectSchema = AttachmentSchema.mapFields((fields) =>
|
|
|
161
237
|
export const IssueLabelSchema = Schema.Struct({
|
|
162
238
|
...common("Label"),
|
|
163
239
|
_deleted: deleted("label"),
|
|
164
|
-
name: Schema.String.pipe(
|
|
165
|
-
description: OptionalString.pipe(
|
|
166
|
-
color: Schema.String.pipe(
|
|
167
|
-
is_group: Schema.Boolean.pipe(
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
240
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Label name." })),
|
|
241
|
+
description: OptionalString.pipe(Schema.annotateKey({ description: "Label description." })),
|
|
242
|
+
color: Schema.String.pipe(Schema.annotateKey({ description: "Label color, as hex." })),
|
|
243
|
+
is_group: Schema.Boolean.pipe(
|
|
244
|
+
Schema.annotateKey({ description: "Whether the label groups other labels." }),
|
|
245
|
+
),
|
|
246
|
+
parent_id: OptionalRef.pipe(Schema.annotateKey({ description: "Label group." })),
|
|
247
|
+
team_id: OptionalRef.pipe(
|
|
248
|
+
Schema.annotateKey({ description: "Team, or null for a workspace label." }),
|
|
249
|
+
),
|
|
250
|
+
creator_id: OptionalRef.pipe(Schema.annotateKey({ description: "User who made the label." })),
|
|
251
|
+
retired_at: OptionalTimestamp.pipe(
|
|
252
|
+
Schema.annotateKey({ description: "Time the label was retired." }),
|
|
253
|
+
),
|
|
172
254
|
})
|
|
173
255
|
.annotate({ description: "Linear issue labels. Names the IDs in `issues.label_ids`." })
|
|
174
256
|
.pipe(Iceberg.identifier("id"));
|
package/src/schemas/projects.ts
CHANGED
|
@@ -10,41 +10,71 @@ import {
|
|
|
10
10
|
RefList,
|
|
11
11
|
common,
|
|
12
12
|
deleted,
|
|
13
|
-
field,
|
|
14
|
-
list,
|
|
15
13
|
} from "./shared";
|
|
16
14
|
|
|
17
15
|
export const ProjectSchema = Schema.Struct({
|
|
18
16
|
...common("Project"),
|
|
19
17
|
_deleted: deleted("project"),
|
|
20
|
-
name: Schema.String.pipe(
|
|
21
|
-
description: Schema.String.pipe(
|
|
22
|
-
content: OptionalString.pipe(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
18
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Project name." })),
|
|
19
|
+
description: Schema.String.pipe(Schema.annotateKey({ description: "Short summary." })),
|
|
20
|
+
content: OptionalString.pipe(
|
|
21
|
+
Schema.annotateKey({ description: "Project overview in markdown." }),
|
|
22
|
+
),
|
|
23
|
+
url: Schema.String.pipe(Schema.annotateKey({ description: "Project URL." })),
|
|
24
|
+
icon: OptionalString.pipe(Schema.annotateKey({ description: "Icon." })),
|
|
25
|
+
color: Schema.String.pipe(Schema.annotateKey({ description: "Color, as hex." })),
|
|
26
|
+
status_id: Ref.pipe(Schema.annotateKey({ description: "Project status." })),
|
|
27
|
+
priority: Long.pipe(
|
|
28
|
+
Schema.annotateKey({ description: "0 none, 1 urgent, 2 high, 3 medium, 4 low." }),
|
|
29
|
+
),
|
|
30
|
+
priority_label: Schema.String.pipe(Schema.annotateKey({ description: "Priority name." })),
|
|
31
|
+
health: OptionalString.pipe(
|
|
32
|
+
Schema.annotateKey({ description: "Health from the latest update." }),
|
|
33
|
+
),
|
|
34
|
+
health_updated_at: OptionalTimestamp.pipe(
|
|
35
|
+
Schema.annotateKey({ description: "Time the health last changed." }),
|
|
36
|
+
),
|
|
37
|
+
progress: Schema.Finite.pipe(
|
|
38
|
+
Schema.annotateKey({ description: "Share of the scope completed, from 0 to 1." }),
|
|
39
|
+
),
|
|
40
|
+
scope: Schema.Finite.pipe(
|
|
41
|
+
Schema.annotateKey({ description: "Total estimate of the project's issues." }),
|
|
42
|
+
),
|
|
43
|
+
lead_id: OptionalRef.pipe(Schema.annotateKey({ description: "Project lead." })),
|
|
44
|
+
creator_id: OptionalRef.pipe(Schema.annotateKey({ description: "User who made the project." })),
|
|
45
|
+
converted_from_issue_id: OptionalRef.pipe(
|
|
46
|
+
Schema.annotateKey({ description: "Issue the project was made from." }),
|
|
47
|
+
),
|
|
48
|
+
start_date: OptionalString.pipe(
|
|
49
|
+
Schema.annotateKey({ description: "Start date, as YYYY-MM-DD." }),
|
|
50
|
+
),
|
|
51
|
+
target_date: OptionalString.pipe(
|
|
52
|
+
Schema.annotateKey({ description: "Target date, as YYYY-MM-DD." }),
|
|
53
|
+
),
|
|
54
|
+
started_at: OptionalTimestamp.pipe(
|
|
55
|
+
Schema.annotateKey({ description: "Time the project started." }),
|
|
56
|
+
),
|
|
57
|
+
completed_at: OptionalTimestamp.pipe(
|
|
58
|
+
Schema.annotateKey({ description: "Time the project was completed." }),
|
|
59
|
+
),
|
|
60
|
+
canceled_at: OptionalTimestamp.pipe(
|
|
61
|
+
Schema.annotateKey({ description: "Time the project was canceled." }),
|
|
62
|
+
),
|
|
41
63
|
auto_archived_at: OptionalTimestamp.pipe(
|
|
42
|
-
|
|
64
|
+
Schema.annotateKey({ description: "Time the project was archived automatically." }),
|
|
65
|
+
),
|
|
66
|
+
label_ids: Schema.Array(Schema.String).pipe(
|
|
67
|
+
Schema.annotateKey({ description: "Project labels." }),
|
|
68
|
+
),
|
|
69
|
+
team_ids: RefList.pipe(
|
|
70
|
+
Schema.annotateKey({ description: "Teams the project belongs to. Reads up to 50." }),
|
|
71
|
+
),
|
|
72
|
+
member_ids: RefList.pipe(
|
|
73
|
+
Schema.annotateKey({ description: "Project members. Reads up to 100." }),
|
|
74
|
+
),
|
|
75
|
+
trashed: Schema.NullOr(Schema.Boolean).pipe(
|
|
76
|
+
Schema.annotateKey({ description: "Whether the project is in the trash." }),
|
|
43
77
|
),
|
|
44
|
-
label_ids: list(101, Schema.String).pipe(field(32, "Project labels.")),
|
|
45
|
-
team_ids: RefList(102).pipe(field(33, "Teams the project belongs to. Reads up to 50.")),
|
|
46
|
-
member_ids: RefList(103).pipe(field(34, "Project members. Reads up to 100.")),
|
|
47
|
-
trashed: Schema.NullOr(Schema.Boolean).pipe(field(35, "Whether the project is in the trash.")),
|
|
48
78
|
})
|
|
49
79
|
.annotate({ description: "Linear projects, including archived and trashed ones." })
|
|
50
80
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -57,13 +87,19 @@ export const ProjectObjectSchema = ProjectSchema.mapFields((fields) =>
|
|
|
57
87
|
|
|
58
88
|
export const ProjectMilestoneSchema = Schema.Struct({
|
|
59
89
|
...common("Milestone"),
|
|
60
|
-
name: Schema.String.pipe(
|
|
61
|
-
description: OptionalString.pipe(
|
|
62
|
-
project_id: Ref.pipe(
|
|
63
|
-
target_date: OptionalString.pipe(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
90
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Milestone name." })),
|
|
91
|
+
description: OptionalString.pipe(Schema.annotateKey({ description: "Description in markdown." })),
|
|
92
|
+
project_id: Ref.pipe(Schema.annotateKey({ description: "Project." })),
|
|
93
|
+
target_date: OptionalString.pipe(
|
|
94
|
+
Schema.annotateKey({ description: "Target date, as YYYY-MM-DD." }),
|
|
95
|
+
),
|
|
96
|
+
status: Schema.String.pipe(
|
|
97
|
+
Schema.annotateKey({ description: "Status: unstarted, next, overdue, or done." }),
|
|
98
|
+
),
|
|
99
|
+
progress: Schema.Finite.pipe(
|
|
100
|
+
Schema.annotateKey({ description: "Share of the scope completed, from 0 to 1." }),
|
|
101
|
+
),
|
|
102
|
+
sort_order: Schema.Finite.pipe(Schema.annotateKey({ description: "Order within the project." })),
|
|
67
103
|
})
|
|
68
104
|
.annotate({ description: "Linear project milestones. Deleted milestones aren't seen." })
|
|
69
105
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -77,13 +113,17 @@ export const ProjectMilestoneObjectSchema = ProjectMilestoneSchema.mapFields((fi
|
|
|
77
113
|
export const ProjectUpdateSchema = Schema.Struct({
|
|
78
114
|
...common("Update"),
|
|
79
115
|
_deleted: deleted("update"),
|
|
80
|
-
project_id: Ref.pipe(
|
|
81
|
-
user_id: Ref.pipe(
|
|
82
|
-
body: Schema.String.pipe(
|
|
83
|
-
health: Schema.String.pipe(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
116
|
+
project_id: Ref.pipe(Schema.annotateKey({ description: "Project." })),
|
|
117
|
+
user_id: Ref.pipe(Schema.annotateKey({ description: "User who posted the update." })),
|
|
118
|
+
body: Schema.String.pipe(Schema.annotateKey({ description: "Update text in markdown." })),
|
|
119
|
+
health: Schema.String.pipe(
|
|
120
|
+
Schema.annotateKey({ description: "Health: onTrack, atRisk, or offTrack." }),
|
|
121
|
+
),
|
|
122
|
+
url: Schema.String.pipe(Schema.annotateKey({ description: "Update URL." })),
|
|
123
|
+
edited_at: OptionalTimestamp.pipe(
|
|
124
|
+
Schema.annotateKey({ description: "Time the update was last edited." }),
|
|
125
|
+
),
|
|
126
|
+
comment_count: Long.pipe(Schema.annotateKey({ description: "Comments on the update." })),
|
|
87
127
|
})
|
|
88
128
|
.annotate({ description: "Linear project updates: status posts with a health." })
|
|
89
129
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -96,13 +136,15 @@ export const ProjectUpdateObjectSchema = ProjectUpdateSchema.mapFields((fields)
|
|
|
96
136
|
|
|
97
137
|
export const ProjectStatusSchema = Schema.Struct({
|
|
98
138
|
...common("Status"),
|
|
99
|
-
name: Schema.String.pipe(
|
|
139
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Status name." })),
|
|
100
140
|
type: Schema.String.pipe(
|
|
101
|
-
|
|
141
|
+
Schema.annotateKey({
|
|
142
|
+
description: "Status type: backlog, planned, started, paused, completed, or canceled.",
|
|
143
|
+
}),
|
|
102
144
|
),
|
|
103
|
-
color: Schema.String.pipe(
|
|
104
|
-
description: OptionalString.pipe(
|
|
105
|
-
position: Schema.Finite.pipe(
|
|
145
|
+
color: Schema.String.pipe(Schema.annotateKey({ description: "Color, as hex." })),
|
|
146
|
+
description: OptionalString.pipe(Schema.annotateKey({ description: "Description." })),
|
|
147
|
+
position: Schema.Finite.pipe(Schema.annotateKey({ description: "Order in the list." })),
|
|
106
148
|
})
|
|
107
149
|
.annotate({ description: "Linear project statuses. Names the IDs in `projects.status_id`." })
|
|
108
150
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -116,13 +158,17 @@ export const ProjectStatusObjectSchema = ProjectStatusSchema.mapFields((fields)
|
|
|
116
158
|
export const ProjectLabelSchema = Schema.Struct({
|
|
117
159
|
...common("Label"),
|
|
118
160
|
_deleted: deleted("label"),
|
|
119
|
-
name: Schema.String.pipe(
|
|
120
|
-
description: OptionalString.pipe(
|
|
121
|
-
color: Schema.String.pipe(
|
|
122
|
-
is_group: Schema.Boolean.pipe(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
161
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Label name." })),
|
|
162
|
+
description: OptionalString.pipe(Schema.annotateKey({ description: "Label description." })),
|
|
163
|
+
color: Schema.String.pipe(Schema.annotateKey({ description: "Label color, as hex." })),
|
|
164
|
+
is_group: Schema.Boolean.pipe(
|
|
165
|
+
Schema.annotateKey({ description: "Whether the label groups other labels." }),
|
|
166
|
+
),
|
|
167
|
+
parent_id: OptionalRef.pipe(Schema.annotateKey({ description: "Label group." })),
|
|
168
|
+
creator_id: OptionalRef.pipe(Schema.annotateKey({ description: "User who made the label." })),
|
|
169
|
+
retired_at: OptionalTimestamp.pipe(
|
|
170
|
+
Schema.annotateKey({ description: "Time the label was retired." }),
|
|
171
|
+
),
|
|
126
172
|
})
|
|
127
173
|
.annotate({ description: "Linear project labels. Names the IDs in `projects.label_ids`." })
|
|
128
174
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -135,14 +181,24 @@ export const ProjectLabelObjectSchema = ProjectLabelSchema.mapFields((fields) =>
|
|
|
135
181
|
|
|
136
182
|
export const ProjectRelationSchema = Schema.Struct({
|
|
137
183
|
...common("Relation"),
|
|
138
|
-
type: Schema.String.pipe(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
184
|
+
type: Schema.String.pipe(
|
|
185
|
+
Schema.annotateKey({ description: "Relation type, such as dependency." }),
|
|
186
|
+
),
|
|
187
|
+
project_id: Ref.pipe(Schema.annotateKey({ description: "Project the relation starts from." })),
|
|
188
|
+
project_milestone_id: OptionalRef.pipe(
|
|
189
|
+
Schema.annotateKey({ description: "Milestone the relation starts from." }),
|
|
190
|
+
),
|
|
191
|
+
anchor_type: Schema.String.pipe(
|
|
192
|
+
Schema.annotateKey({ description: "Which end of the project it starts from." }),
|
|
193
|
+
),
|
|
194
|
+
related_project_id: Ref.pipe(Schema.annotateKey({ description: "Related project." })),
|
|
195
|
+
related_project_milestone_id: OptionalRef.pipe(
|
|
196
|
+
Schema.annotateKey({ description: "Related milestone." }),
|
|
197
|
+
),
|
|
198
|
+
related_anchor_type: Schema.String.pipe(
|
|
199
|
+
Schema.annotateKey({ description: "Which end of the related project." }),
|
|
200
|
+
),
|
|
201
|
+
user_id: OptionalRef.pipe(Schema.annotateKey({ description: "User who made the relation." })),
|
|
146
202
|
})
|
|
147
203
|
.annotate({ description: "Linear project dependencies. Deleted relations aren't seen." })
|
|
148
204
|
.pipe(Iceberg.identifier("id"));
|