@corsair-dev/linear 0.1.7 → 0.1.9

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 CHANGED
@@ -14,17 +14,17 @@ pnpm add @corsair-dev/linear
14
14
  |-----------|--------------|------|-------------|
15
15
  | `comments.create` | `linear.api.comments.create` | `write` | Post a comment on an issue |
16
16
  | `comments.delete` | `linear.api.comments.delete` | `destructive` | Delete a comment [DESTRUCTIVE] |
17
- | `comments.list` | `linear.api.comments.list` | `read` | List comments on an issue |
17
+ | `comments.list` | `linear.api.comments.list` | `read` | Comments on one issue; issueId is the UUID or an identifier such as "ENG-123". |
18
18
  | `comments.update` | `linear.api.comments.update` | `write` | Update a comment |
19
19
  | `issues.create` | `linear.api.issues.create` | `write` | Create a new issue |
20
20
  | `issues.delete` | `linear.api.issues.delete` | `destructive` | Permanently delete an issue [DESTRUCTIVE · IRREVERSIBLE] |
21
- | `issues.get` | `linear.api.issues.get` | `read` | Get a specific issue |
22
- | `issues.list` | `linear.api.issues.list` | `read` | List issues in a team |
21
+ | `issues.get` | `linear.api.issues.get` | `read` | Reads one issue; id is the UUID or an identifier such as "ENG-123". |
22
+ | `issues.list` | `linear.api.issues.list` | `read` | Lists issues, newest created first, across the workspace or one team; filter by assignee, state, labels or project. |
23
23
  | `issues.update` | `linear.api.issues.update` | `write` | Update an existing issue |
24
24
  | `projects.create` | `linear.api.projects.create` | `write` | Create a new project |
25
25
  | `projects.delete` | `linear.api.projects.delete` | `destructive` | Permanently delete a project [DESTRUCTIVE · IRREVERSIBLE] |
26
26
  | `projects.get` | `linear.api.projects.get` | `read` | Get a specific project |
27
- | `projects.list` | `linear.api.projects.list` | `read` | List projects in a team |
27
+ | `projects.list` | `linear.api.projects.list` | `read` | Lists every project in the workspace; there is no team filter, so check each project's teams. Page with after. |
28
28
  | `projects.update` | `linear.api.projects.update` | `write` | Update an existing project |
29
29
  | `teams.get` | `linear.api.teams.get` | `read` | Get a specific team |
30
30
  | `teams.list` | `linear.api.teams.list` | `read` | List teams in the workspace |
@@ -878,6 +878,8 @@ export declare const Issues: {
878
878
  teamId?: string | undefined;
879
879
  first?: number | undefined;
880
880
  after?: string | undefined;
881
+ filter?: import("./types").IssueFilter | undefined;
882
+ orderBy?: "createdAt" | "updatedAt" | undefined;
881
883
  }) => Promise<{
882
884
  nodes: ({
883
885
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../endpoints/index.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMlB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMpB,CAAC;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGjB,CAAC;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGjB,CAAC;AAEF,cAAc,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=issues-list.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issues-list.test.d.ts","sourceRoot":"","sources":["../../endpoints/issues-list.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"issues.d.ts","sourceRoot":"","sources":["../../endpoints/issues.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAwB,eAAe,EAAE,MAAM,UAAU,CAAC;AA2RtE,eAAO,MAAM,IAAI,EAAE,eAAe,CAAC,YAAY,CA6C9C,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,eAAe,CAAC,WAAW,CAkC5C,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,cAAc,CAqBlD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,cAAc,CAqBlD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,cAAc,CA2BvD,CAAC"}
1
+ {"version":3,"file":"issues.d.ts","sourceRoot":"","sources":["../../endpoints/issues.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAwB,eAAe,EAAE,MAAM,UAAU,CAAC;AA4LtE,eAAO,MAAM,IAAI,EAAE,eAAe,CAAC,YAAY,CA2D9C,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,eAAe,CAAC,WAAW,CAkC5C,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,cAAc,CAqBlD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,cAAc,CAqBlD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,cAAc,CA2BvD,CAAC"}
@@ -1,10 +1,201 @@
1
1
  import { z } from 'zod';
2
2
  export declare const IssuePrioritySchema: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>;
3
+ declare const DateComparatorSchema: z.ZodObject<{
4
+ eq: z.ZodOptional<z.ZodString>;
5
+ neq: z.ZodOptional<z.ZodString>;
6
+ lt: z.ZodOptional<z.ZodString>;
7
+ lte: z.ZodOptional<z.ZodString>;
8
+ gt: z.ZodOptional<z.ZodString>;
9
+ gte: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strict>;
11
+ declare const StringComparatorSchema: z.ZodObject<{
12
+ eq: z.ZodOptional<z.ZodString>;
13
+ neq: z.ZodOptional<z.ZodString>;
14
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
15
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
16
+ contains: z.ZodOptional<z.ZodString>;
17
+ containsIgnoreCase: z.ZodOptional<z.ZodString>;
18
+ notContains: z.ZodOptional<z.ZodString>;
19
+ notContainsIgnoreCase: z.ZodOptional<z.ZodString>;
20
+ startsWith: z.ZodOptional<z.ZodString>;
21
+ endsWith: z.ZodOptional<z.ZodString>;
22
+ }, z.core.$strict>;
23
+ declare const IdComparatorSchema: z.ZodObject<{
24
+ eq: z.ZodOptional<z.ZodString>;
25
+ neq: z.ZodOptional<z.ZodString>;
26
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
27
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ }, z.core.$strict>;
29
+ declare const AssigneeFilterSchema: z.ZodObject<{
30
+ id: z.ZodOptional<z.ZodObject<{
31
+ eq: z.ZodOptional<z.ZodString>;
32
+ neq: z.ZodOptional<z.ZodString>;
33
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
34
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
+ }, z.core.$strict>>;
36
+ isMe: z.ZodOptional<z.ZodObject<{
37
+ eq: z.ZodOptional<z.ZodBoolean>;
38
+ neq: z.ZodOptional<z.ZodBoolean>;
39
+ }, z.core.$strict>>;
40
+ name: z.ZodOptional<z.ZodObject<{
41
+ eq: z.ZodOptional<z.ZodString>;
42
+ neq: z.ZodOptional<z.ZodString>;
43
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
44
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
45
+ contains: z.ZodOptional<z.ZodString>;
46
+ containsIgnoreCase: z.ZodOptional<z.ZodString>;
47
+ notContains: z.ZodOptional<z.ZodString>;
48
+ notContainsIgnoreCase: z.ZodOptional<z.ZodString>;
49
+ startsWith: z.ZodOptional<z.ZodString>;
50
+ endsWith: z.ZodOptional<z.ZodString>;
51
+ }, z.core.$strict>>;
52
+ displayName: z.ZodOptional<z.ZodObject<{
53
+ eq: z.ZodOptional<z.ZodString>;
54
+ neq: z.ZodOptional<z.ZodString>;
55
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
56
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
57
+ contains: z.ZodOptional<z.ZodString>;
58
+ containsIgnoreCase: z.ZodOptional<z.ZodString>;
59
+ notContains: z.ZodOptional<z.ZodString>;
60
+ notContainsIgnoreCase: z.ZodOptional<z.ZodString>;
61
+ startsWith: z.ZodOptional<z.ZodString>;
62
+ endsWith: z.ZodOptional<z.ZodString>;
63
+ }, z.core.$strict>>;
64
+ email: z.ZodOptional<z.ZodObject<{
65
+ eq: z.ZodOptional<z.ZodString>;
66
+ neq: z.ZodOptional<z.ZodString>;
67
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
68
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
69
+ contains: z.ZodOptional<z.ZodString>;
70
+ containsIgnoreCase: z.ZodOptional<z.ZodString>;
71
+ notContains: z.ZodOptional<z.ZodString>;
72
+ notContainsIgnoreCase: z.ZodOptional<z.ZodString>;
73
+ startsWith: z.ZodOptional<z.ZodString>;
74
+ endsWith: z.ZodOptional<z.ZodString>;
75
+ }, z.core.$strict>>;
76
+ null: z.ZodOptional<z.ZodBoolean>;
77
+ }, z.core.$strict>;
78
+ declare const StateFilterSchema: z.ZodObject<{
79
+ id: z.ZodOptional<z.ZodObject<{
80
+ eq: z.ZodOptional<z.ZodString>;
81
+ neq: z.ZodOptional<z.ZodString>;
82
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
83
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
84
+ }, z.core.$strict>>;
85
+ name: z.ZodOptional<z.ZodObject<{
86
+ eq: z.ZodOptional<z.ZodString>;
87
+ neq: z.ZodOptional<z.ZodString>;
88
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
89
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
90
+ contains: z.ZodOptional<z.ZodString>;
91
+ containsIgnoreCase: z.ZodOptional<z.ZodString>;
92
+ notContains: z.ZodOptional<z.ZodString>;
93
+ notContainsIgnoreCase: z.ZodOptional<z.ZodString>;
94
+ startsWith: z.ZodOptional<z.ZodString>;
95
+ endsWith: z.ZodOptional<z.ZodString>;
96
+ }, z.core.$strict>>;
97
+ type: z.ZodOptional<z.ZodObject<{
98
+ eq: z.ZodOptional<z.ZodString>;
99
+ neq: z.ZodOptional<z.ZodString>;
100
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
101
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
102
+ contains: z.ZodOptional<z.ZodString>;
103
+ containsIgnoreCase: z.ZodOptional<z.ZodString>;
104
+ notContains: z.ZodOptional<z.ZodString>;
105
+ notContainsIgnoreCase: z.ZodOptional<z.ZodString>;
106
+ startsWith: z.ZodOptional<z.ZodString>;
107
+ endsWith: z.ZodOptional<z.ZodString>;
108
+ }, z.core.$strict>>;
109
+ }, z.core.$strict>;
110
+ declare const LabelsFilterSchema: z.ZodObject<{
111
+ some: z.ZodOptional<z.ZodObject<{
112
+ id: z.ZodOptional<z.ZodObject<{
113
+ eq: z.ZodOptional<z.ZodString>;
114
+ neq: z.ZodOptional<z.ZodString>;
115
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
116
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
117
+ }, z.core.$strict>>;
118
+ name: z.ZodOptional<z.ZodObject<{
119
+ eq: z.ZodOptional<z.ZodString>;
120
+ neq: z.ZodOptional<z.ZodString>;
121
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
122
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
123
+ contains: z.ZodOptional<z.ZodString>;
124
+ containsIgnoreCase: z.ZodOptional<z.ZodString>;
125
+ notContains: z.ZodOptional<z.ZodString>;
126
+ notContainsIgnoreCase: z.ZodOptional<z.ZodString>;
127
+ startsWith: z.ZodOptional<z.ZodString>;
128
+ endsWith: z.ZodOptional<z.ZodString>;
129
+ }, z.core.$strict>>;
130
+ }, z.core.$strict>>;
131
+ every: z.ZodOptional<z.ZodObject<{
132
+ id: z.ZodOptional<z.ZodObject<{
133
+ eq: z.ZodOptional<z.ZodString>;
134
+ neq: z.ZodOptional<z.ZodString>;
135
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
136
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
137
+ }, z.core.$strict>>;
138
+ name: z.ZodOptional<z.ZodObject<{
139
+ eq: z.ZodOptional<z.ZodString>;
140
+ neq: z.ZodOptional<z.ZodString>;
141
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
142
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
143
+ contains: z.ZodOptional<z.ZodString>;
144
+ containsIgnoreCase: z.ZodOptional<z.ZodString>;
145
+ notContains: z.ZodOptional<z.ZodString>;
146
+ notContainsIgnoreCase: z.ZodOptional<z.ZodString>;
147
+ startsWith: z.ZodOptional<z.ZodString>;
148
+ endsWith: z.ZodOptional<z.ZodString>;
149
+ }, z.core.$strict>>;
150
+ }, z.core.$strict>>;
151
+ }, z.core.$strict>;
152
+ declare const ProjectFilterSchema: z.ZodObject<{
153
+ id: z.ZodOptional<z.ZodObject<{
154
+ eq: z.ZodOptional<z.ZodString>;
155
+ neq: z.ZodOptional<z.ZodString>;
156
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
157
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
158
+ }, z.core.$strict>>;
159
+ name: z.ZodOptional<z.ZodObject<{
160
+ eq: z.ZodOptional<z.ZodString>;
161
+ neq: z.ZodOptional<z.ZodString>;
162
+ in: z.ZodOptional<z.ZodArray<z.ZodString>>;
163
+ nin: z.ZodOptional<z.ZodArray<z.ZodString>>;
164
+ contains: z.ZodOptional<z.ZodString>;
165
+ containsIgnoreCase: z.ZodOptional<z.ZodString>;
166
+ notContains: z.ZodOptional<z.ZodString>;
167
+ notContainsIgnoreCase: z.ZodOptional<z.ZodString>;
168
+ startsWith: z.ZodOptional<z.ZodString>;
169
+ endsWith: z.ZodOptional<z.ZodString>;
170
+ }, z.core.$strict>>;
171
+ null: z.ZodOptional<z.ZodBoolean>;
172
+ }, z.core.$strict>;
173
+ export type IssueFilter = {
174
+ createdAt?: z.infer<typeof DateComparatorSchema>;
175
+ updatedAt?: z.infer<typeof DateComparatorSchema>;
176
+ title?: z.infer<typeof StringComparatorSchema>;
177
+ description?: z.infer<typeof StringComparatorSchema>;
178
+ team?: {
179
+ id?: z.infer<typeof IdComparatorSchema>;
180
+ };
181
+ assignee?: z.infer<typeof AssigneeFilterSchema>;
182
+ state?: z.infer<typeof StateFilterSchema>;
183
+ labels?: z.infer<typeof LabelsFilterSchema>;
184
+ project?: z.infer<typeof ProjectFilterSchema>;
185
+ and?: IssueFilter[];
186
+ or?: IssueFilter[];
187
+ };
188
+ export declare const IssueFilterSchema: z.ZodType<IssueFilter>;
3
189
  export declare const LinearEndpointInputSchemas: {
4
190
  readonly issuesList: z.ZodObject<{
5
191
  teamId: z.ZodOptional<z.ZodString>;
6
192
  first: z.ZodOptional<z.ZodNumber>;
7
193
  after: z.ZodOptional<z.ZodString>;
194
+ filter: z.ZodOptional<z.ZodType<IssueFilter, unknown, z.core.$ZodTypeInternals<IssueFilter, unknown>>>;
195
+ orderBy: z.ZodOptional<z.ZodEnum<{
196
+ createdAt: "createdAt";
197
+ updatedAt: "updatedAt";
198
+ }>>;
8
199
  }, z.core.$strip>;
9
200
  readonly issuesGet: z.ZodObject<{
10
201
  id: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../endpoints/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB,4GAM9B,CAAC;AAyIH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmB7B,CAAC;AAEX,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5E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -405,6 +405,11 @@ export declare const linearEndpointSchemas: {
405
405
  teamId: import("zod").ZodOptional<import("zod").ZodString>;
406
406
  first: import("zod").ZodOptional<import("zod").ZodNumber>;
407
407
  after: import("zod").ZodOptional<import("zod").ZodString>;
408
+ filter: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").IssueFilter, unknown, import("zod/v4/core").$ZodTypeInternals<import("./endpoints").IssueFilter, unknown>>>;
409
+ orderBy: import("zod").ZodOptional<import("zod").ZodEnum<{
410
+ createdAt: "createdAt";
411
+ updatedAt: "updatedAt";
412
+ }>>;
408
413
  }, import("zod/v4/core").$strip>;
409
414
  readonly output: import("zod").ZodObject<{
410
415
  nodes: import("zod").ZodArray<import("zod").ZodType<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,EACb,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,QAAQ,EAER,uBAAuB,EAEvB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAO/E,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EACX,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,MAAM,YAAY,CAAC;AAgBpB,MAAM,MAAM,mBAAmB,GAAG;IACjC,QAAQ,CAAC,EAAE,QAAQ,CAAC,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC;IACvD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACtC,YAAY,CAAC,EAAE,oBAAoB,CAAC,cAAc,CAAC,CAAC;IACpD,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC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AoB,CAAC,CAAC,SAAS,mBAAmB,IAC7D,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAErB,wBAAgB,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,mBAAmB,EACzD,eAAe,GAAE,mBAAmB,GAAG,CAAiC,GACtE,oBAAoB,CAAC,CAAC,CAAC,CAkGzB;AAED,OAAO,EACN,sBAAsB,EACtB,4BAA4B,GAC5B,MAAM,kBAAkB,CAAC;AAM1B,YAAY,EACX,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,GACX,MAAM,kBAAkB,CAAC;AAM1B,YAAY,EACX,OAAO,EACP,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,KAAK,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,EACL,oBAAoB,EACpB,qBAAqB,EACrB,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,IAAI,EACJ,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,IAAI,EACJ,aAAa,EACb,iBAAiB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";import{attachManagedRefreshAuth as no,getManagedAccessToken as ao}from"corsair/hub";import{logEventFromContext as U}from"corsair/core";import{ApiError as tt,BaseWebhookHandler as bo,request as ot,verifyHmacSignature as yo}from"corsair/http";var I=class extends Error{constructor(i,r){super(i);this.code=r;this.name="LinearAPIError"}},nt="https://api.linear.app/graphql";async function p(t,n,i){let r={BASE:nt,VERSION:"1.0.0",WITH_CREDENTIALS:!1,CREDENTIALS:"omit",HEADERS:{"Content-Type":"application/json",Authorization:n}},o={method:"POST",url:"",body:{query:t,variables:i||{}},mediaType:"application/json"};try{let c=await ot(r,o);if(c.errors&&c.errors.length>0){let s=c.errors.map(h=>h.message).join(", ");throw new I(s)}if(!c.data)throw new I("No data returned from Linear API");return c.data}catch(c){if(c instanceof I)throw c;if(c instanceof tt){let s=typeof c.body=="object"?JSON.stringify(c.body):String(c.body??"");throw new I(`${c.message} (status=${c.status}, body=${s})`)}throw new I(c instanceof Error?c.message:"Unknown error")}}var at=`
1
+ import{AuthMissingError as ct,getOAuthAccessToken as go}from"corsair/core";import{attachManagedRefreshAuth as yo,getManagedAccessToken as fo}from"corsair/hub";import{logEventFromContext as x}from"corsair/core";import{ApiError as dt,BaseWebhookHandler as So,request as pt,verifyHmacSignature as wo}from"corsair/http";var C=class extends Error{constructor(r,s){super(r);this.code=s;this.name="LinearAPIError"}},lt="https://api.linear.app/graphql";async function p(t,n,r){let s={BASE:lt,VERSION:"1.0.0",WITH_CREDENTIALS:!1,CREDENTIALS:"omit",HEADERS:{"Content-Type":"application/json",Authorization:n}},o={method:"POST",url:"",body:{query:t,variables:r||{}},mediaType:"application/json"};try{let d=await pt(s,o);if(d.errors&&d.errors.length>0){let i=d.errors.map(y=>y.message).join(", ");throw new C(i)}if(!d.data)throw new C("No data returned from Linear API");return d.data}catch(d){if(d instanceof C)throw d;if(d instanceof dt){let i=typeof d.body=="object"?JSON.stringify(d.body):String(d.body??"");throw new C(`${d.message} (status=${d.status}, body=${i})`)}throw new C(d instanceof Error?d.message:"Unknown error")}}var ut=`
2
2
  query Comments($issueId: String!, $first: Int!, $after: String) {
3
3
  issue(id: $issueId) {
4
4
  comments(first: $first, after: $after) {
@@ -30,7 +30,7 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
30
30
  }
31
31
  }
32
32
  }
33
- `,rt=`
33
+ `,mt=`
34
34
  mutation CreateComment($input: CommentCreateInput!) {
35
35
  commentCreate(input: $input) {
36
36
  success
@@ -54,7 +54,7 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
54
54
  }
55
55
  }
56
56
  }
57
- `,st=`
57
+ `,bt=`
58
58
  mutation UpdateComment($id: String!, $input: CommentUpdateInput!) {
59
59
  commentUpdate(id: $id, input: $input) {
60
60
  success
@@ -79,117 +79,76 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
79
79
  }
80
80
  }
81
81
  }
82
- `,it=`
82
+ `,gt=`
83
83
  mutation DeleteComment($id: String!) {
84
84
  commentDelete(id: $id) {
85
85
  success
86
86
  }
87
87
  }
88
- `,oe=async(t,n)=>{let i=t.key,o=(await p(at,i,{issueId:n.issueId,first:n.first||50,after:n.after})).issue.comments;if(o.nodes&&t.db.comments)try{for(let c of o.nodes)await t.db.comments.upsertByEntityId(c.id,{...c,issueId:c.issue.id,userId:c.user.id,parentId:c.parent?.id,createdAt:new Date(c.createdAt??""),updatedAt:new Date(c.updatedAt??"")})}catch(c){console.warn("Failed to save comments to database:",c)}return await U(t,"linear.comments.list",{...n},"completed"),o},ne=async(t,n)=>{let i=t.key,o=(await p(rt,i,{input:n})).commentCreate.comment;if(o&&t.db.comments)try{await t.db.comments.upsertByEntityId(o.id,{...o,issueId:o.issue.id,userId:o.user.id,parentId:o.parent?.id,createdAt:new Date(o.createdAt??""),updatedAt:new Date(o.updatedAt??"")})}catch(c){console.warn("Failed to save comment to database:",c)}return await U(t,"linear.comments.create",{...n},"completed"),o},ae=async(t,n)=>{let i=t.key,o=(await p(st,i,{id:n.id,input:n.input})).commentUpdate.comment;if(o&&t.db.comments)try{await t.db.comments.upsertByEntityId(o.id,{...o,issueId:o.issue.id,userId:o.user.id,parentId:o.parent?.id,createdAt:new Date(o.createdAt??""),updatedAt:new Date(o.updatedAt??"")})}catch(c){console.warn("Failed to update comment in database:",c)}return await U(t,"linear.comments.update",{...n},"completed"),o},re=async(t,n)=>{let i=t.key,o=(await p(it,i,{id:n.id})).commentDelete.success;if(o&&t.db.comments)try{await t.db.comments.deleteByEntityId(n.id)}catch(c){console.warn("Failed to delete comment from database:",c)}return await U(t,"linear.comments.delete",{...n},"completed"),o};import{logEventFromContext as S}from"corsair/core";var dt=`
89
- query Issues($teamId: ID!, $first: Int!, $after: String) {
90
- issues(filter: { team: { id: { eq: $teamId } } }, first: $first, after: $after) {
91
- nodes {
92
- id
93
- title
94
- description
95
- priority
96
- estimate
97
- sortOrder
98
- number
99
- identifier
100
- url
101
- state {
102
- id
103
- name
104
- type
105
- color
106
- position
107
- }
108
- team {
109
- id
110
- name
111
- key
112
- }
113
- assignee {
114
- id
115
- name
116
- displayName
117
- email
118
- avatarUrl
119
- }
120
- creator {
121
- id
122
- name
123
- displayName
124
- email
125
- avatarUrl
126
- }
127
- labels {
128
- nodes {
129
- id
130
- name
131
- color
132
- }
133
- }
134
- createdAt
135
- updatedAt
136
- }
137
- pageInfo {
138
- hasNextPage
139
- hasPreviousPage
140
- startCursor
141
- endCursor
142
- }
88
+ `,se=async(t,n)=>{let r=t.key,o=(await p(ut,r,{issueId:n.issueId,first:n.first||50,after:n.after})).issue.comments;if(o.nodes&&t.db.comments)try{for(let d of o.nodes)await t.db.comments.upsertByEntityId(d.id,{...d,issueId:d.issue.id,userId:d.user.id,parentId:d.parent?.id,createdAt:new Date(d.createdAt??""),updatedAt:new Date(d.updatedAt??"")})}catch(d){console.warn("Failed to save comments to database:",d)}return await x(t,"linear.comments.list",{...n},"completed"),o},ie=async(t,n)=>{let r=t.key,o=(await p(mt,r,{input:n})).commentCreate.comment;if(o&&t.db.comments)try{await t.db.comments.upsertByEntityId(o.id,{...o,issueId:o.issue.id,userId:o.user.id,parentId:o.parent?.id,createdAt:new Date(o.createdAt??""),updatedAt:new Date(o.updatedAt??"")})}catch(d){console.warn("Failed to save comment to database:",d)}return await x(t,"linear.comments.create",{...n},"completed"),o},ce=async(t,n)=>{let r=t.key,o=(await p(bt,r,{id:n.id,input:n.input})).commentUpdate.comment;if(o&&t.db.comments)try{await t.db.comments.upsertByEntityId(o.id,{...o,issueId:o.issue.id,userId:o.user.id,parentId:o.parent?.id,createdAt:new Date(o.createdAt??""),updatedAt:new Date(o.updatedAt??"")})}catch(d){console.warn("Failed to update comment in database:",d)}return await x(t,"linear.comments.update",{...n},"completed"),o},de=async(t,n)=>{let r=t.key,o=(await p(gt,r,{id:n.id})).commentDelete.success;if(o&&t.db.comments)try{await t.db.comments.deleteByEntityId(n.id)}catch(d){console.warn("Failed to delete comment from database:",d)}return await x(t,"linear.comments.delete",{...n},"completed"),o};import{logEventFromContext as D}from"corsair/core";import{z as e}from"zod";var L=e.union([e.literal(0),e.literal(1),e.literal(2),e.literal(3),e.literal(4)]),pe=e.object({eq:e.string(),neq:e.string(),lt:e.string(),lte:e.string(),gt:e.string(),gte:e.string()}).partial().strict(),f=e.object({eq:e.string(),neq:e.string(),in:e.array(e.string()),nin:e.array(e.string()),contains:e.string(),containsIgnoreCase:e.string(),notContains:e.string(),notContainsIgnoreCase:e.string(),startsWith:e.string(),endsWith:e.string()}).partial().strict(),k=e.object({eq:e.string(),neq:e.string(),in:e.array(e.string()),nin:e.array(e.string())}).partial().strict(),yt=e.object({eq:e.boolean(),neq:e.boolean()}).partial().strict(),ft=e.object({id:k,isMe:yt,name:f,displayName:f,email:f,null:e.boolean()}).partial().strict(),ht=e.object({id:k,name:f,type:f}).partial().strict(),le=e.object({id:k,name:f}).partial().strict(),It=e.object({some:le,every:le}).partial().strict(),jt=e.object({id:k,name:f,null:e.boolean()}).partial().strict(),Y=e.lazy(()=>e.object({createdAt:pe,updatedAt:pe,title:f,description:f,team:e.object({id:k}).partial().strict(),assignee:ft,state:ht,labels:It,project:jt,and:e.array(Y),or:e.array(Y)}).partial().strict()),Ct=e.object({teamId:e.string().optional().describe('Team UUID from teams.list, not the short key like "ENG".'),first:e.number().optional(),after:e.string().optional().describe("pageInfo.endCursor from the previous page."),filter:Y.optional().describe("Server-side filter on assignee (isMe or id), state (type or name), labels.some (name), project (id), plus createdAt, updatedAt, title, description, team, and/or."),orderBy:e.enum(["createdAt","updatedAt"]).optional()}),Lt=e.object({id:e.string()}),Et=e.object({title:e.string(),description:e.string().optional(),teamId:e.string(),assigneeId:e.string().optional(),priority:L.optional(),estimate:e.number().optional(),stateId:e.string().optional(),projectId:e.string().optional(),cycleId:e.string().optional(),parentId:e.string().optional(),labelIds:e.array(e.string()).optional(),subscriberIds:e.array(e.string()).optional(),dueDate:e.string().optional()}),At=e.object({id:e.string(),input:e.object({title:e.string().optional(),description:e.string().optional(),assigneeId:e.string().optional(),priority:L.optional(),estimate:e.number().optional(),stateId:e.string().optional(),projectId:e.string().optional(),cycleId:e.string().optional(),parentId:e.string().optional(),labelIds:e.array(e.string()).optional(),subscriberIds:e.array(e.string()).optional(),dueDate:e.string().optional()})}),vt=e.object({id:e.string()}),St=e.object({first:e.number().optional(),after:e.string().optional()}),wt=e.object({id:e.string()}),kt=e.object({first:e.number().optional(),after:e.string().optional()}),Rt=e.object({id:e.string()}),Dt=e.object({first:e.number().optional(),after:e.string().optional()}),Ut=e.object({id:e.string()}),Pt=e.object({name:e.string(),description:e.string().optional(),icon:e.string().optional(),color:e.string().optional(),teamIds:e.array(e.string()),leadId:e.string().optional(),state:e.enum(["planned","started","paused","completed","canceled"]).optional(),priority:e.number().optional(),startDate:e.string().optional(),targetDate:e.string().optional()}),xt=e.object({id:e.string(),input:e.object({name:e.string().optional(),description:e.string().optional(),icon:e.string().optional(),color:e.string().optional(),teamIds:e.array(e.string()).optional(),leadId:e.string().optional(),state:e.enum(["planned","started","paused","completed","canceled"]).optional(),priority:e.number().optional(),startDate:e.string().optional(),targetDate:e.string().optional()})}),Tt=e.object({id:e.string()}),zt=e.object({issueId:e.string().describe('Issue UUID or identifier such as "ENG-123".'),first:e.number().optional(),after:e.string().optional()}),Wt=e.object({issueId:e.string(),body:e.string(),parentId:e.string().optional()}),Ot=e.object({id:e.string(),input:e.object({body:e.string().optional()})}),Nt=e.object({id:e.string()}),l={issuesList:Ct,issuesGet:Lt,issuesCreate:Et,issuesUpdate:At,issuesDelete:vt,teamsList:St,teamsGet:wt,usersList:kt,usersGet:Rt,projectsList:Dt,projectsGet:Ut,projectsCreate:Pt,projectsUpdate:xt,projectsDelete:Tt,commentsList:zt,commentsCreate:Wt,commentsUpdate:Ot,commentsDelete:Nt},I=e.object({id:e.string(),name:e.string(),email:e.string().optional().nullable(),displayName:e.string(),avatarUrl:e.string().optional().nullable(),active:e.boolean(),admin:e.boolean(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional()}),j=e.object({id:e.string(),name:e.string(),key:e.string(),description:e.string().optional().nullable(),icon:e.string().optional().nullable(),color:e.string().optional().nullable(),private:e.boolean(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),be=e.enum(["backlog","unstarted","started","completed","canceled"]),Gt=e.object({id:e.string(),name:e.string(),type:be,color:e.string(),position:e.number(),description:e.string().optional().nullable(),team:j,createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional()}),$t=e.object({id:e.string(),name:e.string(),description:e.string().optional().nullable(),color:e.string(),team:j.optional().nullable(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional()}),ge=$t.extend({parent:e.lazy(()=>ge.optional().nullable())}),E=e.enum(["backlog","planned","started","paused","completed","canceled"]),ye=e.object({id:e.string(),name:e.string(),description:e.string().optional().nullable(),icon:e.string().optional().nullable(),color:e.string().optional().nullable(),state:E,priority:e.number(),sortOrder:e.number(),startDate:e.coerce.date().nullable().optional(),targetDate:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),canceledAt:e.coerce.date().nullable().optional(),lead:I.optional().nullable(),teams:e.array(j),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),Bt=e.object({id:e.string(),number:e.number(),name:e.string().optional().nullable(),description:e.string().optional().nullable(),startsAt:e.coerce.date().nullable().optional(),endsAt:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),team:j,createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),Mt=e.object({id:e.string(),title:e.string(),description:e.string().optional().nullable(),priority:L,estimate:e.number().optional().nullable(),sortOrder:e.number(),number:e.number(),identifier:e.string(),url:e.string(),state:Gt,team:j,assignee:I.optional().nullable(),creator:I,project:ye.optional().nullable(),cycle:Bt.optional().nullable(),labels:e.array(ge),subscribers:e.array(I),dueDate:e.coerce.date().nullable().optional(),startedAt:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),canceledAt:e.coerce.date().nullable().optional(),triagedAt:e.coerce.date().nullable().optional(),snoozedUntilAt:e.coerce.date().nullable().optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),R=Mt.extend({parent:e.lazy(()=>R.optional().nullable())}),_t=e.object({id:e.string(),body:e.string(),issue:R,user:I,editedAt:e.coerce.date().nullable().optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),T=_t.extend({parent:e.lazy(()=>T.optional().nullable())}),A=e.object({hasNextPage:e.boolean(),hasPreviousPage:e.boolean(),startCursor:e.string().optional().nullable(),endCursor:e.string().optional().nullable()}),h=e.object({id:e.string(),name:e.string(),displayName:e.string(),email:e.string().optional().nullable()}),Z=e.object({id:e.string(),name:e.string(),key:e.string()}),fe=e.object({id:e.string(),name:e.string(),type:be,color:e.string().optional(),position:e.number().optional()}),Ft=e.object({id:e.string(),name:e.string(),color:e.string()}),Ht=e.object({nodes:e.array(Ft)}),qt=e.object({nodes:e.array(h)}),Kt=e.object({id:e.string()}),X=e.object({nodes:e.array(Z)}),Vt=e.object({id:e.string(),title:e.string(),description:e.string().optional().nullable(),priority:L,estimate:e.number().optional().nullable(),sortOrder:e.number(),number:e.number(),identifier:e.string(),url:e.string(),state:fe,team:Z,assignee:h.optional().nullable(),creator:h,project:e.object({id:e.string(),name:e.string(),state:E}).optional().nullable(),cycle:e.object({id:e.string(),number:e.number(),name:e.string().optional().nullable()}).optional().nullable(),labels:Ht.optional().nullable(),subscribers:qt.nullish(),dueDate:e.coerce.date().nullable().optional(),startedAt:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),canceledAt:e.coerce.date().nullable().optional(),triagedAt:e.coerce.date().nullable().optional(),snoozedUntilAt:e.coerce.date().nullable().optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),z=Vt.extend({parent:e.lazy(()=>z.optional().nullable())}),he=e.object({nodes:e.array(z),pageInfo:A}),xo=e.object({nodes:e.array(R),pageInfo:A}),Ie=e.object({nodes:e.array(j),pageInfo:A}),je=e.object({nodes:e.array(I),pageInfo:A}),To=e.object({nodes:e.array(ye),pageInfo:A}),Ce=e.object({nodes:e.array(T),pageInfo:A}),zo=e.object({title:e.string(),description:e.string().optional(),teamId:e.string(),assigneeId:e.string().optional(),priority:L.optional(),estimate:e.number().optional(),stateId:e.string().optional(),projectId:e.string().optional(),cycleId:e.string().optional(),parentId:e.string().optional(),labelIds:e.array(e.string()).optional(),subscriberIds:e.array(e.string()).optional(),dueDate:e.coerce.date().nullable().optional()}),Wo=e.object({title:e.string().optional(),description:e.string().optional(),assigneeId:e.string().optional(),priority:L.optional(),estimate:e.number().optional(),stateId:e.string().optional(),projectId:e.string().optional(),cycleId:e.string().optional(),parentId:e.string().optional(),labelIds:e.array(e.string()).optional(),subscriberIds:e.array(e.string()).optional(),dueDate:e.coerce.date().nullable().optional()}),Oo=e.object({name:e.string(),description:e.string().optional(),icon:e.string().optional(),color:e.string().optional(),teamIds:e.array(e.string()),leadId:e.string().optional(),state:E.optional(),priority:e.number().optional(),startDate:e.coerce.date().nullable().optional(),targetDate:e.coerce.date().nullable().optional()}),No=e.object({name:e.string().optional(),description:e.string().optional(),icon:e.string().optional(),color:e.string().optional(),teamIds:e.array(e.string()).optional(),leadId:e.string().optional(),state:E.optional(),priority:e.number().optional(),startDate:e.coerce.date().nullable().optional(),targetDate:e.coerce.date().nullable().optional()}),Go=e.object({issueId:e.string(),body:e.string(),parentId:e.string().optional()}),$o=e.object({body:e.string().optional()}),Le=e.object({id:e.string(),name:e.string(),description:e.string().optional().nullable(),icon:e.string().optional().nullable(),color:e.string().optional().nullable(),state:E,priority:e.number(),sortOrder:e.number().optional(),startDate:e.coerce.date().nullable().optional(),targetDate:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),canceledAt:e.coerce.date().nullable().optional(),lead:h.optional().nullable(),teams:X,createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),Ee=e.object({id:e.string(),name:e.string(),description:e.string().optional().nullable(),icon:e.string().optional().nullable(),color:e.string().optional().nullable(),state:E,priority:e.number(),sortOrder:e.number().optional(),startDate:e.coerce.date().nullable().optional(),targetDate:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),canceledAt:e.coerce.date().nullable().optional(),lead:h.optional().nullable(),teams:X.optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),ee=e.object({id:e.string(),name:e.string(),description:e.string().optional().nullable(),icon:e.string().optional().nullable(),color:e.string().optional().nullable(),state:E,priority:e.number(),sortOrder:e.number(),startDate:e.coerce.date().nullable().optional(),targetDate:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),canceledAt:e.coerce.date().nullable().optional(),lead:h.optional().nullable(),teams:X,createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional()}),Ae=e.object({nodes:e.array(ee),pageInfo:A}),Bo=e.object({issues:he}),Mo=e.object({issue:z}),_o=e.object({issueCreate:e.object({success:e.boolean(),issue:R})}),Fo=e.object({issueUpdate:e.object({success:e.boolean(),issue:R})}),Ho=e.object({issueDelete:e.object({success:e.boolean()})}),qo=e.object({teams:Ie}),Ko=e.object({team:j}),Vo=e.object({users:je}),Jo=e.object({user:I}),Qo=e.object({projects:Ae}),Yo=e.object({project:ee}),Zo=e.object({projectCreate:e.object({success:e.boolean(),project:Le})}),Xo=e.object({projectUpdate:e.object({success:e.boolean(),project:Ee})}),en=e.object({projectDelete:e.object({success:e.boolean()})}),tn=e.object({issue:e.object({comments:Ce})}),on=e.object({commentCreate:e.object({success:e.boolean(),comment:T})}),nn=e.object({commentUpdate:e.object({success:e.boolean(),comment:T})}),an=e.object({commentDelete:e.object({success:e.boolean()})}),ue=e.object({id:e.string(),title:e.string().optional(),description:e.string().optional().nullable(),priority:L.optional(),estimate:e.number().optional().nullable(),sortOrder:e.number().optional(),number:e.number().optional(),identifier:e.string().optional(),url:e.string().optional(),state:fe.optional(),team:Z.optional(),assignee:h.optional().nullable(),creator:h.optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional()}),me=e.object({id:e.string(),body:e.string(),issue:Kt,user:h,parent:e.object({id:e.string()}).optional().nullable(),editedAt:e.coerce.date().nullable().optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),u={issuesList:he,issuesGet:z,issuesCreate:ue,issuesUpdate:ue,issuesDelete:e.boolean(),teamsList:Ie,teamsGet:j,usersList:je,usersGet:I,projectsList:Ae,projectsGet:ee,projectsCreate:Le,projectsUpdate:Ee,projectsDelete:e.boolean(),commentsList:Ce,commentsCreate:me,commentsUpdate:me,commentsDelete:e.boolean()};var ve=`
89
+ id
90
+ title
91
+ description
92
+ priority
93
+ estimate
94
+ sortOrder
95
+ number
96
+ identifier
97
+ url
98
+ state {
99
+ id
100
+ name
101
+ type
102
+ color
103
+ position
104
+ }
105
+ team {
106
+ id
107
+ name
108
+ key
109
+ }
110
+ assignee {
111
+ id
112
+ name
113
+ displayName
114
+ email
115
+ avatarUrl
116
+ }
117
+ creator {
118
+ id
119
+ name
120
+ displayName
121
+ email
122
+ avatarUrl
123
+ }
124
+ project {
125
+ id
126
+ name
127
+ state
128
+ }
129
+ cycle {
130
+ id
131
+ number
132
+ name
133
+ }
134
+ labels {
135
+ nodes {
136
+ id
137
+ name
138
+ color
143
139
  }
144
140
  }
145
- `,ct=`
146
- query Issues($first: Int!, $after: String) {
147
- issues(first: $first, after: $after) {
141
+ dueDate
142
+ startedAt
143
+ completedAt
144
+ canceledAt
145
+ createdAt
146
+ updatedAt
147
+ `,Jt=`
148
+ query Issues($filter: IssueFilter, $orderBy: PaginationOrderBy, $first: Int!, $after: String) {
149
+ issues(filter: $filter, orderBy: $orderBy, first: $first, after: $after) {
148
150
  nodes {
149
- id
150
- title
151
- description
152
- priority
153
- estimate
154
- sortOrder
155
- number
156
- identifier
157
- url
158
- state {
159
- id
160
- name
161
- type
162
- color
163
- position
164
- }
165
- team {
166
- id
167
- name
168
- key
169
- }
170
- assignee {
171
- id
172
- name
173
- displayName
174
- email
175
- avatarUrl
176
- }
177
- creator {
178
- id
179
- name
180
- displayName
181
- email
182
- avatarUrl
183
- }
184
- labels {
185
- nodes {
186
- id
187
- name
188
- color
189
- }
190
- }
191
- createdAt
192
- updatedAt
151
+ ${ve}
193
152
  }
194
153
  pageInfo {
195
154
  hasNextPage
@@ -199,61 +158,10 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
199
158
  }
200
159
  }
201
160
  }
202
- `,pt=`
161
+ `,Qt=`
203
162
  query Issue($id: String!) {
204
163
  issue(id: $id) {
205
- id
206
- title
207
- description
208
- priority
209
- estimate
210
- sortOrder
211
- number
212
- identifier
213
- url
214
- state {
215
- id
216
- name
217
- type
218
- color
219
- position
220
- }
221
- team {
222
- id
223
- name
224
- key
225
- }
226
- assignee {
227
- id
228
- name
229
- displayName
230
- email
231
- avatarUrl
232
- }
233
- creator {
234
- id
235
- name
236
- displayName
237
- email
238
- avatarUrl
239
- }
240
- project {
241
- id
242
- name
243
- state
244
- }
245
- cycle {
246
- id
247
- number
248
- name
249
- }
250
- labels {
251
- nodes {
252
- id
253
- name
254
- color
255
- }
256
- }
164
+ ${ve}
257
165
  subscribers {
258
166
  nodes {
259
167
  id
@@ -261,15 +169,9 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
261
169
  displayName
262
170
  }
263
171
  }
264
- dueDate
265
- startedAt
266
- completedAt
267
- canceledAt
268
- createdAt
269
- updatedAt
270
172
  }
271
173
  }
272
- `,lt=`
174
+ `,Yt=`
273
175
  mutation CreateIssue($input: IssueCreateInput!) {
274
176
  issueCreate(input: $input) {
275
177
  success
@@ -308,7 +210,7 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
308
210
  }
309
211
  }
310
212
  }
311
- `,ut=`
213
+ `,Zt=`
312
214
  mutation UpdateIssue($id: String!, $input: IssueUpdateInput!) {
313
215
  issueUpdate(id: $id, input: $input) {
314
216
  success
@@ -341,13 +243,13 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
341
243
  }
342
244
  }
343
245
  }
344
- `,mt=`
246
+ `,Xt=`
345
247
  mutation DeleteIssue($id: String!) {
346
248
  issueDelete(id: $id) {
347
249
  success
348
250
  }
349
251
  }
350
- `,se=async(t,n)=>{let i=n.teamId?dt:ct,r={first:n.first||50};n.teamId&&(r.teamId=n.teamId),n.after&&(r.after=n.after);let c=(await p(i,t.key,r)).issues;if(c.nodes&&t.db.issues)try{for(let s of c.nodes)await t.db.issues.upsertByEntityId(s.id,{...s,stateId:s.state?.id,teamId:s.team?.id,assigneeId:s.assignee?.id,creatorId:s.creator?.id,createdAt:new Date(s.createdAt??""),updatedAt:new Date(s.updatedAt??"")})}catch(s){console.warn("Failed to save issues to database:",s)}return await S(t,"linear.issues.list",{...n},"completed"),c},ie=async(t,n)=>{let r=(await p(pt,t.key,{id:n.id})).issue;if(r&&t.db.issues)try{await t.db.issues.upsertByEntityId(r.id,{...r,stateId:r.state?.id,teamId:r.team?.id,assigneeId:r.assignee?.id,creatorId:r.creator?.id,projectId:r.project?.id,cycleId:r.cycle?.id,createdAt:new Date(r.createdAt??""),updatedAt:new Date(r.updatedAt??"")})}catch(o){console.warn("Failed to save issue to database:",o)}return await S(t,"linear.issues.get",{...n},"completed"),r},de=async(t,n)=>{let r=(await p(lt,t.key,{input:n})).issueCreate.issue;return r&&await t.endpoints.issues.get({id:r.id}),await S(t,"linear.issues.create",{...n},"completed"),r},ce=async(t,n)=>{let r=(await p(ut,t.key,{id:n.id,input:n.input})).issueUpdate.issue;return r&&await t.endpoints.issues.get({id:r.id}),await S(t,"linear.issues.update",{...n},"completed"),r},pe=async(t,n)=>{let r=(await p(mt,t.key,{id:n.id})).issueDelete.success;if(r&&t.db.issues)try{await t.db.issues.deleteByEntityId(n.id)}catch(o){console.warn("Failed to delete issue from database:",o)}return await S(t,"linear.issues.delete",{...n},"completed"),r};import{logEventFromContext as w}from"corsair/core";var bt=`
252
+ `,Se=async(t,n)=>{let r=l.issuesList.parse(n),s=r.teamId?{team:{id:{eq:r.teamId}}}:void 0,o=s&&r.filter?{and:[s,r.filter]}:s??r.filter,d={first:r.first||50};o&&(d.filter=o),r.orderBy&&(d.orderBy=r.orderBy),r.after&&(d.after=r.after);let y=(await p(Jt,t.key,d)).issues;if(y.nodes&&t.db.issues)try{for(let b of y.nodes)await t.db.issues.upsertByEntityId(b.id,{...b,stateId:b.state?.id,teamId:b.team?.id,assigneeId:b.assignee?.id,creatorId:b.creator?.id,projectId:b.project?.id,cycleId:b.cycle?.id,createdAt:new Date(b.createdAt??""),updatedAt:new Date(b.updatedAt??"")})}catch(b){console.warn("Failed to save issues to database:",b)}return await D(t,"linear.issues.list",{...r},"completed"),y},we=async(t,n)=>{let s=(await p(Qt,t.key,{id:n.id})).issue;if(s&&t.db.issues)try{await t.db.issues.upsertByEntityId(s.id,{...s,stateId:s.state?.id,teamId:s.team?.id,assigneeId:s.assignee?.id,creatorId:s.creator?.id,projectId:s.project?.id,cycleId:s.cycle?.id,createdAt:new Date(s.createdAt??""),updatedAt:new Date(s.updatedAt??"")})}catch(o){console.warn("Failed to save issue to database:",o)}return await D(t,"linear.issues.get",{...n},"completed"),s},ke=async(t,n)=>{let s=(await p(Yt,t.key,{input:n})).issueCreate.issue;return s&&await t.endpoints.issues.get({id:s.id}),await D(t,"linear.issues.create",{...n},"completed"),s},Re=async(t,n)=>{let s=(await p(Zt,t.key,{id:n.id,input:n.input})).issueUpdate.issue;return s&&await t.endpoints.issues.get({id:s.id}),await D(t,"linear.issues.update",{...n},"completed"),s},De=async(t,n)=>{let s=(await p(Xt,t.key,{id:n.id})).issueDelete.success;if(s&&t.db.issues)try{await t.db.issues.deleteByEntityId(n.id)}catch(o){console.warn("Failed to delete issue from database:",o)}return await D(t,"linear.issues.delete",{...n},"completed"),s};import{logEventFromContext as U}from"corsair/core";var eo=`
351
253
  query Projects($first: Int!, $after: String) {
352
254
  projects(first: $first, after: $after) {
353
255
  nodes {
@@ -386,7 +288,7 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
386
288
  }
387
289
  }
388
290
  }
389
- `,yt=`
291
+ `,to=`
390
292
  query Project($id: String!) {
391
293
  project(id: $id) {
392
294
  id
@@ -418,7 +320,7 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
418
320
  updatedAt
419
321
  }
420
322
  }
421
- `,gt=`
323
+ `,oo=`
422
324
  mutation CreateProject($input: ProjectCreateInput!) {
423
325
  projectCreate(input: $input) {
424
326
  success
@@ -449,7 +351,7 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
449
351
  }
450
352
  }
451
353
  }
452
- `,ft=`
354
+ `,no=`
453
355
  mutation UpdateProject($id: String!, $input: ProjectUpdateInput!) {
454
356
  projectUpdate(id: $id, input: $input) {
455
357
  success
@@ -467,13 +369,13 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
467
369
  }
468
370
  }
469
371
  }
470
- `,ht=`
372
+ `,ao=`
471
373
  mutation DeleteProject($id: String!) {
472
374
  projectDelete(id: $id) {
473
375
  success
474
376
  }
475
377
  }
476
- `,le=async(t,n)=>{let r=(await p(bt,t.key,{first:n.first||50,after:n.after})).projects;if(r.nodes&&t.db.projects)try{for(let o of r.nodes)await t.db.projects.upsertByEntityId(o.id,{...o,leadId:o.lead?.id,createdAt:new Date(o.createdAt??""),updatedAt:new Date(o.updatedAt??"")})}catch(o){console.warn("Failed to save projects to database:",o)}return await w(t,"linear.projects.list",{...n},"completed"),r},ue=async(t,n)=>{let r=(await p(yt,t.key,{id:n.id})).project;if(r&&t.db.projects)try{await t.db.projects.upsertByEntityId(r.id,{...r,leadId:r.lead?.id,createdAt:new Date(r.createdAt??""),updatedAt:new Date(r.updatedAt??"")})}catch(o){console.warn("Failed to save project to database:",o)}return await w(t,"linear.projects.get",{...n},"completed"),r},me=async(t,n)=>{let r=(await p(gt,t.key,{input:n})).projectCreate.project;return r&&await t.endpoints.projects.get({id:r.id}),await w(t,"linear.projects.create",{...n},"completed"),r},be=async(t,n)=>{let r=(await p(ft,t.key,{id:n.id,input:n.input})).projectUpdate.project;return r&&await t.endpoints.projects.get({id:r.id}),await w(t,"linear.projects.update",{...n},"completed"),r},ye=async(t,n)=>{let r=(await p(ht,t.key,{id:n.id})).projectDelete.success;if(r&&t.db.projects)try{await t.db.projects.deleteByEntityId(n.id)}catch(o){console.warn("Failed to delete project from database:",o)}return await w(t,"linear.projects.delete",{...n},"completed"),r};import{logEventFromContext as ge}from"corsair/core";var It=`
378
+ `,Ue=async(t,n)=>{let s=(await p(eo,t.key,{first:n.first||50,after:n.after})).projects;if(s.nodes&&t.db.projects)try{for(let o of s.nodes)await t.db.projects.upsertByEntityId(o.id,{...o,leadId:o.lead?.id,createdAt:new Date(o.createdAt??""),updatedAt:new Date(o.updatedAt??"")})}catch(o){console.warn("Failed to save projects to database:",o)}return await U(t,"linear.projects.list",{...n},"completed"),s},Pe=async(t,n)=>{let s=(await p(to,t.key,{id:n.id})).project;if(s&&t.db.projects)try{await t.db.projects.upsertByEntityId(s.id,{...s,leadId:s.lead?.id,createdAt:new Date(s.createdAt??""),updatedAt:new Date(s.updatedAt??"")})}catch(o){console.warn("Failed to save project to database:",o)}return await U(t,"linear.projects.get",{...n},"completed"),s},xe=async(t,n)=>{let s=(await p(oo,t.key,{input:n})).projectCreate.project;return s&&await t.endpoints.projects.get({id:s.id}),await U(t,"linear.projects.create",{...n},"completed"),s},Te=async(t,n)=>{let s=(await p(no,t.key,{id:n.id,input:n.input})).projectUpdate.project;return s&&await t.endpoints.projects.get({id:s.id}),await U(t,"linear.projects.update",{...n},"completed"),s},ze=async(t,n)=>{let s=(await p(ao,t.key,{id:n.id})).projectDelete.success;if(s&&t.db.projects)try{await t.db.projects.deleteByEntityId(n.id)}catch(o){console.warn("Failed to delete project from database:",o)}return await U(t,"linear.projects.delete",{...n},"completed"),s};import{logEventFromContext as We}from"corsair/core";var ro=`
477
379
  query Teams($first: Int!, $after: String) {
478
380
  teams(first: $first, after: $after) {
479
381
  nodes {
@@ -495,7 +397,7 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
495
397
  }
496
398
  }
497
399
  }
498
- `,jt=`
400
+ `,so=`
499
401
  query Team($id: String!) {
500
402
  team(id: $id) {
501
403
  id
@@ -509,7 +411,7 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
509
411
  updatedAt
510
412
  }
511
413
  }
512
- `,fe=async(t,n)=>{let r=(await p(It,t.key,{first:n.first||50,after:n.after})).teams;if(r.nodes&&t.db.teams)try{for(let o of r.nodes)await t.db.teams.upsertByEntityId(o.id,{...o,createdAt:new Date(o.createdAt??""),updatedAt:new Date(o.updatedAt??"")})}catch(o){console.warn("Failed to save teams to database:",o)}return await ge(t,"linear.teams.list",{...n},"completed"),r},he=async(t,n)=>{let r=(await p(jt,t.key,{id:n.id})).team;if(r&&t.db.teams)try{await t.db.teams.upsertByEntityId(r.id,{...r,createdAt:new Date(r.createdAt??""),updatedAt:new Date(r.updatedAt??"")})}catch(o){console.warn("Failed to save team to database:",o)}return await ge(t,"linear.teams.get",{...n},"completed"),r};import{logEventFromContext as Ie}from"corsair/core";var Ct=`
414
+ `,Oe=async(t,n)=>{let s=(await p(ro,t.key,{first:n.first||50,after:n.after})).teams;if(s.nodes&&t.db.teams)try{for(let o of s.nodes)await t.db.teams.upsertByEntityId(o.id,{...o,createdAt:new Date(o.createdAt??""),updatedAt:new Date(o.updatedAt??"")})}catch(o){console.warn("Failed to save teams to database:",o)}return await We(t,"linear.teams.list",{...n},"completed"),s},Ne=async(t,n)=>{let s=(await p(so,t.key,{id:n.id})).team;if(s&&t.db.teams)try{await t.db.teams.upsertByEntityId(s.id,{...s,createdAt:new Date(s.createdAt??""),updatedAt:new Date(s.updatedAt??"")})}catch(o){console.warn("Failed to save team to database:",o)}return await We(t,"linear.teams.get",{...n},"completed"),s};import{logEventFromContext as Ge}from"corsair/core";var io=`
513
415
  query Users($first: Int!, $after: String) {
514
416
  users(first: $first, after: $after) {
515
417
  nodes {
@@ -531,7 +433,7 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
531
433
  }
532
434
  }
533
435
  }
534
- `,Lt=`
436
+ `,co=`
535
437
  query User($id: String!) {
536
438
  user(id: $id) {
537
439
  id
@@ -545,4 +447,4 @@ import{AuthMissingError as et,getOAuthAccessToken as oo}from"corsair/core";impor
545
447
  updatedAt
546
448
  }
547
449
  }
548
- `,je=async(t,n)=>{let r=(await p(Ct,t.key,{first:n.first||50,after:n.after})).users;if(r.nodes&&t.db.users)try{for(let o of r.nodes)await t.db.users.upsertByEntityId(o.id,{...o,createdAt:new Date(o.createdAt??""),updatedAt:new Date(o.updatedAt??"")})}catch(o){console.warn("Failed to save users to database:",o)}return await Ie(t,"linear.users.list",{...n},"completed"),r},Ce=async(t,n)=>{let r=(await p(Lt,t.key,{id:n.id})).user;if(r&&t.db.users)try{await t.db.users.upsertByEntityId(r.id,{...r,createdAt:new Date(r.createdAt??""),updatedAt:new Date(r.updatedAt??"")})}catch(o){console.warn("Failed to save user to database:",o)}return await Ie(t,"linear.users.get",{...n},"completed"),r};import{z as e}from"zod";var j=e.union([e.literal(0),e.literal(1),e.literal(2),e.literal(3),e.literal(4)]),Et=e.object({teamId:e.string().optional(),first:e.number().optional(),after:e.string().optional()}),vt=e.object({id:e.string()}),At=e.object({title:e.string(),description:e.string().optional(),teamId:e.string(),assigneeId:e.string().optional(),priority:j.optional(),estimate:e.number().optional(),stateId:e.string().optional(),projectId:e.string().optional(),cycleId:e.string().optional(),parentId:e.string().optional(),labelIds:e.array(e.string()).optional(),subscriberIds:e.array(e.string()).optional(),dueDate:e.string().optional()}),St=e.object({id:e.string(),input:e.object({title:e.string().optional(),description:e.string().optional(),assigneeId:e.string().optional(),priority:j.optional(),estimate:e.number().optional(),stateId:e.string().optional(),projectId:e.string().optional(),cycleId:e.string().optional(),parentId:e.string().optional(),labelIds:e.array(e.string()).optional(),subscriberIds:e.array(e.string()).optional(),dueDate:e.string().optional()})}),wt=e.object({id:e.string()}),kt=e.object({first:e.number().optional(),after:e.string().optional()}),Rt=e.object({id:e.string()}),Ut=e.object({first:e.number().optional(),after:e.string().optional()}),Pt=e.object({id:e.string()}),Dt=e.object({first:e.number().optional(),after:e.string().optional()}),xt=e.object({id:e.string()}),Tt=e.object({name:e.string(),description:e.string().optional(),icon:e.string().optional(),color:e.string().optional(),teamIds:e.array(e.string()),leadId:e.string().optional(),state:e.enum(["planned","started","paused","completed","canceled"]).optional(),priority:e.number().optional(),startDate:e.string().optional(),targetDate:e.string().optional()}),zt=e.object({id:e.string(),input:e.object({name:e.string().optional(),description:e.string().optional(),icon:e.string().optional(),color:e.string().optional(),teamIds:e.array(e.string()).optional(),leadId:e.string().optional(),state:e.enum(["planned","started","paused","completed","canceled"]).optional(),priority:e.number().optional(),startDate:e.string().optional(),targetDate:e.string().optional()})}),Wt=e.object({id:e.string()}),Ot=e.object({issueId:e.string(),first:e.number().optional(),after:e.string().optional()}),Nt=e.object({issueId:e.string(),body:e.string(),parentId:e.string().optional()}),$t=e.object({id:e.string(),input:e.object({body:e.string().optional()})}),Gt=e.object({id:e.string()}),l={issuesList:Et,issuesGet:vt,issuesCreate:At,issuesUpdate:St,issuesDelete:wt,teamsList:kt,teamsGet:Rt,usersList:Ut,usersGet:Pt,projectsList:Dt,projectsGet:xt,projectsCreate:Tt,projectsUpdate:zt,projectsDelete:Wt,commentsList:Ot,commentsCreate:Nt,commentsUpdate:$t,commentsDelete:Gt},g=e.object({id:e.string(),name:e.string(),email:e.string().optional().nullable(),displayName:e.string(),avatarUrl:e.string().optional().nullable(),active:e.boolean(),admin:e.boolean(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional()}),f=e.object({id:e.string(),name:e.string(),key:e.string(),description:e.string().optional().nullable(),icon:e.string().optional().nullable(),color:e.string().optional().nullable(),private:e.boolean(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),ve=e.enum(["backlog","unstarted","started","completed","canceled"]),_t=e.object({id:e.string(),name:e.string(),type:ve,color:e.string(),position:e.number(),description:e.string().optional().nullable(),team:f,createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional()}),Mt=e.object({id:e.string(),name:e.string(),description:e.string().optional().nullable(),color:e.string(),team:f.optional().nullable(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional()}),Ae=Mt.extend({parent:e.lazy(()=>Ae.optional().nullable())}),C=e.enum(["backlog","planned","started","paused","completed","canceled"]),Se=e.object({id:e.string(),name:e.string(),description:e.string().optional().nullable(),icon:e.string().optional().nullable(),color:e.string().optional().nullable(),state:C,priority:e.number(),sortOrder:e.number(),startDate:e.coerce.date().nullable().optional(),targetDate:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),canceledAt:e.coerce.date().nullable().optional(),lead:g.optional().nullable(),teams:e.array(f),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),Bt=e.object({id:e.string(),number:e.number(),name:e.string().optional().nullable(),description:e.string().optional().nullable(),startsAt:e.coerce.date().nullable().optional(),endsAt:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),team:f,createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),Ft=e.object({id:e.string(),title:e.string(),description:e.string().optional().nullable(),priority:j,estimate:e.number().optional().nullable(),sortOrder:e.number(),number:e.number(),identifier:e.string(),url:e.string(),state:_t,team:f,assignee:g.optional().nullable(),creator:g,project:Se.optional().nullable(),cycle:Bt.optional().nullable(),labels:e.array(Ae),subscribers:e.array(g),dueDate:e.coerce.date().nullable().optional(),startedAt:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),canceledAt:e.coerce.date().nullable().optional(),triagedAt:e.coerce.date().nullable().optional(),snoozedUntilAt:e.coerce.date().nullable().optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),k=Ft.extend({parent:e.lazy(()=>k.optional().nullable())}),Ht=e.object({id:e.string(),body:e.string(),issue:k,user:g,editedAt:e.coerce.date().nullable().optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),P=Ht.extend({parent:e.lazy(()=>P.optional().nullable())}),L=e.object({hasNextPage:e.boolean(),hasPreviousPage:e.boolean(),startCursor:e.string().optional().nullable(),endCursor:e.string().optional().nullable()}),y=e.object({id:e.string(),name:e.string(),displayName:e.string(),email:e.string().optional().nullable()}),V=e.object({id:e.string(),name:e.string(),key:e.string()}),we=e.object({id:e.string(),name:e.string(),type:ve,color:e.string().optional(),position:e.number().optional()}),qt=e.object({id:e.string(),name:e.string(),color:e.string()}),Kt=e.object({nodes:e.array(qt)}),Vt=e.object({nodes:e.array(y)}),Jt=e.object({id:e.string()}),J=e.object({nodes:e.array(V)}),Qt=e.object({id:e.string(),title:e.string(),description:e.string().optional().nullable(),priority:j,estimate:e.number().optional().nullable(),sortOrder:e.number(),number:e.number(),identifier:e.string(),url:e.string(),state:we,team:V,assignee:y.optional().nullable(),creator:y,project:e.object({id:e.string(),name:e.string(),state:C}).optional().nullable(),cycle:e.object({id:e.string(),number:e.number(),name:e.string().optional().nullable()}).optional().nullable(),labels:Kt.optional().nullable(),subscribers:Vt.nullish(),dueDate:e.coerce.date().nullable().optional(),startedAt:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),canceledAt:e.coerce.date().nullable().optional(),triagedAt:e.coerce.date().nullable().optional(),snoozedUntilAt:e.coerce.date().nullable().optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),D=Qt.extend({parent:e.lazy(()=>D.optional().nullable())}),ke=e.object({nodes:e.array(D),pageInfo:L}),xo=e.object({nodes:e.array(k),pageInfo:L}),Re=e.object({nodes:e.array(f),pageInfo:L}),Ue=e.object({nodes:e.array(g),pageInfo:L}),To=e.object({nodes:e.array(Se),pageInfo:L}),Pe=e.object({nodes:e.array(P),pageInfo:L}),zo=e.object({title:e.string(),description:e.string().optional(),teamId:e.string(),assigneeId:e.string().optional(),priority:j.optional(),estimate:e.number().optional(),stateId:e.string().optional(),projectId:e.string().optional(),cycleId:e.string().optional(),parentId:e.string().optional(),labelIds:e.array(e.string()).optional(),subscriberIds:e.array(e.string()).optional(),dueDate:e.coerce.date().nullable().optional()}),Wo=e.object({title:e.string().optional(),description:e.string().optional(),assigneeId:e.string().optional(),priority:j.optional(),estimate:e.number().optional(),stateId:e.string().optional(),projectId:e.string().optional(),cycleId:e.string().optional(),parentId:e.string().optional(),labelIds:e.array(e.string()).optional(),subscriberIds:e.array(e.string()).optional(),dueDate:e.coerce.date().nullable().optional()}),Oo=e.object({name:e.string(),description:e.string().optional(),icon:e.string().optional(),color:e.string().optional(),teamIds:e.array(e.string()),leadId:e.string().optional(),state:C.optional(),priority:e.number().optional(),startDate:e.coerce.date().nullable().optional(),targetDate:e.coerce.date().nullable().optional()}),No=e.object({name:e.string().optional(),description:e.string().optional(),icon:e.string().optional(),color:e.string().optional(),teamIds:e.array(e.string()).optional(),leadId:e.string().optional(),state:C.optional(),priority:e.number().optional(),startDate:e.coerce.date().nullable().optional(),targetDate:e.coerce.date().nullable().optional()}),$o=e.object({issueId:e.string(),body:e.string(),parentId:e.string().optional()}),Go=e.object({body:e.string().optional()}),De=e.object({id:e.string(),name:e.string(),description:e.string().optional().nullable(),icon:e.string().optional().nullable(),color:e.string().optional().nullable(),state:C,priority:e.number(),sortOrder:e.number().optional(),startDate:e.coerce.date().nullable().optional(),targetDate:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),canceledAt:e.coerce.date().nullable().optional(),lead:y.optional().nullable(),teams:J,createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),xe=e.object({id:e.string(),name:e.string(),description:e.string().optional().nullable(),icon:e.string().optional().nullable(),color:e.string().optional().nullable(),state:C,priority:e.number(),sortOrder:e.number().optional(),startDate:e.coerce.date().nullable().optional(),targetDate:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),canceledAt:e.coerce.date().nullable().optional(),lead:y.optional().nullable(),teams:J.optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),Q=e.object({id:e.string(),name:e.string(),description:e.string().optional().nullable(),icon:e.string().optional().nullable(),color:e.string().optional().nullable(),state:C,priority:e.number(),sortOrder:e.number(),startDate:e.coerce.date().nullable().optional(),targetDate:e.coerce.date().nullable().optional(),completedAt:e.coerce.date().nullable().optional(),canceledAt:e.coerce.date().nullable().optional(),lead:y.optional().nullable(),teams:J,createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional()}),Te=e.object({nodes:e.array(Q),pageInfo:L}),_o=e.object({issues:ke}),Mo=e.object({issue:D}),Bo=e.object({issueCreate:e.object({success:e.boolean(),issue:k})}),Fo=e.object({issueUpdate:e.object({success:e.boolean(),issue:k})}),Ho=e.object({issueDelete:e.object({success:e.boolean()})}),qo=e.object({teams:Re}),Ko=e.object({team:f}),Vo=e.object({users:Ue}),Jo=e.object({user:g}),Qo=e.object({projects:Te}),Yo=e.object({project:Q}),Zo=e.object({projectCreate:e.object({success:e.boolean(),project:De})}),Xo=e.object({projectUpdate:e.object({success:e.boolean(),project:xe})}),en=e.object({projectDelete:e.object({success:e.boolean()})}),tn=e.object({issue:e.object({comments:Pe})}),on=e.object({commentCreate:e.object({success:e.boolean(),comment:P})}),nn=e.object({commentUpdate:e.object({success:e.boolean(),comment:P})}),an=e.object({commentDelete:e.object({success:e.boolean()})}),Le=e.object({id:e.string(),title:e.string().optional(),description:e.string().optional().nullable(),priority:j.optional(),estimate:e.number().optional().nullable(),sortOrder:e.number().optional(),number:e.number().optional(),identifier:e.string().optional(),url:e.string().optional(),state:we.optional(),team:V.optional(),assignee:y.optional().nullable(),creator:y.optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional()}),Ee=e.object({id:e.string(),body:e.string(),issue:Jt,user:y,parent:e.object({id:e.string()}).optional().nullable(),editedAt:e.coerce.date().nullable().optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),u={issuesList:ke,issuesGet:D,issuesCreate:Le,issuesUpdate:Le,issuesDelete:e.boolean(),teamsList:Re,teamsGet:f,usersList:Ue,usersGet:g,projectsList:Te,projectsGet:Q,projectsCreate:De,projectsUpdate:xe,projectsDelete:e.boolean(),commentsList:Pe,commentsCreate:Ee,commentsUpdate:Ee,commentsDelete:e.boolean()};var R={list:oe,create:ne,update:ae,delete:re},E={list:se,get:ie,create:de,update:ce,delete:pe},v={list:le,get:ue,create:me,update:be,delete:ye},Y={list:fe,get:he},Z={list:je,get:Ce};import{ApiError as A}from"corsair/http";var ze={RATE_LIMIT_ERROR:{match:(t,n)=>{if(t instanceof A&&t.status===429)return!0;let i=t.message.toLowerCase();return i.includes("rate_limited")||i.includes("ratelimited")||i.includes("rate limit")||i.includes("too many requests")||t.message.includes("429")},handler:async(t,n)=>{console.log(`[LINEAR:${n.operation}] Rate limit exceeded`);let i;return t instanceof A&&t.retryAfter&&(i=t.retryAfter),{maxRetries:5,headersRetryAfterMs:i}}},AUTH_ERROR:{match:(t,n)=>{if(t instanceof A&&t.status===401)return!0;let i=t.message.toLowerCase();return i.includes("unauthorized")||i.includes("authentication")||i.includes("invalid token")||i.includes("token expired")||i.includes("token revoked")||i.includes("invalid api key")||i.includes("forbidden")||i.includes("access denied")},handler:async(t,n)=>(console.log(`[LINEAR:${n.operation}] Authentication failed - check your API key`),{maxRetries:0})},NOT_FOUND_ERROR:{match:(t,n)=>{if(t instanceof A&&t.status===404)return!0;let i=t.message.toLowerCase();return i.includes("not found")||i.includes("does not exist")||i.includes("could not find")||i.includes("issue not found")||i.includes("team not found")||i.includes("project not found")||i.includes("comment not found")||i.includes("user not found")},handler:async(t,n)=>(console.warn(`[LINEAR:${n.operation}] Resource not found: ${t.message}`),{maxRetries:0})},PERMISSION_ERROR:{match:(t,n)=>{if(t instanceof A&&t.status===403)return!0;let i=t.message.toLowerCase();return i.includes("permission denied")||i.includes("forbidden")||i.includes("access denied")||i.includes("insufficient permissions")||i.includes("unauthorized access")||i.includes("not authorized")},handler:async(t,n)=>(console.warn(`[LINEAR:${n.operation}] Permission denied: ${t.message}`),{maxRetries:0})},NETWORK_ERROR:{match:(t,n)=>{let i=t.message.toLowerCase();return i.includes("network")||i.includes("connection")||i.includes("econnrefused")||i.includes("enotfound")||i.includes("etimedout")||i.includes("fetch failed")||i.includes("network error")},handler:async(t,n)=>(console.warn(`[LINEAR:${n.operation}] Network error: ${t.message}`),{maxRetries:3})},VALIDATION_ERROR:{match:(t,n)=>{if(t instanceof A&&t.status===400)return!0;let i=t.message.toLowerCase();return i.includes("validation")||i.includes("invalid input")||i.includes("bad request")||i.includes("malformed")||i.includes("required field")||i.includes("graphql validation")},handler:async(t,n)=>(console.warn(`[LINEAR:${n.operation}] Validation error: ${t.message}`),{maxRetries:0})},DEFAULT:{match:(t,n)=>!0,handler:async(t,n)=>(console.error(`[LINEAR:${n.operation}] Unhandled error: ${t.message}`),{maxRetries:0})}};import{z as d}from"zod";var We=d.object({id:d.string(),title:d.string(),description:d.string().nullable().optional(),priority:d.union([d.literal(0),d.literal(1),d.literal(2),d.literal(3),d.literal(4)]),estimate:d.number().nullable().optional(),sortOrder:d.number().optional(),number:d.number(),identifier:d.string(),url:d.string(),stateId:d.string(),teamId:d.string(),assigneeId:d.string().nullable().optional(),creatorId:d.string(),projectId:d.string().nullable().optional(),cycleId:d.string().nullable().optional(),parentId:d.string().nullable().optional(),dueDate:d.coerce.date().nullable().optional(),startedAt:d.coerce.date().nullable().optional(),completedAt:d.coerce.date().nullable().optional(),canceledAt:d.coerce.date().nullable().optional(),triagedAt:d.coerce.date().nullable().optional(),snoozedUntilAt:d.coerce.date().nullable().optional(),createdAt:d.coerce.date().nullable().optional(),updatedAt:d.coerce.date().nullable().optional(),archivedAt:d.coerce.date().nullable().optional()}),Oe=d.object({id:d.string(),name:d.string(),key:d.string(),description:d.string().nullable().optional(),icon:d.string().nullable().optional(),color:d.string().nullable().optional(),private:d.boolean(),createdAt:d.coerce.date().nullable().optional(),updatedAt:d.coerce.date().nullable().optional(),archivedAt:d.coerce.date().nullable().optional()}),Ne=d.object({id:d.string(),name:d.string(),description:d.string().nullable().optional(),icon:d.string().nullable().optional(),color:d.string().nullable().optional(),state:d.enum(["planned","started","paused","completed","canceled","backlog"]),priority:d.number(),sortOrder:d.number().optional(),startDate:d.coerce.date().nullable().optional(),targetDate:d.coerce.date().nullable().optional(),completedAt:d.coerce.date().nullable().optional(),canceledAt:d.coerce.date().nullable().optional(),leadId:d.string().nullable().optional(),createdAt:d.coerce.date().nullable().optional(),updatedAt:d.coerce.date().nullable().optional(),archivedAt:d.coerce.date().nullable().optional()}),$e=d.object({id:d.string(),body:d.string(),issueId:d.string(),userId:d.string(),parentId:d.string().nullable().optional(),editedAt:d.coerce.date().nullable().optional(),createdAt:d.coerce.date().nullable().optional(),updatedAt:d.coerce.date().nullable().optional(),archivedAt:d.coerce.date().nullable().optional()}),Ge=d.object({id:d.string(),name:d.string(),email:d.string().optional().nullable(),displayName:d.string(),avatarUrl:d.string().optional().nullable(),active:d.boolean(),admin:d.boolean(),createdAt:d.coerce.date().nullable().optional(),updatedAt:d.coerce.date().nullable().optional()});var _e={version:"1.0.0",entities:{issues:We,teams:Oe,projects:Ne,comments:$e,users:Ge}};import{logEventFromContext as X}from"corsair/core";import{verifyHmacSignature as Yt}from"corsair/http";import{z as a}from"zod";var Ln=a.object({id:a.string(),createdAt:a.string(),updatedAt:a.string(),archivedAt:a.string().optional()}).catchall(a.any()),x=a.object({id:a.string(),identifier:a.string(),title:a.string(),description:a.string().optional(),priority:a.union([a.literal(0),a.literal(1),a.literal(2),a.literal(3),a.literal(4)]),estimate:a.number().optional(),sortOrder:a.number(),startedAt:a.string().optional(),completedAt:a.string().optional(),canceledAt:a.string().optional(),autoArchivedAt:a.string().optional(),autoClosedAt:a.string().optional(),dueDate:a.string().optional(),trashed:a.boolean().optional(),snoozedUntilAt:a.string().optional(),previousIdentifiers:a.array(a.string()),createdAt:a.string(),updatedAt:a.string(),branchName:a.string(),customerTicketCount:a.number(),stateId:a.string(),teamId:a.string(),creatorId:a.string()}).catchall(a.any()),T=a.object({id:a.string(),body:a.string(),editedAt:a.string().optional(),createdAt:a.string(),updatedAt:a.string(),issueId:a.string(),userId:a.string()}).catchall(a.any()),z=a.object({id:a.string(),name:a.string(),description:a.string().optional(),icon:a.string().optional(),color:a.string().optional(),priority:a.union([a.literal(0),a.literal(1),a.literal(2),a.literal(3),a.literal(4)]),sortOrder:a.number(),state:a.enum(["planned","started","paused","completed","canceled"]),progress:a.number(),url:a.string(),startDate:a.string().optional(),targetDate:a.string().optional(),completedAt:a.string().optional(),canceledAt:a.string().optional(),startedAt:a.string().optional(),completedScopeHistory:a.array(a.number()),inProgressScopeHistory:a.array(a.number()),scope:a.number(),createdAt:a.string(),updatedAt:a.string()}).catchall(a.any()),W=a.object({action:a.literal("create"),type:a.literal("Issue"),data:x,url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),O=a.object({action:a.literal("update"),type:a.literal("Issue"),data:x,updatedFrom:x.partial().optional(),url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),N=a.object({action:a.literal("remove"),type:a.literal("Issue"),data:x,url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),$=a.object({action:a.literal("create"),type:a.literal("Comment"),data:T,url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),G=a.object({action:a.literal("update"),type:a.literal("Comment"),data:T,updatedFrom:T.partial().optional(),url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),_=a.object({action:a.literal("remove"),type:a.literal("Comment"),data:T,url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),M=a.object({action:a.literal("create"),type:a.literal("Project"),data:z,url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),B=a.object({action:a.literal("update"),type:a.literal("Project"),data:z,updatedFrom:z.partial().optional(),url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),F=a.object({action:a.literal("remove"),type:a.literal("Project"),data:z,url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),En=a.union([W,O,N,$,G,_,M,B,F]);function Zt(t){return typeof t=="string"?JSON.parse(t):t}function m(t,n){if(!n)return{valid:!1,error:"Missing webhook secret"};let i=t.rawBody;if(!i)return{valid:!1,error:"Missing raw body for signature verification"};let r=t.headers,o=Array.isArray(r["linear-signature"])?r["linear-signature"][0]:r["linear-signature"];return o?Yt(i,n,o)?{valid:!0}:{valid:!1,error:"Invalid signature"}:{valid:!1,error:"Missing linear-signature header"}}function Me(t,n){return i=>{let r=Zt(i.body);return typeof r.type=="string"&&r.type===t&&typeof r.action=="string"&&r.action===n}}var b=Me;var Be={match:b("Comment","create"),handler:async(t,n)=>{let i=t.key,r=m(n,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Comment"||o.action!=="create")return{success:!0,data:void 0};console.log("\u{1F4AC} Linear Comment Created Event:",{id:o.data.id,body:o.data.body?.substring(0,100)});let c="";if(t.db.comments&&o.data.id)try{let s=o.data;c=(await t.db.comments.upsertByEntityId(s.id,{...s,editedAt:s.editedAt?new Date(s.editedAt??""):null,createdAt:new Date(s.createdAt??""),updatedAt:new Date(s.updatedAt??"")}))?.id||""}catch(s){console.warn("Failed to save comment to database:",s)}return await X(t,"linear.webhook.commentCreate",{...o},"completed"),{success:!0,corsairEntityId:c,data:o}}},Fe={match:b("Comment","update"),handler:async(t,n)=>{let i=t.key,r=m(n,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Comment"||o.action!=="update")return{success:!0,data:void 0};console.log("\u270F\uFE0F Linear Comment Updated Event:",{id:o.data.id,updatedFields:o.updatedFrom?Object.keys(o.updatedFrom):[]});let c="";if(t.db.comments&&o.data.id)try{let s=o.data;c=(await t.db.comments.upsertByEntityId(s.id,{...s,editedAt:s.editedAt?new Date(s.editedAt??""):null,createdAt:new Date(s.createdAt??""),updatedAt:new Date(s.updatedAt??"")}))?.id||""}catch(s){console.warn("Failed to update comment in database:",s)}return await X(t,"linear.webhook.commentUpdate",{...o},"completed"),{success:!0,corsairEntityId:c,data:o}}},He={match:b("Comment","remove"),handler:async(t,n)=>{let i=t.key,r=m(n,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Comment"||o.action!=="remove")return{success:!0,data:void 0};console.log("\u{1F5D1}\uFE0F Linear Comment Deleted Event:",{id:o.data.id});let c="";if(t.db.comments&&o.data.id)try{let s=await t.db.comments.findByEntityId(o.data.id);s&&(c=s.id),await t.db.comments.deleteByEntityId(o.data.id)}catch(s){console.warn("Failed to delete comment from database:",s)}return await X(t,"linear.webhook.commentRemove",{...o},"completed"),{success:!0,corsairEntityId:c,data:o}}};import{logEventFromContext as ee}from"corsair/core";var qe={match:b("Issue","create"),handler:async(t,n)=>{let i=t.key,r=m(n,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Issue"||o.action!=="create")return{success:!0,data:void 0};console.log("\u{1F4CB} Linear Issue Created Event:",{id:o.data.id,identifier:o.data.identifier,title:o.data.title});let c="";if(t.db.issues&&o.data.id)try{let s=o.data;c=(await t.db.issues.upsertByEntityId(s.id,{...s,number:parseInt(s.identifier.split("-")[1]||"0",10),url:o.url,dueDate:s.dueDate?new Date(s.dueDate??""):null,startedAt:s.startedAt?new Date(s.startedAt??""):null,completedAt:s.completedAt?new Date(s.completedAt??""):null,canceledAt:s.canceledAt?new Date(s.canceledAt??""):null,triagedAt:s.triagedAt?new Date(s.triagedAt??""):null,snoozedUntilAt:s.snoozedUntilAt?new Date(s.snoozedUntilAt??""):null,archivedAt:s.archivedAt?new Date(s.archivedAt??""):null,createdAt:new Date(s.createdAt??""),updatedAt:new Date(s.updatedAt??"")}))?.id||""}catch(s){console.warn("Failed to save issue to database:",s)}return await ee(t,"linear.webhook.issueCreate",{...o},"completed"),{success:!0,corsairEntityId:c,data:o}}},Ke={match:b("Issue","update"),handler:async(t,n)=>{let i=t.key,r=m(n,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Issue"||o.action!=="update")return{success:!0,data:void 0};console.log("\u{1F4DD} Linear Issue Updated Event:",{id:o.data.id,identifier:o.data.identifier,title:o.data.title,updatedFields:o.updatedFrom?Object.keys(o.updatedFrom):[]});let c="";if(t.db.issues&&o.data.id)try{let s=o.data;c=(await t.db.issues.upsertByEntityId(s.id,{...s,number:parseInt(s.identifier.split("-")[1]||"0",10),url:o.url,dueDate:s.dueDate?new Date(s.dueDate??""):null,startedAt:s.startedAt?new Date(s.startedAt??""):null,completedAt:s.completedAt?new Date(s.completedAt??""):null,canceledAt:s.canceledAt?new Date(s.canceledAt??""):null,triagedAt:s.triagedAt?new Date(s.triagedAt??""):null,snoozedUntilAt:s.snoozedUntilAt?new Date(s.snoozedUntilAt??""):null,archivedAt:s.archivedAt?new Date(s.archivedAt??""):null,createdAt:new Date(s.createdAt??""),updatedAt:new Date(s.updatedAt??"")}))?.id||""}catch(s){console.warn("Failed to update issue in database:",s)}return await ee(t,"linear.webhook.issueUpdate",{...o},"completed"),{success:!0,corsairEntityId:c,data:o}}},Ve={match:b("Issue","remove"),handler:async(t,n)=>{let i=t.key,r=m(n,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Issue"||o.action!=="remove")return{success:!0,data:void 0};console.log("\u{1F5D1}\uFE0F Linear Issue Deleted Event:",{id:o.data.id,identifier:o.data.identifier});let c="";if(t.db.issues&&o.data.id)try{let s=await t.db.issues.findByEntityId(o.data.id);s&&(c=s.id),await t.db.issues.deleteByEntityId(o.data.id)}catch(s){console.warn("Failed to delete issue from database:",s)}return await ee(t,"linear.webhook.issueRemove",{...o},"completed"),{success:!0,corsairEntityId:c,data:o}}};import{logEventFromContext as te}from"corsair/core";var Je={match:b("Project","create"),handler:async(t,n)=>{let i=t.key,r=m(n,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Project"||o.action!=="create")return{success:!0,data:void 0};console.log("\u{1F4CA} Linear Project Created Event:",{id:o.data.id,name:o.data.name,state:o.data.state});let c="";if(t.db.projects&&o.data.id)try{let s=o.data;c=(await t.db.projects.upsertByEntityId(s.id,{...s,completedAt:s.completedAt?new Date(s.completedAt):null,canceledAt:s.canceledAt?new Date(s.canceledAt):null,createdAt:new Date(s.createdAt??""),updatedAt:new Date(s.updatedAt??""),startDate:s.startDate?new Date(s.startDate):null,targetDate:s.targetDate?new Date(s.targetDate):null}))?.id||""}catch(s){console.warn("Failed to save project to database:",s)}return await te(t,"linear.webhook.projectCreate",{...o},"completed"),{success:!0,corsairEntityId:c,data:o}}},Qe={match:b("Project","update"),handler:async(t,n)=>{let i=t.key,r=m(n,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Project"||o.action!=="update")return{success:!0,data:void 0};console.log("\u{1F4DD} Linear Project Updated Event:",{id:o.data.id,name:o.data.name,updatedFields:o.updatedFrom?Object.keys(o.updatedFrom):[]});let c="";if(t.db.projects&&o.data.id)try{let s=o.data;c=(await t.db.projects.upsertByEntityId(s.id,{...s,completedAt:s.completedAt?new Date(s.completedAt):null,canceledAt:s.canceledAt?new Date(s.canceledAt):null,createdAt:new Date(s.createdAt??""),startDate:s.startDate?new Date(s.startDate):null,targetDate:s.targetDate?new Date(s.targetDate):null,updatedAt:new Date(s.updatedAt??"")}))?.id||""}catch(s){console.warn("Failed to update project in database:",s)}return await te(t,"linear.webhook.projectUpdate",{...o},"completed"),{success:!0,corsairEntityId:c,data:o}}},Ye={match:b("Project","remove"),handler:async(t,n)=>{let i=t.key,r=m(n,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Project"||o.action!=="remove")return{success:!0,data:void 0};console.log("\u{1F5D1}\uFE0F Linear Project Deleted Event:",{id:o.data.id,name:o.data.name});let c="";if(t.db.projects&&o.data.id)try{let s=await t.db.projects.findByEntityId(o.data.id);s&&(c=s.id),await t.db.projects.deleteByEntityId(o.data.id)}catch(s){console.warn("Failed to delete project from database:",s)}return await te(t,"linear.webhook.projectRemove",{...o},"completed"),{success:!0,corsairEntityId:c,data:o}}};var H={create:Be,update:Fe,remove:He},q={create:qe,update:Ke,remove:Ve},K={create:Je,update:Qe,remove:Ye};import{toExternalId as Xt}from"corsair/core";async function Ze(t){let n=t.access_token;if(!n)return null;let i=await fetch("https://api.linear.app/graphql",{method:"POST",headers:{Authorization:n,"Content-Type":"application/json"},body:JSON.stringify({query:"query { viewer { organization { id } } }"})});if(!i.ok)return null;let r=await i.json(),o=Xt(r.data?.viewer?.organization?.id);return o?{linkType:"organization_id",externalId:o}:null}import{firstString as eo,readBodyRecord as to}from"corsair/core";function Xe(t){let n=to(t);if(!n)return null;let i=eo([n.organizationId]);return i?{linkType:"organization_id",externalId:i}:null}var ro={issues:{create:q.create,update:q.update,remove:q.remove},comments:{create:H.create,update:H.update,remove:H.remove},projects:{create:K.create,update:K.update,remove:K.remove}},so={issues:{list:E.list,get:E.get,create:E.create,update:E.update,delete:E.delete},comments:{list:R.list,create:R.create,update:R.update,delete:R.delete},projects:{list:v.list,get:v.get,create:v.create,update:v.update,delete:v.delete},teams:{list:Y.list,get:Y.get},users:{list:Z.list,get:Z.get}},io={"issues.list":{input:l.issuesList,output:u.issuesList},"issues.get":{input:l.issuesGet,output:u.issuesGet},"issues.create":{input:l.issuesCreate,output:u.issuesCreate},"issues.update":{input:l.issuesUpdate,output:u.issuesUpdate},"issues.delete":{input:l.issuesDelete,output:u.issuesDelete},"comments.list":{input:l.commentsList,output:u.commentsList},"comments.create":{input:l.commentsCreate,output:u.commentsCreate},"comments.update":{input:l.commentsUpdate,output:u.commentsUpdate},"comments.delete":{input:l.commentsDelete,output:u.commentsDelete},"projects.list":{input:l.projectsList,output:u.projectsList},"projects.get":{input:l.projectsGet,output:u.projectsGet},"projects.create":{input:l.projectsCreate,output:u.projectsCreate},"projects.update":{input:l.projectsUpdate,output:u.projectsUpdate},"projects.delete":{input:l.projectsDelete,output:u.projectsDelete},"teams.list":{input:l.teamsList,output:u.teamsList},"teams.get":{input:l.teamsGet,output:u.teamsGet},"users.list":{input:l.usersList,output:u.usersList},"users.get":{input:l.usersGet,output:u.usersGet}},co={"issues.create":{description:"A new issue was created",payload:W,response:W},"issues.update":{description:"An issue was updated",payload:O,response:O},"issues.remove":{description:"An issue was deleted",payload:N,response:N},"comments.create":{description:"A comment was added to an issue",payload:$,response:$},"comments.update":{description:"A comment was updated",payload:G,response:G},"comments.remove":{description:"A comment was deleted",payload:_,response:_},"projects.create":{description:"A new project was created",payload:M,response:M},"projects.update":{description:"A project was updated",payload:B,response:B},"projects.remove":{description:"A project was deleted",payload:F,response:F}},po="api_key",lo={api_key:{account:["organization_id"]},oauth_2:{account:["organization_id"]},managed:{account:["organization_id"]}},uo={"issues.list":{riskLevel:"read",description:"List issues in a team"},"issues.get":{riskLevel:"read",description:"Get a specific issue"},"issues.create":{riskLevel:"write",description:"Create a new issue"},"issues.update":{riskLevel:"write",description:"Update an existing issue"},"issues.delete":{riskLevel:"destructive",irreversible:!0,description:"Permanently delete an issue [DESTRUCTIVE \xB7 IRREVERSIBLE]"},"comments.list":{riskLevel:"read",description:"List comments on an issue"},"comments.create":{riskLevel:"write",description:"Post a comment on an issue"},"comments.update":{riskLevel:"write",description:"Update a comment"},"comments.delete":{riskLevel:"destructive",irreversible:!0,description:"Delete a comment"},"projects.list":{riskLevel:"read",description:"List projects in a team"},"projects.get":{riskLevel:"read",description:"Get a specific project"},"projects.create":{riskLevel:"write",description:"Create a new project"},"projects.update":{riskLevel:"write",description:"Update an existing project"},"projects.delete":{riskLevel:"destructive",irreversible:!0,description:"Permanently delete a project [DESTRUCTIVE \xB7 IRREVERSIBLE]"},"teams.list":{riskLevel:"read",description:"List teams in the workspace"},"teams.get":{riskLevel:"read",description:"Get a specific team"},"users.list":{riskLevel:"read",description:"List users in the workspace"},"users.get":{riskLevel:"read",description:"Get a specific user"}};function Xn(t={}){let n={...t,authType:t.authType??po};return{id:"linear",authConfig:lo,oauthConfig:{providerName:"Linear",authUrl:"https://linear.app/oauth/authorize",tokenUrl:"https://api.linear.app/oauth/token",scopes:["read","write"],authParams:{prompt:"consent"}},schema:_e,options:n,hooks:n.hooks,webhookHooks:n.webhookHooks,endpoints:so,webhooks:ro,endpointMeta:uo,endpointSchemas:io,webhookSchemas:co,pluginWebhookMatcher:i=>"linear-signature"in i.headers,pluginTenantWebhookMatcher:Xe,oauthWebhookTenantLinkResolver:Ze,errorHandlers:{...ze,...n.errorHandlers},keyBuilder:async(i,r)=>{let o=i.authType;if(r==="webhook"&&n.webhookSecret)return n.webhookSecret;if(r==="webhook"){let c=await i.keys.get_webhook_signature();if(!c)throw new Error("[auth-missing:linear:webhook_signature]: Linear webhook signature is missing");return c}if(r==="endpoint"&&n.key)return n.key;if(r==="endpoint"&&i.authType==="api_key"){let c=await i.keys.get_api_key();if(!c)throw new et("linear","api_key");return c}if(r==="endpoint"&&i.authType==="oauth_2")return`Bearer ${await oo(i,{plugin:"linear",tokenUrl:"https://api.linear.app/oauth/token"})}`;if(i.authType==="managed"){if(!i.hub)throw new Error("[auth-missing:linear:managed]: Hub config is required for managed auth. Pass hub: { ... } to createCorsair().");let c={keys:i.keys,hub:i.hub,plugin:"linear",tenantId:i.tenantId},s=await ao(c);return await no(i,c),`Bearer ${s.accessToken}`}throw new et("linear","oauth_2")}}}export{Me as createLinearEventMatch,ze as errorHandlers,Xn as linear,lo as linearAuthConfig,io as linearEndpointSchemas,m as verifyLinearWebhookSignature};
450
+ `,$e=async(t,n)=>{let s=(await p(io,t.key,{first:n.first||50,after:n.after})).users;if(s.nodes&&t.db.users)try{for(let o of s.nodes)await t.db.users.upsertByEntityId(o.id,{...o,createdAt:new Date(o.createdAt??""),updatedAt:new Date(o.updatedAt??"")})}catch(o){console.warn("Failed to save users to database:",o)}return await Ge(t,"linear.users.list",{...n},"completed"),s},Be=async(t,n)=>{let s=(await p(co,t.key,{id:n.id})).user;if(s&&t.db.users)try{await t.db.users.upsertByEntityId(s.id,{...s,createdAt:new Date(s.createdAt??""),updatedAt:new Date(s.updatedAt??"")})}catch(o){console.warn("Failed to save user to database:",o)}return await Ge(t,"linear.users.get",{...n},"completed"),s};var P={list:se,create:ie,update:ce,delete:de},v={list:Se,get:we,create:ke,update:Re,delete:De},S={list:Ue,get:Pe,create:xe,update:Te,delete:ze},te={list:Oe,get:Ne},oe={list:$e,get:Be};import{ApiError as w}from"corsair/http";var Me={RATE_LIMIT_ERROR:{match:(t,n)=>{if(t instanceof w&&t.status===429)return!0;let r=t.message.toLowerCase();return r.includes("rate_limited")||r.includes("ratelimited")||r.includes("rate limit")||r.includes("too many requests")||t.message.includes("429")},handler:async(t,n)=>{console.log(`[LINEAR:${n.operation}] Rate limit exceeded`);let r;return t instanceof w&&t.retryAfter&&(r=t.retryAfter),{maxRetries:5,headersRetryAfterMs:r}}},AUTH_ERROR:{match:(t,n)=>{if(t instanceof w&&t.status===401)return!0;let r=t.message.toLowerCase();return r.includes("unauthorized")||r.includes("authentication")||r.includes("invalid token")||r.includes("token expired")||r.includes("token revoked")||r.includes("invalid api key")||r.includes("forbidden")||r.includes("access denied")},handler:async(t,n)=>(console.log(`[LINEAR:${n.operation}] Authentication failed - check your API key`),{maxRetries:0})},NOT_FOUND_ERROR:{match:(t,n)=>{if(t instanceof w&&t.status===404)return!0;let r=t.message.toLowerCase();return r.includes("not found")||r.includes("does not exist")||r.includes("could not find")||r.includes("issue not found")||r.includes("team not found")||r.includes("project not found")||r.includes("comment not found")||r.includes("user not found")},handler:async(t,n)=>(console.warn(`[LINEAR:${n.operation}] Resource not found: ${t.message}`),{maxRetries:0})},PERMISSION_ERROR:{match:(t,n)=>{if(t instanceof w&&t.status===403)return!0;let r=t.message.toLowerCase();return r.includes("permission denied")||r.includes("forbidden")||r.includes("access denied")||r.includes("insufficient permissions")||r.includes("unauthorized access")||r.includes("not authorized")},handler:async(t,n)=>(console.warn(`[LINEAR:${n.operation}] Permission denied: ${t.message}`),{maxRetries:0})},NETWORK_ERROR:{match:(t,n)=>{let r=t.message.toLowerCase();return r.includes("network")||r.includes("connection")||r.includes("econnrefused")||r.includes("enotfound")||r.includes("etimedout")||r.includes("fetch failed")||r.includes("network error")},handler:async(t,n)=>(console.warn(`[LINEAR:${n.operation}] Network error: ${t.message}`),{maxRetries:3})},VALIDATION_ERROR:{match:(t,n)=>{if(t instanceof w&&t.status===400)return!0;let r=t.message.toLowerCase();return r.includes("validation")||r.includes("invalid input")||r.includes("bad request")||r.includes("malformed")||r.includes("required field")||r.includes("graphql validation")},handler:async(t,n)=>(console.warn(`[LINEAR:${n.operation}] Validation error: ${t.message}`),{maxRetries:0})},DEFAULT:{match:(t,n)=>!0,handler:async(t,n)=>(console.error(`[LINEAR:${n.operation}] Unhandled error: ${t.message}`),{maxRetries:0})}};import{z as c}from"zod";var _e=c.object({id:c.string(),title:c.string(),description:c.string().nullable().optional(),priority:c.union([c.literal(0),c.literal(1),c.literal(2),c.literal(3),c.literal(4)]),estimate:c.number().nullable().optional(),sortOrder:c.number().optional(),number:c.number(),identifier:c.string(),url:c.string(),stateId:c.string(),teamId:c.string(),assigneeId:c.string().nullable().optional(),creatorId:c.string(),assignee:c.object({id:c.string(),name:c.string().nullable().optional(),email:c.string().nullable().optional()}).nullable().optional(),state:c.object({id:c.string(),name:c.string(),type:c.string()}).nullable().optional(),projectId:c.string().nullable().optional(),cycleId:c.string().nullable().optional(),parentId:c.string().nullable().optional(),dueDate:c.coerce.date().nullable().optional(),startedAt:c.coerce.date().nullable().optional(),completedAt:c.coerce.date().nullable().optional(),canceledAt:c.coerce.date().nullable().optional(),triagedAt:c.coerce.date().nullable().optional(),snoozedUntilAt:c.coerce.date().nullable().optional(),createdAt:c.coerce.date().nullable().optional(),updatedAt:c.coerce.date().nullable().optional(),archivedAt:c.coerce.date().nullable().optional()}),Fe=c.object({id:c.string(),name:c.string(),key:c.string(),description:c.string().nullable().optional(),icon:c.string().nullable().optional(),color:c.string().nullable().optional(),private:c.boolean(),createdAt:c.coerce.date().nullable().optional(),updatedAt:c.coerce.date().nullable().optional(),archivedAt:c.coerce.date().nullable().optional()}),He=c.object({id:c.string(),name:c.string(),description:c.string().nullable().optional(),icon:c.string().nullable().optional(),color:c.string().nullable().optional(),state:c.enum(["planned","started","paused","completed","canceled","backlog"]),priority:c.number(),sortOrder:c.number().optional(),startDate:c.coerce.date().nullable().optional(),targetDate:c.coerce.date().nullable().optional(),completedAt:c.coerce.date().nullable().optional(),canceledAt:c.coerce.date().nullable().optional(),leadId:c.string().nullable().optional(),createdAt:c.coerce.date().nullable().optional(),updatedAt:c.coerce.date().nullable().optional(),archivedAt:c.coerce.date().nullable().optional()}),qe=c.object({id:c.string(),body:c.string(),issueId:c.string(),userId:c.string(),parentId:c.string().nullable().optional(),editedAt:c.coerce.date().nullable().optional(),createdAt:c.coerce.date().nullable().optional(),updatedAt:c.coerce.date().nullable().optional(),archivedAt:c.coerce.date().nullable().optional()}),Ke=c.object({id:c.string(),name:c.string(),email:c.string().optional().nullable(),displayName:c.string(),avatarUrl:c.string().optional().nullable(),active:c.boolean(),admin:c.boolean(),createdAt:c.coerce.date().nullable().optional(),updatedAt:c.coerce.date().nullable().optional()});var Ve={version:"1.0.0",entities:{issues:_e,teams:Fe,projects:He,comments:qe,users:Ke}};import{logEventFromContext as ne}from"corsair/core";import{verifyHmacSignature as po}from"corsair/http";import{z as a}from"zod";var zn=a.object({id:a.string(),createdAt:a.string(),updatedAt:a.string(),archivedAt:a.string().optional()}).catchall(a.any()),W=a.object({id:a.string(),identifier:a.string(),title:a.string(),description:a.string().optional(),priority:a.union([a.literal(0),a.literal(1),a.literal(2),a.literal(3),a.literal(4)]),estimate:a.number().optional(),sortOrder:a.number(),startedAt:a.string().optional(),completedAt:a.string().optional(),canceledAt:a.string().optional(),autoArchivedAt:a.string().optional(),autoClosedAt:a.string().optional(),dueDate:a.string().optional(),trashed:a.boolean().optional(),snoozedUntilAt:a.string().optional(),previousIdentifiers:a.array(a.string()),createdAt:a.string(),updatedAt:a.string(),branchName:a.string(),customerTicketCount:a.number(),stateId:a.string(),teamId:a.string(),creatorId:a.string()}).catchall(a.any()),O=a.object({id:a.string(),body:a.string(),editedAt:a.string().optional(),createdAt:a.string(),updatedAt:a.string(),issueId:a.string(),userId:a.string()}).catchall(a.any()),N=a.object({id:a.string(),name:a.string(),description:a.string().optional(),icon:a.string().optional(),color:a.string().optional(),priority:a.union([a.literal(0),a.literal(1),a.literal(2),a.literal(3),a.literal(4)]),sortOrder:a.number(),state:a.enum(["planned","started","paused","completed","canceled"]),progress:a.number(),url:a.string(),startDate:a.string().optional(),targetDate:a.string().optional(),completedAt:a.string().optional(),canceledAt:a.string().optional(),startedAt:a.string().optional(),completedScopeHistory:a.array(a.number()),inProgressScopeHistory:a.array(a.number()),scope:a.number(),createdAt:a.string(),updatedAt:a.string()}).catchall(a.any()),G=a.object({action:a.literal("create"),type:a.literal("Issue"),data:W,url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),$=a.object({action:a.literal("update"),type:a.literal("Issue"),data:W,updatedFrom:W.partial().optional(),url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),B=a.object({action:a.literal("remove"),type:a.literal("Issue"),data:W,url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),M=a.object({action:a.literal("create"),type:a.literal("Comment"),data:O,url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),_=a.object({action:a.literal("update"),type:a.literal("Comment"),data:O,updatedFrom:O.partial().optional(),url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),F=a.object({action:a.literal("remove"),type:a.literal("Comment"),data:O,url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),H=a.object({action:a.literal("create"),type:a.literal("Project"),data:N,url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),q=a.object({action:a.literal("update"),type:a.literal("Project"),data:N,updatedFrom:N.partial().optional(),url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),K=a.object({action:a.literal("remove"),type:a.literal("Project"),data:N,url:a.string(),createdAt:a.string(),organizationId:a.string(),webhookId:a.string()}),Wn=a.union([G,$,B,M,_,F,H,q,K]);function lo(t){return typeof t=="string"?JSON.parse(t):t}function m(t,n){if(!n)return{valid:!1,error:"Missing webhook secret"};let r=t.rawBody;if(!r)return{valid:!1,error:"Missing raw body for signature verification"};let s=t.headers,o=Array.isArray(s["linear-signature"])?s["linear-signature"][0]:s["linear-signature"];return o?po(r,n,o)?{valid:!0}:{valid:!1,error:"Invalid signature"}:{valid:!1,error:"Missing linear-signature header"}}function Je(t,n){return r=>{let s=lo(r.body);return typeof s.type=="string"&&s.type===t&&typeof s.action=="string"&&s.action===n}}var g=Je;var Qe={match:g("Comment","create"),handler:async(t,n)=>{let r=t.key,s=m(n,r);if(!s.valid)return{success:!1,statusCode:401,error:s.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Comment"||o.action!=="create")return{success:!0,data:void 0};console.log("\u{1F4AC} Linear Comment Created Event:",{id:o.data.id,body:o.data.body?.substring(0,100)});let d="";if(t.db.comments&&o.data.id)try{let i=o.data;d=(await t.db.comments.upsertByEntityId(i.id,{...i,editedAt:i.editedAt?new Date(i.editedAt??""):null,createdAt:new Date(i.createdAt??""),updatedAt:new Date(i.updatedAt??"")}))?.id||""}catch(i){console.warn("Failed to save comment to database:",i)}return await ne(t,"linear.webhook.commentCreate",{...o},"completed"),{success:!0,corsairEntityId:d,data:o}}},Ye={match:g("Comment","update"),handler:async(t,n)=>{let r=t.key,s=m(n,r);if(!s.valid)return{success:!1,statusCode:401,error:s.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Comment"||o.action!=="update")return{success:!0,data:void 0};console.log("\u270F\uFE0F Linear Comment Updated Event:",{id:o.data.id,updatedFields:o.updatedFrom?Object.keys(o.updatedFrom):[]});let d="";if(t.db.comments&&o.data.id)try{let i=o.data;d=(await t.db.comments.upsertByEntityId(i.id,{...i,editedAt:i.editedAt?new Date(i.editedAt??""):null,createdAt:new Date(i.createdAt??""),updatedAt:new Date(i.updatedAt??"")}))?.id||""}catch(i){console.warn("Failed to update comment in database:",i)}return await ne(t,"linear.webhook.commentUpdate",{...o},"completed"),{success:!0,corsairEntityId:d,data:o}}},Ze={match:g("Comment","remove"),handler:async(t,n)=>{let r=t.key,s=m(n,r);if(!s.valid)return{success:!1,statusCode:401,error:s.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Comment"||o.action!=="remove")return{success:!0,data:void 0};console.log("\u{1F5D1}\uFE0F Linear Comment Deleted Event:",{id:o.data.id});let d="";if(t.db.comments&&o.data.id)try{let i=await t.db.comments.findByEntityId(o.data.id);i&&(d=i.id),await t.db.comments.deleteByEntityId(o.data.id)}catch(i){console.warn("Failed to delete comment from database:",i)}return await ne(t,"linear.webhook.commentRemove",{...o},"completed"),{success:!0,corsairEntityId:d,data:o}}};import{logEventFromContext as ae}from"corsair/core";async function Xe(t,n){if(n.assignee!==void 0)return n.assignee;if(!n.assigneeId)return null;let r=await t.db.issues?.findByEntityId(n.id);return r?.data.assignee?.id===n.assigneeId?r.data.assignee:null}var et={match:g("Issue","create"),handler:async(t,n)=>{let r=t.key,s=m(n,r);if(!s.valid)return{success:!1,statusCode:401,error:s.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Issue"||o.action!=="create")return{success:!0,data:void 0};console.log("\u{1F4CB} Linear Issue Created Event:",{id:o.data.id,identifier:o.data.identifier,title:o.data.title});let d="";if(t.db.issues&&o.data.id)try{let i=o.data;d=(await t.db.issues.upsertByEntityId(i.id,{...i,assignee:await Xe(t,i),number:parseInt(i.identifier.split("-")[1]||"0",10),url:o.url,dueDate:i.dueDate?new Date(i.dueDate??""):null,startedAt:i.startedAt?new Date(i.startedAt??""):null,completedAt:i.completedAt?new Date(i.completedAt??""):null,canceledAt:i.canceledAt?new Date(i.canceledAt??""):null,triagedAt:i.triagedAt?new Date(i.triagedAt??""):null,snoozedUntilAt:i.snoozedUntilAt?new Date(i.snoozedUntilAt??""):null,archivedAt:i.archivedAt?new Date(i.archivedAt??""):null,createdAt:new Date(i.createdAt??""),updatedAt:new Date(i.updatedAt??"")}))?.id||""}catch(i){console.warn("Failed to save issue to database:",i)}return await ae(t,"linear.webhook.issueCreate",{...o},"completed"),{success:!0,corsairEntityId:d,data:o}}},tt={match:g("Issue","update"),handler:async(t,n)=>{let r=t.key,s=m(n,r);if(!s.valid)return{success:!1,statusCode:401,error:s.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Issue"||o.action!=="update")return{success:!0,data:void 0};console.log("\u{1F4DD} Linear Issue Updated Event:",{id:o.data.id,identifier:o.data.identifier,title:o.data.title,updatedFields:o.updatedFrom?Object.keys(o.updatedFrom):[]});let d="";if(t.db.issues&&o.data.id)try{let i=o.data;d=(await t.db.issues.upsertByEntityId(i.id,{...i,assignee:await Xe(t,i),number:parseInt(i.identifier.split("-")[1]||"0",10),url:o.url,dueDate:i.dueDate?new Date(i.dueDate??""):null,startedAt:i.startedAt?new Date(i.startedAt??""):null,completedAt:i.completedAt?new Date(i.completedAt??""):null,canceledAt:i.canceledAt?new Date(i.canceledAt??""):null,triagedAt:i.triagedAt?new Date(i.triagedAt??""):null,snoozedUntilAt:i.snoozedUntilAt?new Date(i.snoozedUntilAt??""):null,archivedAt:i.archivedAt?new Date(i.archivedAt??""):null,createdAt:new Date(i.createdAt??""),updatedAt:new Date(i.updatedAt??"")}))?.id||""}catch(i){console.warn("Failed to update issue in database:",i)}return await ae(t,"linear.webhook.issueUpdate",{...o},"completed"),{success:!0,corsairEntityId:d,data:o}}},ot={match:g("Issue","remove"),handler:async(t,n)=>{let r=t.key,s=m(n,r);if(!s.valid)return{success:!1,statusCode:401,error:s.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Issue"||o.action!=="remove")return{success:!0,data:void 0};console.log("\u{1F5D1}\uFE0F Linear Issue Deleted Event:",{id:o.data.id,identifier:o.data.identifier});let d="";if(t.db.issues&&o.data.id)try{let i=await t.db.issues.findByEntityId(o.data.id);i&&(d=i.id),await t.db.issues.deleteByEntityId(o.data.id)}catch(i){console.warn("Failed to delete issue from database:",i)}return await ae(t,"linear.webhook.issueRemove",{...o},"completed"),{success:!0,corsairEntityId:d,data:o}}};import{logEventFromContext as re}from"corsair/core";var nt={match:g("Project","create"),handler:async(t,n)=>{let r=t.key,s=m(n,r);if(!s.valid)return{success:!1,statusCode:401,error:s.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Project"||o.action!=="create")return{success:!0,data:void 0};console.log("\u{1F4CA} Linear Project Created Event:",{id:o.data.id,name:o.data.name,state:o.data.state});let d="";if(t.db.projects&&o.data.id)try{let i=o.data;d=(await t.db.projects.upsertByEntityId(i.id,{...i,completedAt:i.completedAt?new Date(i.completedAt):null,canceledAt:i.canceledAt?new Date(i.canceledAt):null,createdAt:new Date(i.createdAt??""),updatedAt:new Date(i.updatedAt??""),startDate:i.startDate?new Date(i.startDate):null,targetDate:i.targetDate?new Date(i.targetDate):null}))?.id||""}catch(i){console.warn("Failed to save project to database:",i)}return await re(t,"linear.webhook.projectCreate",{...o},"completed"),{success:!0,corsairEntityId:d,data:o}}},at={match:g("Project","update"),handler:async(t,n)=>{let r=t.key,s=m(n,r);if(!s.valid)return{success:!1,statusCode:401,error:s.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Project"||o.action!=="update")return{success:!0,data:void 0};console.log("\u{1F4DD} Linear Project Updated Event:",{id:o.data.id,name:o.data.name,updatedFields:o.updatedFrom?Object.keys(o.updatedFrom):[]});let d="";if(t.db.projects&&o.data.id)try{let i=o.data;d=(await t.db.projects.upsertByEntityId(i.id,{...i,completedAt:i.completedAt?new Date(i.completedAt):null,canceledAt:i.canceledAt?new Date(i.canceledAt):null,createdAt:new Date(i.createdAt??""),startDate:i.startDate?new Date(i.startDate):null,targetDate:i.targetDate?new Date(i.targetDate):null,updatedAt:new Date(i.updatedAt??"")}))?.id||""}catch(i){console.warn("Failed to update project in database:",i)}return await re(t,"linear.webhook.projectUpdate",{...o},"completed"),{success:!0,corsairEntityId:d,data:o}}},rt={match:g("Project","remove"),handler:async(t,n)=>{let r=t.key,s=m(n,r);if(!s.valid)return{success:!1,statusCode:401,error:s.error||"Signature verification failed"};let o=n.payload;if(o.type!=="Project"||o.action!=="remove")return{success:!0,data:void 0};console.log("\u{1F5D1}\uFE0F Linear Project Deleted Event:",{id:o.data.id,name:o.data.name});let d="";if(t.db.projects&&o.data.id)try{let i=await t.db.projects.findByEntityId(o.data.id);i&&(d=i.id),await t.db.projects.deleteByEntityId(o.data.id)}catch(i){console.warn("Failed to delete project from database:",i)}return await re(t,"linear.webhook.projectRemove",{...o},"completed"),{success:!0,corsairEntityId:d,data:o}}};var V={create:Qe,update:Ye,remove:Ze},J={create:et,update:tt,remove:ot},Q={create:nt,update:at,remove:rt};import{toExternalId as uo}from"corsair/core";async function st(t){let n=t.access_token;if(!n)return null;let r=await fetch("https://api.linear.app/graphql",{method:"POST",headers:{Authorization:n,"Content-Type":"application/json"},body:JSON.stringify({query:"query { viewer { organization { id } } }"})});if(!r.ok)return null;let s=await r.json(),o=uo(s.data?.viewer?.organization?.id);return o?{linkType:"organization_id",externalId:o}:null}import{firstString as mo,readBodyRecord as bo}from"corsair/core";function it(t){let n=bo(t);if(!n)return null;let r=mo([n.organizationId]);return r?{linkType:"organization_id",externalId:r}:null}var ho={issues:{create:J.create,update:J.update,remove:J.remove},comments:{create:V.create,update:V.update,remove:V.remove},projects:{create:Q.create,update:Q.update,remove:Q.remove}},Io={issues:{list:v.list,get:v.get,create:v.create,update:v.update,delete:v.delete},comments:{list:P.list,create:P.create,update:P.update,delete:P.delete},projects:{list:S.list,get:S.get,create:S.create,update:S.update,delete:S.delete},teams:{list:te.list,get:te.get},users:{list:oe.list,get:oe.get}},jo={"issues.list":{input:l.issuesList,output:u.issuesList},"issues.get":{input:l.issuesGet,output:u.issuesGet},"issues.create":{input:l.issuesCreate,output:u.issuesCreate},"issues.update":{input:l.issuesUpdate,output:u.issuesUpdate},"issues.delete":{input:l.issuesDelete,output:u.issuesDelete},"comments.list":{input:l.commentsList,output:u.commentsList},"comments.create":{input:l.commentsCreate,output:u.commentsCreate},"comments.update":{input:l.commentsUpdate,output:u.commentsUpdate},"comments.delete":{input:l.commentsDelete,output:u.commentsDelete},"projects.list":{input:l.projectsList,output:u.projectsList},"projects.get":{input:l.projectsGet,output:u.projectsGet},"projects.create":{input:l.projectsCreate,output:u.projectsCreate},"projects.update":{input:l.projectsUpdate,output:u.projectsUpdate},"projects.delete":{input:l.projectsDelete,output:u.projectsDelete},"teams.list":{input:l.teamsList,output:u.teamsList},"teams.get":{input:l.teamsGet,output:u.teamsGet},"users.list":{input:l.usersList,output:u.usersList},"users.get":{input:l.usersGet,output:u.usersGet}},Co={"issues.create":{description:"A new issue was created",payload:G,response:G},"issues.update":{description:"An issue was updated",payload:$,response:$},"issues.remove":{description:"An issue was deleted",payload:B,response:B},"comments.create":{description:"A comment was added to an issue",payload:M,response:M},"comments.update":{description:"A comment was updated",payload:_,response:_},"comments.remove":{description:"A comment was deleted",payload:F,response:F},"projects.create":{description:"A new project was created",payload:H,response:H},"projects.update":{description:"A project was updated",payload:q,response:q},"projects.remove":{description:"A project was deleted",payload:K,response:K}},Lo="api_key",Eo={api_key:{account:["organization_id"]},oauth_2:{account:["organization_id"]},managed:{account:["organization_id"]}},Ao={"issues.list":{riskLevel:"read",description:"Lists issues, newest created first, across the workspace or one team; filter by assignee, state, labels or project."},"issues.get":{riskLevel:"read",description:'Reads one issue; id is the UUID or an identifier such as "ENG-123".'},"issues.create":{riskLevel:"write",description:"Create a new issue"},"issues.update":{riskLevel:"write",description:"Update an existing issue"},"issues.delete":{riskLevel:"destructive",irreversible:!0,description:"Permanently delete an issue [DESTRUCTIVE \xB7 IRREVERSIBLE]"},"comments.list":{riskLevel:"read",description:'Comments on one issue; issueId is the UUID or an identifier such as "ENG-123".'},"comments.create":{riskLevel:"write",description:"Post a comment on an issue"},"comments.update":{riskLevel:"write",description:"Update a comment"},"comments.delete":{riskLevel:"destructive",irreversible:!0,description:"Delete a comment"},"projects.list":{riskLevel:"read",description:"Lists every project in the workspace; there is no team filter, so check each project's teams. Page with after."},"projects.get":{riskLevel:"read",description:"Get a specific project"},"projects.create":{riskLevel:"write",description:"Create a new project"},"projects.update":{riskLevel:"write",description:"Update an existing project"},"projects.delete":{riskLevel:"destructive",irreversible:!0,description:"Permanently delete a project [DESTRUCTIVE \xB7 IRREVERSIBLE]"},"teams.list":{riskLevel:"read",description:"List teams in the workspace"},"teams.get":{riskLevel:"read",description:"Get a specific team"},"users.list":{riskLevel:"read",description:"List users in the workspace"},"users.get":{riskLevel:"read",description:"Get a specific user"}};function ua(t={}){let n={...t,authType:t.authType??Lo};return{id:"linear",authConfig:Eo,oauthConfig:{providerName:"Linear",authUrl:"https://linear.app/oauth/authorize",tokenUrl:"https://api.linear.app/oauth/token",scopes:["read","write"],authParams:{prompt:"consent"}},schema:Ve,options:n,hooks:n.hooks,webhookHooks:n.webhookHooks,endpoints:Io,webhooks:ho,endpointMeta:Ao,endpointSchemas:jo,webhookSchemas:Co,pluginWebhookMatcher:r=>"linear-signature"in r.headers,pluginTenantWebhookMatcher:it,oauthWebhookTenantLinkResolver:st,errorHandlers:{...Me,...n.errorHandlers},keyBuilder:async(r,s)=>{let o=r.authType;if(s==="webhook"&&n.webhookSecret)return n.webhookSecret;if(s==="webhook"){let d=await r.keys.get_webhook_signature();if(!d)throw new Error("[auth-missing:linear:webhook_signature]: Linear webhook signature is missing");return d}if(s==="endpoint"&&n.key)return n.key;if(s==="endpoint"&&r.authType==="api_key"){let d=await r.keys.get_api_key();if(!d)throw new ct("linear","api_key");return d}if(s==="endpoint"&&r.authType==="oauth_2")return`Bearer ${await go(r,{plugin:"linear",tokenUrl:"https://api.linear.app/oauth/token"})}`;if(r.authType==="managed"){if(!r.hub)throw new Error("[auth-missing:linear:managed]: Hub config is required for managed auth. Pass hub: { ... } to createCorsair().");let d={keys:r.keys,hub:r.hub,plugin:"linear",tenantId:r.tenantId},i=await fo(d);return await yo(r,d),`Bearer ${i.accessToken}`}throw new ct("linear","oauth_2")}}}export{Je as createLinearEventMatch,Me as errorHandlers,ua as linear,Eo as linearAuthConfig,jo as linearEndpointSchemas,m as verifyLinearWebhookSignature};
@@ -13,6 +13,16 @@ export declare const LinearIssue: z.ZodObject<{
13
13
  teamId: z.ZodString;
14
14
  assigneeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
15
  creatorId: z.ZodString;
16
+ assignee: z.ZodOptional<z.ZodNullable<z.ZodObject<{
17
+ id: z.ZodString;
18
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ }, z.core.$strip>>>;
21
+ state: z.ZodOptional<z.ZodNullable<z.ZodObject<{
22
+ id: z.ZodString;
23
+ name: z.ZodString;
24
+ type: z.ZodString;
25
+ }, z.core.$strip>>>;
16
26
  projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
27
  cycleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
28
  parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1 +1 @@
1
- {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../schema/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK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AC,OAAO,UAAU,CAAC,CAAC;AACpD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
@@ -15,6 +15,16 @@ export declare const LinearSchema: {
15
15
  teamId: import("zod").ZodString;
16
16
  assigneeId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
17
17
  creatorId: import("zod").ZodString;
18
+ assignee: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
19
+ id: import("zod").ZodString;
20
+ name: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
21
+ email: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
22
+ }, import("zod/v4/core").$strip>>>;
23
+ state: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
24
+ id: import("zod").ZodString;
25
+ name: import("zod").ZodString;
26
+ type: import("zod").ZodString;
27
+ }, import("zod/v4/core").$strip>>>;
18
28
  projectId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
19
29
  cycleId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
20
30
  parentId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../schema/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASf,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../schema/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASf,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=issues-webhook.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issues-webhook.test.d.ts","sourceRoot":"","sources":["../../webhooks/issues-webhook.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"issues.d.ts","sourceRoot":"","sources":["../../webhooks/issues.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,eAAO,MAAM,WAAW,EAAE,cAAc,CAAC,aAAa,CAwErD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,cAAc,CAAC,aAAa,CAyErD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,cAAc,CAAC,aAAa,CAuDrD,CAAC"}
1
+ {"version":3,"file":"issues.d.ts","sourceRoot":"","sources":["../../webhooks/issues.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAqB/C,eAAO,MAAM,WAAW,EAAE,cAAc,CAAC,aAAa,CAyErD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,cAAc,CAAC,aAAa,CA0ErD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,cAAc,CAAC,aAAa,CAuDrD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corsair-dev/linear",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Linear plugin for Corsair",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "typescript": "^5.9.3",
25
25
  "zod": "^4.1.13",
26
26
  "jest": "^29.7.0",
27
- "corsair": "0.1.129"
27
+ "corsair": "0.2.31"
28
28
  },
29
29
  "keywords": [
30
30
  "corsair",