@corsair-dev/linear 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ import 'dotenv/config';
2
+ //# sourceMappingURL=api.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.test.d.ts","sourceRoot":"","sources":["../api.test.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,KAAK,EACX,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,MAAM,kBAAkB,CAAC;AAE1B,qBAAa,cAAe,SAAQ,KAAK;aAGvB,IAAI,CAAC,EAAE,MAAM;gBAD7B,OAAO,EAAE,MAAM,EACC,IAAI,CAAC,EAAE,MAAM,YAAA;CAK9B;AAID,wBAAsB,iBAAiB,CAAC,CAAC,EACxC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,OAAO,CAAC,CAAC,CAAC,CAuDZ;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,eAAe,IAAI,CAC3D,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KACpB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE1B,MAAM,WAAW,oBAAoB;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAClC;AAED,MAAM,WAAW,2BAA2B;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IACnC,OA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OAAO,CAAC,EAAE,2BAA2B,GACnC,oBAAoB,CAEtB"}
@@ -1,4 +1,4 @@
1
- import type { LinearEndpoints } from '..';
1
+ import type { LinearEndpoints } from '../index';
2
2
  export declare const list: LinearEndpoints['commentsList'];
3
3
  export declare const create: LinearEndpoints['commentsCreate'];
4
4
  export declare const update: LinearEndpoints['commentsUpdate'];
@@ -1 +1 @@
1
- {"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../endpoints/comments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,IAAI,CAAC;AAwG1C,eAAO,MAAM,IAAI,EAAE,eAAe,CAAC,cAAc,CAuChD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,gBAAgB,CAmCpD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,gBAAgB,CAoCpD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,gBAAgB,CA+B3D,CAAC"}
1
+ {"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../endpoints/comments.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAuGhD,eAAO,MAAM,IAAI,EAAE,eAAe,CAAC,cAAc,CAuChD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,gBAAgB,CAmCpD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,gBAAgB,CAoCpD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,gBAAgB,CA+B3D,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { LinearEndpoints } from '..';
1
+ import type { LinearEndpoints } from '../index';
2
2
  export declare const list: LinearEndpoints['issuesList'];
3
3
  export declare const get: LinearEndpoints['issuesGet'];
4
4
  export declare const create: LinearEndpoints['issuesCreate'];
@@ -1 +1 @@
1
- {"version":3,"file":"issues.d.ts","sourceRoot":"","sources":["../../endpoints/issues.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAwB,eAAe,EAAE,MAAM,IAAI,CAAC;AA4RhE,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;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,4 +1,4 @@
1
- import type { LinearEndpoints } from '..';
1
+ import type { LinearEndpoints } from '../index';
2
2
  export declare const list: LinearEndpoints['projectsList'];
3
3
  export declare const get: LinearEndpoints['projectsGet'];
4
4
  export declare const create: LinearEndpoints['projectsCreate'];
@@ -1 +1 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../endpoints/projects.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAwB,eAAe,EAAE,MAAM,IAAI,CAAC;AAkJhE,eAAO,MAAM,IAAI,EAAE,eAAe,CAAC,cAAc,CAkChD,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,eAAe,CAAC,aAAa,CA6B9C,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,gBAAgB,CAqBpD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,gBAAgB,CAqBpD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,gBAAgB,CA2B3D,CAAC"}
1
+ {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../endpoints/projects.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAwB,eAAe,EAAE,MAAM,UAAU,CAAC;AAiJtE,eAAO,MAAM,IAAI,EAAE,eAAe,CAAC,cAAc,CAkChD,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,eAAe,CAAC,aAAa,CA6B9C,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,gBAAgB,CAqBpD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,gBAAgB,CAqBpD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,gBAAgB,CA2B3D,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { LinearEndpoints } from '..';
1
+ import type { LinearEndpoints } from '../index';
2
2
  export declare const list: LinearEndpoints['teamsList'];
3
3
  export declare const get: LinearEndpoints['teamsGet'];
4
4
  //# sourceMappingURL=teams.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["../../endpoints/teams.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,IAAI,CAAC;AA4C1C,eAAO,MAAM,IAAI,EAAE,eAAe,CAAC,WAAW,CAiC7C,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,eAAe,CAAC,UAAU,CAuB3C,CAAC"}
1
+ {"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["../../endpoints/teams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA2ChD,eAAO,MAAM,IAAI,EAAE,eAAe,CAAC,WAAW,CAiC7C,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,eAAe,CAAC,UAAU,CAuB3C,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { LinearEndpoints } from '..';
1
+ import type { LinearEndpoints } from '../index';
2
2
  export declare const list: LinearEndpoints['usersList'];
3
3
  export declare const get: LinearEndpoints['usersGet'];
4
4
  //# sourceMappingURL=users.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../endpoints/users.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,IAAI,CAAC;AA4C1C,eAAO,MAAM,IAAI,EAAE,eAAe,CAAC,WAAW,CAiC7C,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,eAAe,CAAC,UAAU,CAuB3C,CAAC"}
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../endpoints/users.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA2ChD,eAAO,MAAM,IAAI,EAAE,eAAe,CAAC,WAAW,CAiC7C,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,eAAe,CAAC,UAAU,CAuB3C,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import type { BindEndpoints, BindWebhooks, CorsairEndpoint, CorsairErrorHandler, CorsairPlugin, CorsairPluginContext, CorsairWebhook, KeyBuilderContext, PluginPermissionsConfig } from 'corsair/core';
2
- import type { PickAuth } from 'corsair/core';
1
+ import type { BindEndpoints, BindWebhooks, CorsairEndpoint, CorsairErrorHandler, CorsairPlugin, CorsairPluginContext, CorsairWebhook, KeyBuilderContext, PickAuth, PluginPermissionsConfig } from 'corsair/core';
3
2
  import type { LinearEndpointInputs, LinearEndpointOutputs } from './endpoints';
4
3
  import { LinearSchema } from './schema';
5
4
  import type { CommentCreatedEvent, CommentDeletedEvent, CommentUpdatedEvent, IssueCreatedEvent, IssueDeletedEvent, IssueUpdatedEvent, LinearWebhookOutputs, LinearWebhookPayload, ProjectCreatedEvent, ProjectDeletedEvent, ProjectUpdatedEvent } from './webhooks';
@@ -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,uBAAuB,EAIvB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,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;AAcpB,MAAM,MAAM,mBAAmB,GAAG;IACjC,QAAQ,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC/B,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;;;;OAIG;IACH,WAAW,CAAC,EAAE,uBAAuB,CAAC,OAAO,qBAAqB,CAAC,CAAC;CACpE,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,oBAAo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AoB,GAAG,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;AAEzE,MAAM,MAAM,oBAAoB,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,CAyDzB;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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX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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"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{logEventFromContext as U}from"corsair/core";import{ApiError as Ze}from"corsair/http";import{request as Xe}from"corsair/http";import{BaseWebhookHandler as ro}from"corsair/http";import{verifyHmacSignature as io}from"corsair/http";var I=class extends Error{constructor(i,r){super(i);this.code=r;this.name="LinearAPIError"}},et="https://api.linear.app/graphql";async function p(t,a,i){let r={BASE:et,VERSION:"1.0.0",WITH_CREDENTIALS:!1,CREDENTIALS:"omit",HEADERS:{"Content-Type":"application/json",Authorization:a}},o={method:"POST",url:"",body:{query:t,variables:i||{}},mediaType:"application/json"};try{let c=await Xe(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 Ze){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 tt=`
1
+ import{logEventFromContext as U}from"corsair/core";import{ApiError as Ze,BaseWebhookHandler as no,request as Xe,verifyHmacSignature as ao}from"corsair/http";var I=class extends Error{constructor(i,r){super(i);this.code=r;this.name="LinearAPIError"}},et="https://api.linear.app/graphql";async function p(t,a,i){let r={BASE:et,VERSION:"1.0.0",WITH_CREDENTIALS:!1,CREDENTIALS:"omit",HEADERS:{"Content-Type":"application/json",Authorization:a}},o={method:"POST",url:"",body:{query:t,variables:i||{}},mediaType:"application/json"};try{let c=await Xe(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 Ze){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 tt=`
2
2
  query Comments($issueId: String!, $first: Int!, $after: String) {
3
3
  issue(id: $issueId) {
4
4
  comments(first: $first, after: $after) {
@@ -449,7 +449,7 @@ import{logEventFromContext as U}from"corsair/core";import{ApiError as Ze}from"co
449
449
  }
450
450
  }
451
451
  }
452
- `,bt=`
452
+ `,yt=`
453
453
  mutation UpdateProject($id: String!, $input: ProjectUpdateInput!) {
454
454
  projectUpdate(id: $id, input: $input) {
455
455
  success
@@ -467,13 +467,13 @@ import{logEventFromContext as U}from"corsair/core";import{ApiError as Ze}from"co
467
467
  }
468
468
  }
469
469
  }
470
- `,yt=`
470
+ `,bt=`
471
471
  mutation DeleteProject($id: String!) {
472
472
  projectDelete(id: $id) {
473
473
  success
474
474
  }
475
475
  }
476
- `,le=async(t,a)=>{let r=(await p(lt,t.key,{first:a.first||50,after:a.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",{...a},"completed"),r},ue=async(t,a)=>{let r=(await p(ut,t.key,{id:a.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",{...a},"completed"),r},me=async(t,a)=>{let r=(await p(mt,t.key,{input:a})).projectCreate.project;return r&&await t.endpoints.projects.get({id:r.id}),await w(t,"linear.projects.create",{...a},"completed"),r},be=async(t,a)=>{let r=(await p(bt,t.key,{id:a.id,input:a.input})).projectUpdate.project;return r&&await t.endpoints.projects.get({id:r.id}),await w(t,"linear.projects.update",{...a},"completed"),r},ye=async(t,a)=>{let r=(await p(yt,t.key,{id:a.id})).projectDelete.success;if(r&&t.db.projects)try{await t.db.projects.deleteByEntityId(a.id)}catch(o){console.warn("Failed to delete project from database:",o)}return await w(t,"linear.projects.delete",{...a},"completed"),r};import{logEventFromContext as ge}from"corsair/core";var gt=`
476
+ `,le=async(t,a)=>{let r=(await p(lt,t.key,{first:a.first||50,after:a.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",{...a},"completed"),r},ue=async(t,a)=>{let r=(await p(ut,t.key,{id:a.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",{...a},"completed"),r},me=async(t,a)=>{let r=(await p(mt,t.key,{input:a})).projectCreate.project;return r&&await t.endpoints.projects.get({id:r.id}),await w(t,"linear.projects.create",{...a},"completed"),r},ye=async(t,a)=>{let r=(await p(yt,t.key,{id:a.id,input:a.input})).projectUpdate.project;return r&&await t.endpoints.projects.get({id:r.id}),await w(t,"linear.projects.update",{...a},"completed"),r},be=async(t,a)=>{let r=(await p(bt,t.key,{id:a.id})).projectDelete.success;if(r&&t.db.projects)try{await t.db.projects.deleteByEntityId(a.id)}catch(o){console.warn("Failed to delete project from database:",o)}return await w(t,"linear.projects.delete",{...a},"completed"),r};import{logEventFromContext as ge}from"corsair/core";var gt=`
477
477
  query Teams($first: Int!, $after: String) {
478
478
  teams(first: $first, after: $after) {
479
479
  nodes {
@@ -545,4 +545,4 @@ import{logEventFromContext as U}from"corsair/core";import{ApiError as Ze}from"co
545
545
  updatedAt
546
546
  }
547
547
  }
548
- `,je=async(t,a)=>{let r=(await p(ht,t.key,{first:a.first||50,after:a.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",{...a},"completed"),r},Ce=async(t,a)=>{let r=(await p(It,t.key,{id:a.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",{...a},"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)]),jt=e.object({teamId:e.string().optional(),first:e.number().optional(),after:e.string().optional()}),Ct=e.object({id:e.string()}),Et=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()}),Lt=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()})}),vt=e.object({id:e.string()}),At=e.object({first:e.number().optional(),after:e.string().optional()}),St=e.object({id:e.string()}),wt=e.object({first:e.number().optional(),after:e.string().optional()}),kt=e.object({id:e.string()}),Rt=e.object({first:e.number().optional(),after:e.string().optional()}),Ut=e.object({id:e.string()}),Dt=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()}),Pt=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()})}),xt=e.object({id:e.string()}),Tt=e.object({issueId:e.string(),first:e.number().optional(),after:e.string().optional()}),zt=e.object({issueId:e.string(),body:e.string(),parentId:e.string().optional()}),Wt=e.object({id:e.string(),input:e.object({body:e.string().optional()})}),Ot=e.object({id:e.string()}),l={issuesList:jt,issuesGet:Ct,issuesCreate:Et,issuesUpdate:Lt,issuesDelete:vt,teamsList:At,teamsGet:St,usersList:wt,usersGet:kt,projectsList:Rt,projectsGet:Ut,projectsCreate:Dt,projectsUpdate:Pt,projectsDelete:xt,commentsList:Tt,commentsCreate:zt,commentsUpdate:Wt,commentsDelete:Ot},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"]),Nt=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()}),$t=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=$t.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()}),Gt=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()}),Bt=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:Nt,team:f,assignee:g.optional().nullable(),creator:g,project:Se.optional().nullable(),cycle:Gt.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=Bt.extend({parent:e.lazy(()=>k.optional().nullable())}),_t=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()}),D=_t.extend({parent:e.lazy(()=>D.optional().nullable())}),E=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()}),Mt=e.object({id:e.string(),name:e.string(),color:e.string()}),Ft=e.object({nodes:e.array(Mt)}),Ht=e.object({nodes:e.array(y)}),qt=e.object({id:e.string()}),Q=e.object({nodes:e.array(V)}),Kt=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:Ft.optional().nullable(),subscribers:Ht.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()}),P=Kt.extend({parent:e.lazy(()=>P.optional().nullable())}),ke=e.object({nodes:e.array(P),pageInfo:E}),So=e.object({nodes:e.array(k),pageInfo:E}),Re=e.object({nodes:e.array(f),pageInfo:E}),Ue=e.object({nodes:e.array(g),pageInfo:E}),wo=e.object({nodes:e.array(Se),pageInfo:E}),De=e.object({nodes:e.array(D),pageInfo:E}),ko=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()}),Ro=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()}),Uo=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()}),Do=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()}),Po=e.object({issueId:e.string(),body:e.string(),parentId:e.string().optional()}),xo=e.object({body:e.string().optional()}),Pe=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:Q,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:Q.optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),Y=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:Q,createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional()}),Te=e.object({nodes:e.array(Y),pageInfo:E}),To=e.object({issues:ke}),zo=e.object({issue:P}),Wo=e.object({issueCreate:e.object({success:e.boolean(),issue:k})}),Oo=e.object({issueUpdate:e.object({success:e.boolean(),issue:k})}),No=e.object({issueDelete:e.object({success:e.boolean()})}),$o=e.object({teams:Re}),Go=e.object({team:f}),Bo=e.object({users:Ue}),_o=e.object({user:g}),Mo=e.object({projects:Te}),Fo=e.object({project:Y}),Ho=e.object({projectCreate:e.object({success:e.boolean(),project:Pe})}),qo=e.object({projectUpdate:e.object({success:e.boolean(),project:xe})}),Ko=e.object({projectDelete:e.object({success:e.boolean()})}),Vo=e.object({issue:e.object({comments:De})}),Qo=e.object({commentCreate:e.object({success:e.boolean(),comment:D})}),Yo=e.object({commentUpdate:e.object({success:e.boolean(),comment:D})}),Jo=e.object({commentDelete:e.object({success:e.boolean()})}),Ee=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()}),Le=e.object({id:e.string(),body:e.string(),issue:qt,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:P,issuesCreate:Ee,issuesUpdate:Ee,issuesDelete:e.boolean(),teamsList:Re,teamsGet:f,usersList:Ue,usersGet:g,projectsList:Te,projectsGet:Y,projectsCreate:Pe,projectsUpdate:xe,projectsDelete:e.boolean(),commentsList:De,commentsCreate:Le,commentsUpdate:Le,commentsDelete:e.boolean()};var R={list:oe,create:ne,update:ae,delete:re},L={list:se,get:ie,create:de,update:ce,delete:pe},v={list:le,get:ue,create:me,update:be,delete:ye},J={list:fe,get:he},Z={list:je,get:Ce};import{ApiError as A}from"corsair/http";var ze={RATE_LIMIT_ERROR:{match:(t,a)=>{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,a)=>{console.log(`[LINEAR:${a.operation}] Rate limit exceeded`);let i;return t instanceof A&&t.retryAfter&&(i=t.retryAfter),{maxRetries:5,headersRetryAfterMs:i}}},AUTH_ERROR:{match:(t,a)=>{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,a)=>(console.log(`[LINEAR:${a.operation}] Authentication failed - check your API key`),{maxRetries:0})},NOT_FOUND_ERROR:{match:(t,a)=>{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,a)=>(console.warn(`[LINEAR:${a.operation}] Resource not found: ${t.message}`),{maxRetries:0})},PERMISSION_ERROR:{match:(t,a)=>{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,a)=>(console.warn(`[LINEAR:${a.operation}] Permission denied: ${t.message}`),{maxRetries:0})},NETWORK_ERROR:{match:(t,a)=>{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,a)=>(console.warn(`[LINEAR:${a.operation}] Network error: ${t.message}`),{maxRetries:3})},VALIDATION_ERROR:{match:(t,a)=>{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,a)=>(console.warn(`[LINEAR:${a.operation}] Validation error: ${t.message}`),{maxRetries:0})},DEFAULT:{match:(t,a)=>!0,handler:async(t,a)=>(console.error(`[LINEAR:${a.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 Be={version:"1.0.0",entities:{issues:We,teams:Oe,projects:Ne,comments:$e,users:Ge}};import{logEventFromContext as X}from"corsair/core";import{z as n}from"zod";import{verifyHmacSignature as Vt}from"corsair/http";var yn=n.object({id:n.string(),createdAt:n.string(),updatedAt:n.string(),archivedAt:n.string().optional()}).catchall(n.any()),x=n.object({id:n.string(),identifier:n.string(),title:n.string(),description:n.string().optional(),priority:n.union([n.literal(0),n.literal(1),n.literal(2),n.literal(3),n.literal(4)]),estimate:n.number().optional(),sortOrder:n.number(),startedAt:n.string().optional(),completedAt:n.string().optional(),canceledAt:n.string().optional(),autoArchivedAt:n.string().optional(),autoClosedAt:n.string().optional(),dueDate:n.string().optional(),trashed:n.boolean().optional(),snoozedUntilAt:n.string().optional(),previousIdentifiers:n.array(n.string()),createdAt:n.string(),updatedAt:n.string(),branchName:n.string(),customerTicketCount:n.number(),stateId:n.string(),teamId:n.string(),creatorId:n.string()}).catchall(n.any()),T=n.object({id:n.string(),body:n.string(),editedAt:n.string().optional(),createdAt:n.string(),updatedAt:n.string(),issueId:n.string(),userId:n.string()}).catchall(n.any()),z=n.object({id:n.string(),name:n.string(),description:n.string().optional(),icon:n.string().optional(),color:n.string().optional(),priority:n.union([n.literal(0),n.literal(1),n.literal(2),n.literal(3),n.literal(4)]),sortOrder:n.number(),state:n.enum(["planned","started","paused","completed","canceled"]),progress:n.number(),url:n.string(),startDate:n.string().optional(),targetDate:n.string().optional(),completedAt:n.string().optional(),canceledAt:n.string().optional(),startedAt:n.string().optional(),completedScopeHistory:n.array(n.number()),inProgressScopeHistory:n.array(n.number()),scope:n.number(),createdAt:n.string(),updatedAt:n.string()}).catchall(n.any()),W=n.object({action:n.literal("create"),type:n.literal("Issue"),data:x,url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),O=n.object({action:n.literal("update"),type:n.literal("Issue"),data:x,updatedFrom:x.partial().optional(),url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),N=n.object({action:n.literal("remove"),type:n.literal("Issue"),data:x,url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),$=n.object({action:n.literal("create"),type:n.literal("Comment"),data:T,url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),G=n.object({action:n.literal("update"),type:n.literal("Comment"),data:T,updatedFrom:T.partial().optional(),url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),B=n.object({action:n.literal("remove"),type:n.literal("Comment"),data:T,url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),_=n.object({action:n.literal("create"),type:n.literal("Project"),data:z,url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),M=n.object({action:n.literal("update"),type:n.literal("Project"),data:z,updatedFrom:z.partial().optional(),url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),F=n.object({action:n.literal("remove"),type:n.literal("Project"),data:z,url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),gn=n.union([W,O,N,$,G,B,_,M,F]);function Qt(t){return typeof t=="string"?JSON.parse(t):t}function m(t,a){if(!a)return{valid:!1};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?Vt(i,a,o)?{valid:!0}:{valid:!1,error:"Invalid signature"}:{valid:!1,error:"Missing linear-signature header"}}function _e(t,a){return i=>{let r=Qt(i.body);return typeof r.type=="string"&&r.type===t&&typeof r.action=="string"&&r.action===a}}var b=_e;var Me={match:b("Comment","create"),handler:async(t,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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 Qe={match:b("Project","create"),handler:async(t,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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}}},Ye={match:b("Project","update"),handler:async(t,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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}}},Je={match:b("Project","remove"),handler:async(t,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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:Me,update:Fe,remove:He},q={create:qe,update:Ke,remove:Ve},K={create:Qe,update:Ye,remove:Je};var Yt={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}},Jt={issues:{list:L.list,get:L.get,create:L.create,update:L.update,delete:L.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:J.list,get:J.get},users:{list:Z.list,get:Z.get}},Zt={"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}},Xt={"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:B,response:B},"projects.create":{description:"A new project was created",payload:_,response:_},"projects.update":{description:"A project was updated",payload:M,response:M},"projects.remove":{description:"A project was deleted",payload:F,response:F}},eo="api_key",to={"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 [DESTRUCTIVE]"},"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 Nn(t={}){let a={...t,authType:t.authType??eo};return{id:"linear",schema:Be,options:a,hooks:a.hooks,webhookHooks:a.webhookHooks,endpoints:Jt,webhooks:Yt,endpointMeta:to,endpointSchemas:Zt,webhookSchemas:Xt,pluginWebhookMatcher:i=>"linear-signature"in i.headers,errorHandlers:{...ze,...a.errorHandlers},keyBuilder:async(i,r)=>{if(r==="webhook"&&a.webhookSecret)return a.webhookSecret;if(r==="webhook"){let o=await i.keys.get_webhook_signature();return o||""}if(r==="endpoint"&&a.key)return a.key;if(r==="endpoint"&&i.authType==="api_key"){let o=await i.keys.get_api_key();return o||""}return""}}}export{_e as createLinearEventMatch,Nn as linear,Zt as linearEndpointSchemas,m as verifyLinearWebhookSignature};
548
+ `,je=async(t,a)=>{let r=(await p(ht,t.key,{first:a.first||50,after:a.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",{...a},"completed"),r},Ce=async(t,a)=>{let r=(await p(It,t.key,{id:a.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",{...a},"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)]),jt=e.object({teamId:e.string().optional(),first:e.number().optional(),after:e.string().optional()}),Ct=e.object({id:e.string()}),Et=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()}),Lt=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()})}),vt=e.object({id:e.string()}),At=e.object({first:e.number().optional(),after:e.string().optional()}),St=e.object({id:e.string()}),wt=e.object({first:e.number().optional(),after:e.string().optional()}),kt=e.object({id:e.string()}),Rt=e.object({first:e.number().optional(),after:e.string().optional()}),Ut=e.object({id:e.string()}),Dt=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()}),Pt=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()})}),xt=e.object({id:e.string()}),Tt=e.object({issueId:e.string(),first:e.number().optional(),after:e.string().optional()}),zt=e.object({issueId:e.string(),body:e.string(),parentId:e.string().optional()}),Wt=e.object({id:e.string(),input:e.object({body:e.string().optional()})}),Ot=e.object({id:e.string()}),l={issuesList:jt,issuesGet:Ct,issuesCreate:Et,issuesUpdate:Lt,issuesDelete:vt,teamsList:At,teamsGet:St,usersList:wt,usersGet:kt,projectsList:Rt,projectsGet:Ut,projectsCreate:Dt,projectsUpdate:Pt,projectsDelete:xt,commentsList:Tt,commentsCreate:zt,commentsUpdate:Wt,commentsDelete:Ot},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"]),Nt=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()}),$t=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=$t.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()}),Gt=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()}),Bt=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:Nt,team:f,assignee:g.optional().nullable(),creator:g,project:Se.optional().nullable(),cycle:Gt.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=Bt.extend({parent:e.lazy(()=>k.optional().nullable())}),_t=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()}),D=_t.extend({parent:e.lazy(()=>D.optional().nullable())}),E=e.object({hasNextPage:e.boolean(),hasPreviousPage:e.boolean(),startCursor:e.string().optional().nullable(),endCursor:e.string().optional().nullable()}),b=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()}),Mt=e.object({id:e.string(),name:e.string(),color:e.string()}),Ft=e.object({nodes:e.array(Mt)}),Ht=e.object({nodes:e.array(b)}),qt=e.object({id:e.string()}),Q=e.object({nodes:e.array(V)}),Kt=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:b.optional().nullable(),creator:b,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:Ft.optional().nullable(),subscribers:Ht.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()}),P=Kt.extend({parent:e.lazy(()=>P.optional().nullable())}),ke=e.object({nodes:e.array(P),pageInfo:E}),Lo=e.object({nodes:e.array(k),pageInfo:E}),Re=e.object({nodes:e.array(f),pageInfo:E}),Ue=e.object({nodes:e.array(g),pageInfo:E}),vo=e.object({nodes:e.array(Se),pageInfo:E}),De=e.object({nodes:e.array(D),pageInfo:E}),Ao=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()}),So=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()}),wo=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()}),ko=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()}),Ro=e.object({issueId:e.string(),body:e.string(),parentId:e.string().optional()}),Uo=e.object({body:e.string().optional()}),Pe=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:b.optional().nullable(),teams:Q,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:b.optional().nullable(),teams:Q.optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional(),archivedAt:e.coerce.date().nullable().optional()}),Y=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:b.optional().nullable(),teams:Q,createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional()}),Te=e.object({nodes:e.array(Y),pageInfo:E}),Do=e.object({issues:ke}),Po=e.object({issue:P}),xo=e.object({issueCreate:e.object({success:e.boolean(),issue:k})}),To=e.object({issueUpdate:e.object({success:e.boolean(),issue:k})}),zo=e.object({issueDelete:e.object({success:e.boolean()})}),Wo=e.object({teams:Re}),Oo=e.object({team:f}),No=e.object({users:Ue}),$o=e.object({user:g}),Go=e.object({projects:Te}),Bo=e.object({project:Y}),_o=e.object({projectCreate:e.object({success:e.boolean(),project:Pe})}),Mo=e.object({projectUpdate:e.object({success:e.boolean(),project:xe})}),Fo=e.object({projectDelete:e.object({success:e.boolean()})}),Ho=e.object({issue:e.object({comments:De})}),qo=e.object({commentCreate:e.object({success:e.boolean(),comment:D})}),Ko=e.object({commentUpdate:e.object({success:e.boolean(),comment:D})}),Vo=e.object({commentDelete:e.object({success:e.boolean()})}),Ee=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:b.optional().nullable(),creator:b.optional(),createdAt:e.coerce.date().nullable().optional(),updatedAt:e.coerce.date().nullable().optional()}),Le=e.object({id:e.string(),body:e.string(),issue:qt,user:b,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:P,issuesCreate:Ee,issuesUpdate:Ee,issuesDelete:e.boolean(),teamsList:Re,teamsGet:f,usersList:Ue,usersGet:g,projectsList:Te,projectsGet:Y,projectsCreate:Pe,projectsUpdate:xe,projectsDelete:e.boolean(),commentsList:De,commentsCreate:Le,commentsUpdate:Le,commentsDelete:e.boolean()};var R={list:oe,create:ne,update:ae,delete:re},L={list:se,get:ie,create:de,update:ce,delete:pe},v={list:le,get:ue,create:me,update:ye,delete:be},J={list:fe,get:he},Z={list:je,get:Ce};import{ApiError as A}from"corsair/http";var ze={RATE_LIMIT_ERROR:{match:(t,a)=>{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,a)=>{console.log(`[LINEAR:${a.operation}] Rate limit exceeded`);let i;return t instanceof A&&t.retryAfter&&(i=t.retryAfter),{maxRetries:5,headersRetryAfterMs:i}}},AUTH_ERROR:{match:(t,a)=>{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,a)=>(console.log(`[LINEAR:${a.operation}] Authentication failed - check your API key`),{maxRetries:0})},NOT_FOUND_ERROR:{match:(t,a)=>{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,a)=>(console.warn(`[LINEAR:${a.operation}] Resource not found: ${t.message}`),{maxRetries:0})},PERMISSION_ERROR:{match:(t,a)=>{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,a)=>(console.warn(`[LINEAR:${a.operation}] Permission denied: ${t.message}`),{maxRetries:0})},NETWORK_ERROR:{match:(t,a)=>{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,a)=>(console.warn(`[LINEAR:${a.operation}] Network error: ${t.message}`),{maxRetries:3})},VALIDATION_ERROR:{match:(t,a)=>{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,a)=>(console.warn(`[LINEAR:${a.operation}] Validation error: ${t.message}`),{maxRetries:0})},DEFAULT:{match:(t,a)=>!0,handler:async(t,a)=>(console.error(`[LINEAR:${a.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 Be={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 Vt}from"corsair/http";import{z as n}from"zod";var un=n.object({id:n.string(),createdAt:n.string(),updatedAt:n.string(),archivedAt:n.string().optional()}).catchall(n.any()),x=n.object({id:n.string(),identifier:n.string(),title:n.string(),description:n.string().optional(),priority:n.union([n.literal(0),n.literal(1),n.literal(2),n.literal(3),n.literal(4)]),estimate:n.number().optional(),sortOrder:n.number(),startedAt:n.string().optional(),completedAt:n.string().optional(),canceledAt:n.string().optional(),autoArchivedAt:n.string().optional(),autoClosedAt:n.string().optional(),dueDate:n.string().optional(),trashed:n.boolean().optional(),snoozedUntilAt:n.string().optional(),previousIdentifiers:n.array(n.string()),createdAt:n.string(),updatedAt:n.string(),branchName:n.string(),customerTicketCount:n.number(),stateId:n.string(),teamId:n.string(),creatorId:n.string()}).catchall(n.any()),T=n.object({id:n.string(),body:n.string(),editedAt:n.string().optional(),createdAt:n.string(),updatedAt:n.string(),issueId:n.string(),userId:n.string()}).catchall(n.any()),z=n.object({id:n.string(),name:n.string(),description:n.string().optional(),icon:n.string().optional(),color:n.string().optional(),priority:n.union([n.literal(0),n.literal(1),n.literal(2),n.literal(3),n.literal(4)]),sortOrder:n.number(),state:n.enum(["planned","started","paused","completed","canceled"]),progress:n.number(),url:n.string(),startDate:n.string().optional(),targetDate:n.string().optional(),completedAt:n.string().optional(),canceledAt:n.string().optional(),startedAt:n.string().optional(),completedScopeHistory:n.array(n.number()),inProgressScopeHistory:n.array(n.number()),scope:n.number(),createdAt:n.string(),updatedAt:n.string()}).catchall(n.any()),W=n.object({action:n.literal("create"),type:n.literal("Issue"),data:x,url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),O=n.object({action:n.literal("update"),type:n.literal("Issue"),data:x,updatedFrom:x.partial().optional(),url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),N=n.object({action:n.literal("remove"),type:n.literal("Issue"),data:x,url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),$=n.object({action:n.literal("create"),type:n.literal("Comment"),data:T,url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),G=n.object({action:n.literal("update"),type:n.literal("Comment"),data:T,updatedFrom:T.partial().optional(),url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),B=n.object({action:n.literal("remove"),type:n.literal("Comment"),data:T,url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),_=n.object({action:n.literal("create"),type:n.literal("Project"),data:z,url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),M=n.object({action:n.literal("update"),type:n.literal("Project"),data:z,updatedFrom:z.partial().optional(),url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),F=n.object({action:n.literal("remove"),type:n.literal("Project"),data:z,url:n.string(),createdAt:n.string(),organizationId:n.string(),webhookId:n.string()}),mn=n.union([W,O,N,$,G,B,_,M,F]);function Qt(t){return typeof t=="string"?JSON.parse(t):t}function m(t,a){if(!a)return{valid:!1};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?Vt(i,a,o)?{valid:!0}:{valid:!1,error:"Invalid signature"}:{valid:!1,error:"Missing linear-signature header"}}function _e(t,a){return i=>{let r=Qt(i.body);return typeof r.type=="string"&&r.type===t&&typeof r.action=="string"&&r.action===a}}var y=_e;var Me={match:y("Comment","create"),handler:async(t,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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:y("Comment","update"),handler:async(t,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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:y("Comment","remove"),handler:async(t,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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:y("Issue","create"),handler:async(t,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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:y("Issue","update"),handler:async(t,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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:y("Issue","remove"),handler:async(t,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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 Qe={match:y("Project","create"),handler:async(t,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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}}},Ye={match:y("Project","update"),handler:async(t,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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}}},Je={match:y("Project","remove"),handler:async(t,a)=>{let i=t.key,r=m(a,i);if(!r.valid)return{success:!1,statusCode:401,error:r.error||"Signature verification failed"};let o=a.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:Me,update:Fe,remove:He},q={create:qe,update:Ke,remove:Ve},K={create:Qe,update:Ye,remove:Je};var Yt={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}},Jt={issues:{list:L.list,get:L.get,create:L.create,update:L.update,delete:L.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:J.list,get:J.get},users:{list:Z.list,get:Z.get}},Zt={"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}},Xt={"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:B,response:B},"projects.create":{description:"A new project was created",payload:_,response:_},"projects.update":{description:"A project was updated",payload:M,response:M},"projects.remove":{description:"A project was deleted",payload:F,response:F}},eo="api_key",to={"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 [DESTRUCTIVE]"},"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 zn(t={}){let a={...t,authType:t.authType??eo};return{id:"linear",schema:Be,options:a,hooks:a.hooks,webhookHooks:a.webhookHooks,endpoints:Jt,webhooks:Yt,endpointMeta:to,endpointSchemas:Zt,webhookSchemas:Xt,pluginWebhookMatcher:i=>"linear-signature"in i.headers,errorHandlers:{...ze,...a.errorHandlers},keyBuilder:async(i,r)=>{let o=i.authType;if(r==="webhook"&&a.webhookSecret)return a.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"&&a.key)return a.key;if(r==="endpoint"&&i.authType==="api_key"){let c=await i.keys.get_api_key();if(!c)throw new Error("[auth-missing:linear:api_key]: Linear API Key is missing");return c}throw new Error(`[auth-missing:linear:${o}]: Linear key is missing`)}}}export{_e as createLinearEventMatch,zn as linear,Zt as linearEndpointSchemas,m as verifyLinearWebhookSignature};
@@ -0,0 +1,2 @@
1
+ import 'dotenv/config';
2
+ //# sourceMappingURL=integration.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.test.d.ts","sourceRoot":"","sources":["../integration.test.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { LinearWebhooks } from '..';
1
+ import type { LinearWebhooks } from '../index';
2
2
  export declare const commentCreate: LinearWebhooks['commentCreate'];
3
3
  export declare const commentUpdate: LinearWebhooks['commentUpdate'];
4
4
  export declare const commentRemove: LinearWebhooks['commentRemove'];
@@ -1 +1 @@
1
- {"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../webhooks/comments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAGzC,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,eAAe,CA2DzD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,eAAe,CA2DzD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,eAAe,CAsDzD,CAAC"}
1
+ {"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../webhooks/comments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,eAAe,CA2DzD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,eAAe,CA2DzD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,eAAe,CAsDzD,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { LinearWebhooks } from '..';
1
+ import type { LinearWebhooks } from '../index';
2
2
  export declare const issueCreate: LinearWebhooks['issueCreate'];
3
3
  export declare const issueUpdate: LinearWebhooks['issueUpdate'];
4
4
  export declare const issueRemove: LinearWebhooks['issueRemove'];
@@ -1 +1 @@
1
- {"version":3,"file":"issues.d.ts","sourceRoot":"","sources":["../../webhooks/issues.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAGzC,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;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,4 +1,4 @@
1
- import type { LinearWebhooks } from '..';
1
+ import type { LinearWebhooks } from '../index';
2
2
  export declare const projectCreate: LinearWebhooks['projectCreate'];
3
3
  export declare const projectUpdate: LinearWebhooks['projectUpdate'];
4
4
  export declare const projectRemove: LinearWebhooks['projectRemove'];
@@ -1 +1 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../webhooks/projects.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAGzC,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,eAAe,CA+DzD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,eAAe,CA+DzD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,eAAe,CAuDzD,CAAC"}
1
+ {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../webhooks/projects.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,eAAe,CA+DzD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,eAAe,CA+DzD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,eAAe,CAuDzD,CAAC"}
@@ -1,5 +1,5 @@
1
- import { z } from 'zod';
2
1
  import type { CorsairWebhookMatcher, WebhookRequest } from 'corsair/core';
2
+ import { z } from 'zod';
3
3
  export declare const WebhookDataSchema: z.ZodObject<{
4
4
  id: z.ZodString;
5
5
  createdAt: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../webhooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EACX,qBAAqB,EAErB,cAAc,EACd,MAAM,cAAc,CAAC;AAMtB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;sBAOX,CAAC;AACpB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAgCL,CAAC;AACpB,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;sB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BAAmB,CAAC;IACnC,aAAa,EAAE,mBAAmB,CAAC;IACnC,aAAa,EAAE,mBAAmB,CAAC;CACnC,CAAC;AAUF,wBAAgB,4BAA4B,CAC3C,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,EAChC,aAAa,CAAC,EAAE,MAAM,GACpB;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CA+BpC;AAED,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GACZ,qBAAqB,CAUvB;AAED,eAAO,MAAM,iBAAiB,+BAAyB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corsair-dev/linear",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Linear plugin for Corsair",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -18,10 +18,12 @@
18
18
  "zod": "^3.0.0"
19
19
  },
20
20
  "devDependencies": {
21
+ "@types/jest": "^29.5.14",
22
+ "ts-jest": "^29.4.9",
21
23
  "tsup": "^8.0.1",
22
24
  "typescript": "^5.9.3",
23
25
  "zod": "^3.25.76",
24
- "corsair": "0.1.48"
26
+ "corsair": "0.1.67"
25
27
  },
26
28
  "keywords": [
27
29
  "corsair",
@@ -33,8 +35,12 @@
33
35
  "files": [
34
36
  "dist"
35
37
  ],
38
+ "dependencies": {
39
+ "jest": "^29.7.0"
40
+ },
36
41
  "scripts": {
37
42
  "build": "rm -rf dist && tsc --build --force && tsup",
38
- "typecheck": "tsc --noEmit"
43
+ "typecheck": "tsc --noEmit",
44
+ "test": "jest"
39
45
  }
40
46
  }