@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/releases.ts
CHANGED
|
@@ -1,34 +1,39 @@
|
|
|
1
1
|
import { Iceberg } from "@useairfoil/connector-kit";
|
|
2
2
|
import { Schema, SchemaTransformation, Struct } from "effect";
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
Long,
|
|
6
|
-
OptionalRef,
|
|
7
|
-
OptionalString,
|
|
8
|
-
OptionalTimestamp,
|
|
9
|
-
Ref,
|
|
10
|
-
common,
|
|
11
|
-
field,
|
|
12
|
-
list,
|
|
13
|
-
} from "./shared";
|
|
4
|
+
import { Long, OptionalRef, OptionalString, OptionalTimestamp, Ref, common } from "./shared";
|
|
14
5
|
|
|
15
6
|
export const ReleaseSchema = Schema.Struct({
|
|
16
7
|
...common("Release"),
|
|
17
|
-
name: Schema.String.pipe(
|
|
18
|
-
description: OptionalString.pipe(
|
|
8
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Release name." })),
|
|
9
|
+
description: OptionalString.pipe(Schema.annotateKey({ description: "Description." })),
|
|
19
10
|
// `version` is the row version, so the release's own version is renamed.
|
|
20
|
-
release_version: OptionalString.pipe(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
11
|
+
release_version: OptionalString.pipe(
|
|
12
|
+
Schema.annotateKey({ description: "Version, such as 1.2.0." }),
|
|
13
|
+
),
|
|
14
|
+
url: Schema.String.pipe(Schema.annotateKey({ description: "Release URL." })),
|
|
15
|
+
commit_sha: OptionalString.pipe(Schema.annotateKey({ description: "Commit SHA." })),
|
|
16
|
+
pipeline_id: Ref.pipe(Schema.annotateKey({ description: "Release pipeline." })),
|
|
17
|
+
stage_id: Ref.pipe(Schema.annotateKey({ description: "Release stage." })),
|
|
18
|
+
creator_id: OptionalRef.pipe(Schema.annotateKey({ description: "User who made the release." })),
|
|
19
|
+
start_date: OptionalString.pipe(
|
|
20
|
+
Schema.annotateKey({ description: "Start date, as YYYY-MM-DD." }),
|
|
21
|
+
),
|
|
22
|
+
target_date: OptionalString.pipe(
|
|
23
|
+
Schema.annotateKey({ description: "Target date, as YYYY-MM-DD." }),
|
|
24
|
+
),
|
|
25
|
+
started_at: OptionalTimestamp.pipe(
|
|
26
|
+
Schema.annotateKey({ description: "Time the release started." }),
|
|
27
|
+
),
|
|
28
|
+
completed_at: OptionalTimestamp.pipe(
|
|
29
|
+
Schema.annotateKey({ description: "Time the release was completed." }),
|
|
30
|
+
),
|
|
31
|
+
canceled_at: OptionalTimestamp.pipe(
|
|
32
|
+
Schema.annotateKey({ description: "Time the release was canceled." }),
|
|
33
|
+
),
|
|
34
|
+
trashed: Schema.NullOr(Schema.Boolean).pipe(
|
|
35
|
+
Schema.annotateKey({ description: "Whether the release is in the trash." }),
|
|
36
|
+
),
|
|
32
37
|
})
|
|
33
38
|
.annotate({ description: "Linear releases. Needs the Business plan." })
|
|
34
39
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -41,7 +46,7 @@ export const ReleaseObjectSchema = ReleaseSchema.mapFields((fields) =>
|
|
|
41
46
|
|
|
42
47
|
export const ReleaseNoteSchema = Schema.Struct({
|
|
43
48
|
...common("Release note"),
|
|
44
|
-
title: OptionalString.pipe(
|
|
49
|
+
title: OptionalString.pipe(Schema.annotateKey({ description: "Release note title." })),
|
|
45
50
|
content: Schema.NullOr(Schema.Struct({ content: OptionalString })).pipe(
|
|
46
51
|
Schema.decodeTo(
|
|
47
52
|
OptionalString,
|
|
@@ -50,11 +55,13 @@ export const ReleaseNoteSchema = Schema.Struct({
|
|
|
50
55
|
encode: (content) => (content === null ? null : { content }),
|
|
51
56
|
}),
|
|
52
57
|
),
|
|
53
|
-
|
|
58
|
+
Schema.annotateKey({ description: "Release note body in markdown." }),
|
|
59
|
+
),
|
|
60
|
+
url: Schema.String.pipe(Schema.annotateKey({ description: "Release note URL." })),
|
|
61
|
+
pipeline_id: Ref.pipe(Schema.annotateKey({ description: "Release pipeline." })),
|
|
62
|
+
release_ids: Schema.Array(Ref).pipe(
|
|
63
|
+
Schema.annotateKey({ description: "Releases covered by the note." }),
|
|
54
64
|
),
|
|
55
|
-
url: Schema.String.pipe(field(12, "Release note URL.")),
|
|
56
|
-
pipeline_id: Ref.pipe(field(13, "Release pipeline.")),
|
|
57
|
-
release_ids: list(101, Ref).pipe(field(14, "Releases covered by the note.")),
|
|
58
65
|
})
|
|
59
66
|
.annotate({ description: "Linear release notes. Needs the Business plan." })
|
|
60
67
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -67,15 +74,21 @@ export const ReleaseNoteObjectSchema = ReleaseNoteSchema.mapFields((fields) =>
|
|
|
67
74
|
|
|
68
75
|
export const ReleasePipelineSchema = Schema.Struct({
|
|
69
76
|
...common("Pipeline"),
|
|
70
|
-
name: Schema.String.pipe(
|
|
71
|
-
type: Schema.String.pipe(
|
|
72
|
-
is_production: Schema.Boolean.pipe(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Pipeline name." })),
|
|
78
|
+
type: Schema.String.pipe(Schema.annotateKey({ description: "Pipeline type." })),
|
|
79
|
+
is_production: Schema.Boolean.pipe(
|
|
80
|
+
Schema.annotateKey({ description: "Whether it releases to production." }),
|
|
81
|
+
),
|
|
82
|
+
url: Schema.String.pipe(Schema.annotateKey({ description: "Pipeline URL." })),
|
|
83
|
+
include_path_patterns: Schema.Array(Schema.String).pipe(
|
|
84
|
+
Schema.annotateKey({ description: "File paths that count toward the pipeline." }),
|
|
85
|
+
),
|
|
86
|
+
approximate_release_count: Long.pipe(
|
|
87
|
+
Schema.annotateKey({ description: "About how many releases it has." }),
|
|
88
|
+
),
|
|
89
|
+
trashed: Schema.NullOr(Schema.Boolean).pipe(
|
|
90
|
+
Schema.annotateKey({ description: "Whether the pipeline is in the trash." }),
|
|
76
91
|
),
|
|
77
|
-
approximate_release_count: Long.pipe(field(15, "About how many releases it has.")),
|
|
78
|
-
trashed: Schema.NullOr(Schema.Boolean).pipe(field(16, "Whether the pipeline is in the trash.")),
|
|
79
92
|
})
|
|
80
93
|
.annotate({ description: "Linear release pipelines. Needs the Business plan." })
|
|
81
94
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -88,12 +101,12 @@ export const ReleasePipelineObjectSchema = ReleasePipelineSchema.mapFields((fiel
|
|
|
88
101
|
|
|
89
102
|
export const ReleaseStageSchema = Schema.Struct({
|
|
90
103
|
...common("Stage"),
|
|
91
|
-
name: Schema.String.pipe(
|
|
92
|
-
type: Schema.String.pipe(
|
|
93
|
-
color: Schema.String.pipe(
|
|
94
|
-
position: Schema.Finite.pipe(
|
|
95
|
-
frozen: Schema.Boolean.pipe(
|
|
96
|
-
pipeline_id: Ref.pipe(
|
|
104
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Stage name." })),
|
|
105
|
+
type: Schema.String.pipe(Schema.annotateKey({ description: "Stage type." })),
|
|
106
|
+
color: Schema.String.pipe(Schema.annotateKey({ description: "Color, as hex." })),
|
|
107
|
+
position: Schema.Finite.pipe(Schema.annotateKey({ description: "Order in the pipeline." })),
|
|
108
|
+
frozen: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the stage is frozen." })),
|
|
109
|
+
pipeline_id: Ref.pipe(Schema.annotateKey({ description: "Release pipeline." })),
|
|
97
110
|
})
|
|
98
111
|
.annotate({ description: "Linear release stages. Needs the Business plan." })
|
|
99
112
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -106,8 +119,8 @@ export const ReleaseStageObjectSchema = ReleaseStageSchema.mapFields((fields) =>
|
|
|
106
119
|
|
|
107
120
|
export const IssueToReleaseSchema = Schema.Struct({
|
|
108
121
|
...common("Link"),
|
|
109
|
-
issue_id: Ref.pipe(
|
|
110
|
-
release_id: Ref.pipe(
|
|
122
|
+
issue_id: Ref.pipe(Schema.annotateKey({ description: "Issue." })),
|
|
123
|
+
release_id: Ref.pipe(Schema.annotateKey({ description: "Release." })),
|
|
111
124
|
})
|
|
112
125
|
.annotate({ description: "Links between Linear issues and releases. Needs the Business plan." })
|
|
113
126
|
.pipe(Iceberg.identifier("id"));
|
package/src/schemas/shared.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { Iceberg } from "@useairfoil/connector-kit";
|
|
2
1
|
import { Schema, SchemaTransformation } from "effect";
|
|
3
2
|
|
|
4
|
-
export const field = (fieldId: number, description: string) =>
|
|
5
|
-
Iceberg.field(fieldId, { description });
|
|
6
|
-
|
|
7
3
|
export const Timestamp = Schema.DateFromString;
|
|
8
4
|
|
|
9
5
|
/** Decodes a GraphQL Int as bigint for an Iceberg long. */
|
|
@@ -37,30 +33,36 @@ export const OptionalString = Schema.NullOr(Schema.String);
|
|
|
37
33
|
const RefConnection = Schema.Struct({ nodes: Schema.Array(Schema.Struct({ id: Schema.String })) });
|
|
38
34
|
|
|
39
35
|
/** Decodes connection nodes as IDs. The query must fetch any extra pages. */
|
|
40
|
-
export const RefList = (
|
|
41
|
-
|
|
42
|
-
Schema.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
export const list = <S extends Schema.Top>(elementId: number, item: S) =>
|
|
52
|
-
Schema.Array(item.annotate({ fieldId: elementId }));
|
|
36
|
+
export const RefList = RefConnection.pipe(
|
|
37
|
+
Schema.decodeTo(
|
|
38
|
+
Schema.Array(Schema.String),
|
|
39
|
+
SchemaTransformation.transform<ReadonlyArray<string>, typeof RefConnection.Type>({
|
|
40
|
+
decode: (connection) => connection.nodes.map((node) => node.id),
|
|
41
|
+
encode: (ids) => ({ nodes: ids.map((id) => ({ id })) }),
|
|
42
|
+
}),
|
|
43
|
+
),
|
|
44
|
+
);
|
|
53
45
|
|
|
54
46
|
/** Rows use updated_at as version; lifecycle webhooks use the webhook time. */
|
|
55
47
|
export const common = (object: string) => ({
|
|
56
|
-
id: Schema.String.pipe(
|
|
57
|
-
version: Schema.Date.pipe(
|
|
58
|
-
|
|
59
|
-
|
|
48
|
+
id: Schema.String.pipe(Schema.annotateKey({ description: `${object} ID.` })),
|
|
49
|
+
version: Schema.Date.pipe(
|
|
50
|
+
Schema.annotateKey({ description: `Time Linear last changed the ${object.toLowerCase()}.` }),
|
|
51
|
+
),
|
|
52
|
+
created_at: Timestamp.pipe(
|
|
53
|
+
Schema.annotateKey({ description: `Time the ${object.toLowerCase()} was created.` }),
|
|
54
|
+
),
|
|
55
|
+
updated_at: Timestamp.pipe(
|
|
56
|
+
Schema.annotateKey({ description: `Time the ${object.toLowerCase()} was last updated.` }),
|
|
57
|
+
),
|
|
60
58
|
archived_at: Schema.NullOr(Timestamp).pipe(
|
|
61
|
-
|
|
59
|
+
Schema.annotateKey({
|
|
60
|
+
description: `Time the ${object.toLowerCase()} was archived or trashed.`,
|
|
61
|
+
}),
|
|
62
62
|
),
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
export const deleted = (object: string) =>
|
|
66
|
-
Schema.optional(Schema.Boolean).pipe(
|
|
66
|
+
Schema.optional(Schema.Boolean).pipe(
|
|
67
|
+
Schema.annotateKey({ description: `Whether the ${object} was deleted in Linear.` }),
|
|
68
|
+
);
|
package/src/schemas/teams.ts
CHANGED
|
@@ -9,30 +9,45 @@ import {
|
|
|
9
9
|
Timestamp,
|
|
10
10
|
common,
|
|
11
11
|
deleted,
|
|
12
|
-
field,
|
|
13
12
|
} from "./shared";
|
|
14
13
|
|
|
15
14
|
export const TeamSchema = Schema.Struct({
|
|
16
15
|
...common("Team"),
|
|
17
|
-
name: Schema.String.pipe(
|
|
18
|
-
key: Schema.String.pipe(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Team name." })),
|
|
17
|
+
key: Schema.String.pipe(
|
|
18
|
+
Schema.annotateKey({ description: "Team key, used in issue IDs such as ENG-123." }),
|
|
19
|
+
),
|
|
20
|
+
display_name: Schema.String.pipe(Schema.annotateKey({ description: "Name shown in Linear." })),
|
|
21
|
+
description: OptionalString.pipe(Schema.annotateKey({ description: "Team description." })),
|
|
22
|
+
visibility: Schema.String.pipe(Schema.annotateKey({ description: "Who can see the team." })),
|
|
23
|
+
parent_id: OptionalRef.pipe(Schema.annotateKey({ description: "Parent team." })),
|
|
24
|
+
timezone: Schema.String.pipe(Schema.annotateKey({ description: "Team timezone." })),
|
|
25
|
+
cycles_enabled: Schema.Boolean.pipe(
|
|
26
|
+
Schema.annotateKey({ description: "Whether the team uses cycles." }),
|
|
27
|
+
),
|
|
28
|
+
cycle_duration: Schema.Finite.pipe(Schema.annotateKey({ description: "Cycle length in weeks." })),
|
|
29
|
+
cycle_cooldown_time: Schema.Finite.pipe(
|
|
30
|
+
Schema.annotateKey({ description: "Weeks between cycles." }),
|
|
31
|
+
),
|
|
32
|
+
cycle_start_day: Schema.Finite.pipe(
|
|
33
|
+
Schema.annotateKey({ description: "Day cycles start, 0 for Sunday." }),
|
|
34
|
+
),
|
|
35
|
+
triage_enabled: Schema.Boolean.pipe(
|
|
36
|
+
Schema.annotateKey({ description: "Whether the team uses triage." }),
|
|
37
|
+
),
|
|
38
|
+
issue_estimation_type: Schema.String.pipe(Schema.annotateKey({ description: "Estimate scale." })),
|
|
39
|
+
default_issue_estimate: Schema.Finite.pipe(
|
|
40
|
+
Schema.annotateKey({ description: "Default estimate." }),
|
|
41
|
+
),
|
|
42
|
+
auto_archive_period: Schema.Finite.pipe(
|
|
43
|
+
Schema.annotateKey({ description: "Months before closed issues are archived." }),
|
|
44
|
+
),
|
|
32
45
|
auto_close_period: Schema.NullOr(Schema.Finite).pipe(
|
|
33
|
-
|
|
46
|
+
Schema.annotateKey({ description: "Months before stale issues are closed." }),
|
|
47
|
+
),
|
|
48
|
+
retired_at: OptionalTimestamp.pipe(
|
|
49
|
+
Schema.annotateKey({ description: "Time the team was retired." }),
|
|
34
50
|
),
|
|
35
|
-
retired_at: OptionalTimestamp.pipe(field(26, "Time the team was retired.")),
|
|
36
51
|
})
|
|
37
52
|
.annotate({ description: "Linear teams." })
|
|
38
53
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -43,9 +58,11 @@ export const TeamObjectSchema = TeamSchema.mapFields((fields) => Struct.omit(fie
|
|
|
43
58
|
|
|
44
59
|
export const TeamMembershipSchema = Schema.Struct({
|
|
45
60
|
...common("Membership"),
|
|
46
|
-
team_id: Ref.pipe(
|
|
47
|
-
user_id: Ref.pipe(
|
|
48
|
-
owner: Schema.Boolean.pipe(
|
|
61
|
+
team_id: Ref.pipe(Schema.annotateKey({ description: "Team." })),
|
|
62
|
+
user_id: Ref.pipe(Schema.annotateKey({ description: "User." })),
|
|
63
|
+
owner: Schema.Boolean.pipe(
|
|
64
|
+
Schema.annotateKey({ description: "Whether the user owns the team." }),
|
|
65
|
+
),
|
|
49
66
|
})
|
|
50
67
|
.annotate({ description: "Linear team members. Removed members aren't seen." })
|
|
51
68
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -58,14 +75,16 @@ export const TeamMembershipObjectSchema = TeamMembershipSchema.mapFields((fields
|
|
|
58
75
|
|
|
59
76
|
export const WorkflowStateSchema = Schema.Struct({
|
|
60
77
|
...common("Workflow state"),
|
|
61
|
-
name: Schema.String.pipe(
|
|
78
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "State name." })),
|
|
62
79
|
type: Schema.String.pipe(
|
|
63
|
-
|
|
80
|
+
Schema.annotateKey({
|
|
81
|
+
description: "State type: triage, backlog, unstarted, started, completed, or canceled.",
|
|
82
|
+
}),
|
|
64
83
|
),
|
|
65
|
-
color: Schema.String.pipe(
|
|
66
|
-
description: OptionalString.pipe(
|
|
67
|
-
position: Schema.Finite.pipe(
|
|
68
|
-
team_id: Ref.pipe(
|
|
84
|
+
color: Schema.String.pipe(Schema.annotateKey({ description: "State color, as hex." })),
|
|
85
|
+
description: OptionalString.pipe(Schema.annotateKey({ description: "State description." })),
|
|
86
|
+
position: Schema.Finite.pipe(Schema.annotateKey({ description: "Order within the team." })),
|
|
87
|
+
team_id: Ref.pipe(Schema.annotateKey({ description: "Team." })),
|
|
69
88
|
})
|
|
70
89
|
.annotate({ description: "Linear workflow states. Names the IDs in `issues.state_id`." })
|
|
71
90
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -79,19 +98,25 @@ export const WorkflowStateObjectSchema = WorkflowStateSchema.mapFields((fields)
|
|
|
79
98
|
export const UserSchema = Schema.Struct({
|
|
80
99
|
...common("User"),
|
|
81
100
|
_deleted: deleted("user"),
|
|
82
|
-
name: Schema.String.pipe(
|
|
83
|
-
display_name: Schema.String.pipe(
|
|
84
|
-
email: Schema.String.pipe(
|
|
85
|
-
avatar_url: OptionalString.pipe(
|
|
86
|
-
title: OptionalString.pipe(
|
|
87
|
-
timezone: OptionalString.pipe(
|
|
88
|
-
active: Schema.Boolean.pipe(
|
|
89
|
-
admin: Schema.Boolean.pipe(
|
|
90
|
-
owner: Schema.Boolean.pipe(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
101
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Full name." })),
|
|
102
|
+
display_name: Schema.String.pipe(Schema.annotateKey({ description: "Display name." })),
|
|
103
|
+
email: Schema.String.pipe(Schema.annotateKey({ description: "Email address." })),
|
|
104
|
+
avatar_url: OptionalString.pipe(Schema.annotateKey({ description: "Avatar image URL." })),
|
|
105
|
+
title: OptionalString.pipe(Schema.annotateKey({ description: "Job title." })),
|
|
106
|
+
timezone: OptionalString.pipe(Schema.annotateKey({ description: "Timezone." })),
|
|
107
|
+
active: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the user is active." })),
|
|
108
|
+
admin: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the user is an admin." })),
|
|
109
|
+
owner: Schema.Boolean.pipe(
|
|
110
|
+
Schema.annotateKey({ description: "Whether the user owns the workspace." }),
|
|
111
|
+
),
|
|
112
|
+
guest: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the user is a guest." })),
|
|
113
|
+
app: Schema.Boolean.pipe(
|
|
114
|
+
Schema.annotateKey({ description: "Whether the user is an app or agent." }),
|
|
115
|
+
),
|
|
116
|
+
last_seen: OptionalTimestamp.pipe(
|
|
117
|
+
Schema.annotateKey({ description: "Time the user was last online." }),
|
|
118
|
+
),
|
|
119
|
+
url: Schema.String.pipe(Schema.annotateKey({ description: "Profile URL." })),
|
|
95
120
|
})
|
|
96
121
|
.annotate({ description: "Linear users." })
|
|
97
122
|
.pipe(Iceberg.identifier("id"));
|
|
@@ -104,11 +129,13 @@ export const UserObjectSchema = UserSchema.mapFields((fields) =>
|
|
|
104
129
|
|
|
105
130
|
export const ExternalUserSchema = Schema.Struct({
|
|
106
131
|
...common("External user"),
|
|
107
|
-
name: Schema.String.pipe(
|
|
108
|
-
display_name: Schema.String.pipe(
|
|
109
|
-
email: OptionalString.pipe(
|
|
110
|
-
avatar_url: OptionalString.pipe(
|
|
111
|
-
last_seen: OptionalTimestamp.pipe(
|
|
132
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Name." })),
|
|
133
|
+
display_name: Schema.String.pipe(Schema.annotateKey({ description: "Display name." })),
|
|
134
|
+
email: OptionalString.pipe(Schema.annotateKey({ description: "Email address." })),
|
|
135
|
+
avatar_url: OptionalString.pipe(Schema.annotateKey({ description: "Avatar image URL." })),
|
|
136
|
+
last_seen: OptionalTimestamp.pipe(
|
|
137
|
+
Schema.annotateKey({ description: "Time the user was last seen." }),
|
|
138
|
+
),
|
|
112
139
|
})
|
|
113
140
|
.annotate({
|
|
114
141
|
description: "People from integrations, such as Slack, who create issues and comments.",
|
|
@@ -124,15 +151,21 @@ export const ExternalUserObjectSchema = ExternalUserSchema.mapFields((fields) =>
|
|
|
124
151
|
export const CycleSchema = Schema.Struct({
|
|
125
152
|
...common("Cycle"),
|
|
126
153
|
_deleted: deleted("cycle"),
|
|
127
|
-
number: Schema.Finite.pipe(
|
|
128
|
-
name: OptionalString.pipe(
|
|
129
|
-
description: OptionalString.pipe(
|
|
130
|
-
team_id: Ref.pipe(
|
|
131
|
-
starts_at: Timestamp.pipe(
|
|
132
|
-
ends_at: Timestamp.pipe(
|
|
133
|
-
completed_at: OptionalTimestamp.pipe(
|
|
134
|
-
|
|
135
|
-
|
|
154
|
+
number: Schema.Finite.pipe(Schema.annotateKey({ description: "Cycle number within its team." })),
|
|
155
|
+
name: OptionalString.pipe(Schema.annotateKey({ description: "Cycle name." })),
|
|
156
|
+
description: OptionalString.pipe(Schema.annotateKey({ description: "Cycle description." })),
|
|
157
|
+
team_id: Ref.pipe(Schema.annotateKey({ description: "Team." })),
|
|
158
|
+
starts_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the cycle starts." })),
|
|
159
|
+
ends_at: Timestamp.pipe(Schema.annotateKey({ description: "Time the cycle ends." })),
|
|
160
|
+
completed_at: OptionalTimestamp.pipe(
|
|
161
|
+
Schema.annotateKey({ description: "Time the cycle was completed." }),
|
|
162
|
+
),
|
|
163
|
+
auto_archived_at: OptionalTimestamp.pipe(
|
|
164
|
+
Schema.annotateKey({ description: "Time the cycle was archived automatically." }),
|
|
165
|
+
),
|
|
166
|
+
progress: Schema.Finite.pipe(
|
|
167
|
+
Schema.annotateKey({ description: "Share of the scope completed, from 0 to 1." }),
|
|
168
|
+
),
|
|
136
169
|
})
|
|
137
170
|
.annotate({ description: "Linear cycles." })
|
|
138
171
|
.pipe(Iceberg.identifier("id"));
|
package/src/start.ts
CHANGED
|
@@ -30,7 +30,7 @@ export const startCommand = Command.make("start", {}, () =>
|
|
|
30
30
|
const entrypoint = yield* LinearConnector.LinearConnector;
|
|
31
31
|
|
|
32
32
|
return yield* ConnectorApp.start(entrypoint, { port }).pipe(
|
|
33
|
-
Effect.provide(Ingestor.
|
|
33
|
+
Effect.provide(Ingestor.layerArrowFlightConfig(entrypoint)),
|
|
34
34
|
);
|
|
35
35
|
}).pipe(
|
|
36
36
|
Effect.annotateLogs({ component: "linear" }),
|
|
@@ -44,4 +44,4 @@ export const startCommand = Command.make("start", {}, () =>
|
|
|
44
44
|
),
|
|
45
45
|
Effect.provide(RuntimeConfig.layerHosted()),
|
|
46
46
|
),
|
|
47
|
-
).pipe(Command.withDescription("Run the
|
|
47
|
+
).pipe(Command.withDescription("Run the connector"));
|