@trigger.dev/linear 2.2.10 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -14768,44 +14768,7 @@ declare const events_onReactionCreated: typeof onReactionCreated;
14768
14768
  declare const events_onReactionRemoved: typeof onReactionRemoved;
14769
14769
  declare const events_onReactionUpdated: typeof onReactionUpdated;
14770
14770
  declare namespace events {
14771
- export {
14772
- events_onAttachment as onAttachment,
14773
- events_onAttachmentCreated as onAttachmentCreated,
14774
- events_onAttachmentRemoved as onAttachmentRemoved,
14775
- events_onAttachmentUpdated as onAttachmentUpdated,
14776
- events_onComment as onComment,
14777
- events_onCommentCreated as onCommentCreated,
14778
- events_onCommentRemoved as onCommentRemoved,
14779
- events_onCommentUpdated as onCommentUpdated,
14780
- events_onCycle as onCycle,
14781
- events_onCycleCreated as onCycleCreated,
14782
- events_onCycleRemoved as onCycleRemoved,
14783
- events_onCycleUpdated as onCycleUpdated,
14784
- events_onIssue as onIssue,
14785
- events_onIssueCreated as onIssueCreated,
14786
- events_onIssueLabel as onIssueLabel,
14787
- events_onIssueLabelCreated as onIssueLabelCreated,
14788
- events_onIssueLabelRemoved as onIssueLabelRemoved,
14789
- events_onIssueLabelUpdated as onIssueLabelUpdated,
14790
- events_onIssueRemoved as onIssueRemoved,
14791
- events_onIssueSLA as onIssueSLA,
14792
- events_onIssueSLABreached as onIssueSLABreached,
14793
- events_onIssueSLAHighRisk as onIssueSLAHighRisk,
14794
- events_onIssueSLASet as onIssueSLASet,
14795
- events_onIssueUpdated as onIssueUpdated,
14796
- events_onProject as onProject,
14797
- events_onProjectCreated as onProjectCreated,
14798
- events_onProjectRemoved as onProjectRemoved,
14799
- events_onProjectUpdate as onProjectUpdate,
14800
- events_onProjectUpdateCreated as onProjectUpdateCreated,
14801
- events_onProjectUpdateRemoved as onProjectUpdateRemoved,
14802
- events_onProjectUpdateUpdated as onProjectUpdateUpdated,
14803
- events_onProjectUpdated as onProjectUpdated,
14804
- events_onReaction as onReaction,
14805
- events_onReactionCreated as onReactionCreated,
14806
- events_onReactionRemoved as onReactionRemoved,
14807
- events_onReactionUpdated as onReactionUpdated,
14808
- };
14771
+ export { events_onAttachment as onAttachment, events_onAttachmentCreated as onAttachmentCreated, events_onAttachmentRemoved as onAttachmentRemoved, events_onAttachmentUpdated as onAttachmentUpdated, events_onComment as onComment, events_onCommentCreated as onCommentCreated, events_onCommentRemoved as onCommentRemoved, events_onCommentUpdated as onCommentUpdated, events_onCycle as onCycle, events_onCycleCreated as onCycleCreated, events_onCycleRemoved as onCycleRemoved, events_onCycleUpdated as onCycleUpdated, events_onIssue as onIssue, events_onIssueCreated as onIssueCreated, events_onIssueLabel as onIssueLabel, events_onIssueLabelCreated as onIssueLabelCreated, events_onIssueLabelRemoved as onIssueLabelRemoved, events_onIssueLabelUpdated as onIssueLabelUpdated, events_onIssueRemoved as onIssueRemoved, events_onIssueSLA as onIssueSLA, events_onIssueSLABreached as onIssueSLABreached, events_onIssueSLAHighRisk as onIssueSLAHighRisk, events_onIssueSLASet as onIssueSLASet, events_onIssueUpdated as onIssueUpdated, events_onProject as onProject, events_onProjectCreated as onProjectCreated, events_onProjectRemoved as onProjectRemoved, events_onProjectUpdate as onProjectUpdate, events_onProjectUpdateCreated as onProjectUpdateCreated, events_onProjectUpdateRemoved as onProjectUpdateRemoved, events_onProjectUpdateUpdated as onProjectUpdateUpdated, events_onProjectUpdated as onProjectUpdated, events_onReaction as onReaction, events_onReactionCreated as onReactionCreated, events_onReactionRemoved as onReactionRemoved, events_onReactionUpdated as onReactionUpdated };
14809
14772
  }
14810
14773
 
14811
14774
  type QueryVariables = {
@@ -20034,7 +19997,7 @@ declare class Linear implements TriggerIntegration {
20034
19997
  }>, _trigger_dev_sdk.ExternalSource<Linear, TriggerParams, "HTTP", {}>>;
20035
19998
  webhook: (key: IntegrationTaskKey, params: {
20036
19999
  id: string;
20037
- }) => LinearReturnType<_linear_sdk.Webhook, unknown>;
20000
+ }) => LinearReturnType<_linear_sdk.Webhook>;
20038
20001
  webhooks: (key: IntegrationTaskKey, params?: LinearDocument.Exact<{
20039
20002
  after?: LinearDocument.Maybe<string> | undefined;
20040
20003
  before?: LinearDocument.Maybe<string> | undefined;
@@ -20042,23 +20005,23 @@ declare class Linear implements TriggerIntegration {
20042
20005
  includeArchived?: LinearDocument.Maybe<boolean> | undefined;
20043
20006
  last?: LinearDocument.Maybe<number> | undefined;
20044
20007
  orderBy?: LinearDocument.Maybe<LinearDocument.PaginationOrderBy> | undefined;
20045
- }> | undefined) => LinearReturnType<_linear_sdk.Webhook[], unknown>;
20008
+ }> | undefined) => LinearReturnType<_linear_sdk.Webhook[]>;
20046
20009
  createWebhook: (key: IntegrationTaskKey, params: LinearDocument.WebhookCreateInput) => LinearReturnType<Omit<_linear_sdk.WebhookPayload, "webhook"> & {
20047
20010
  webhook: _linear_sdk.Webhook | undefined;
20048
- }, unknown>;
20011
+ }>;
20049
20012
  deleteWebhook: (key: IntegrationTaskKey, params: {
20050
20013
  id: string;
20051
- }) => LinearReturnType<DeletePayload, unknown>;
20014
+ }) => LinearReturnType<DeletePayload>;
20052
20015
  updateWebhook: (key: IntegrationTaskKey, params: {
20053
20016
  id: string;
20054
20017
  input: LinearDocument.WebhookUpdateInput;
20055
20018
  }) => LinearReturnType<Omit<_linear_sdk.WebhookPayload, "webhook"> & {
20056
20019
  webhook: _linear_sdk.Webhook | undefined;
20057
- }, unknown>;
20020
+ }>;
20058
20021
  }
20059
20022
  declare function onError(error: unknown): ReturnType<RunTaskErrorCallback>;
20060
20023
  declare const serializeLinearOutput: <T>(obj: T) => SerializedLinearOutput<T> extends infer T_1 ? { [K in keyof T_1]: SerializedLinearOutput<T>[K]; } : never;
20061
20024
 
20062
20025
  declare const PaginationOrderBy: typeof LinearDocument.PaginationOrderBy;
20063
20026
 
20064
- export { Linear, LinearIntegrationOptions, LinearRunTask, PaginationOrderBy, events, onError, serializeLinearOutput };
20027
+ export { Linear, type LinearIntegrationOptions, type LinearRunTask, PaginationOrderBy, events, onError, serializeLinearOutput };
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  var sdk$1 = require('@trigger.dev/sdk');
4
4
  var sdk = require('@linear/sdk');
5
5
  var zod = require('zod');
6
+ var node_buffer = require('node:buffer');
6
7
 
7
8
  var __defProp = Object.defineProperty;
8
9
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -2239,8 +2240,6 @@ var WebhookPayloadSchema = zod.z.union([
2239
2240
  ProjectUpdateEventSchema,
2240
2241
  ReactionEventSchema
2241
2242
  ]);
2242
-
2243
- // src/webhooks.ts
2244
2243
  var _Webhooks = class _Webhooks {
2245
2244
  constructor(runTask) {
2246
2245
  this.runTask = runTask;
@@ -2469,7 +2468,7 @@ async function webhookHandler(event, logger, integration) {
2469
2468
  const rawBody = await request.text();
2470
2469
  const body = JSON.parse(rawBody);
2471
2470
  const webhookHelper = new sdk.LinearWebhooks(source.secret);
2472
- if (!webhookHelper.verify(Buffer.from(rawBody), signature, body[sdk.LINEAR_WEBHOOK_TS_FIELD])) {
2471
+ if (!webhookHelper.verify(node_buffer.Buffer.from(rawBody), signature, body[sdk.LINEAR_WEBHOOK_TS_FIELD])) {
2473
2472
  logger.error("[@trigger.dev/linear] Error validating webhook signature, they don't match");
2474
2473
  throw Error("[@trigger.dev/linear] Invalid signature");
2475
2474
  }