@linear/sdk 2.5.0 → 2.6.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-es.js CHANGED
@@ -84774,6 +84774,7 @@ const OrganizationFragmentDoc = {
84774
84774
  { kind: "Field", name: { kind: "Name", value: "deletionRequestedAt" } },
84775
84775
  { kind: "Field", name: { kind: "Name", value: "archivedAt" } },
84776
84776
  { kind: "Field", name: { kind: "Name", value: "createdAt" } },
84777
+ { kind: "Field", name: { kind: "Name", value: "trialEndsAt" } },
84777
84778
  { kind: "Field", name: { kind: "Name", value: "id" } },
84778
84779
  { kind: "Field", name: { kind: "Name", value: "samlEnabled" } },
84779
84780
  { kind: "Field", name: { kind: "Name", value: "scimEnabled" } },
@@ -111581,7 +111582,7 @@ class OauthClientConnection extends Connection {
111581
111582
  */
111582
111583
  class Organization extends Request {
111583
111584
  constructor(request, data) {
111584
- var _a, _b, _c, _d, _e, _f;
111585
+ var _a, _b, _c, _d, _e, _f, _g;
111585
111586
  super(request);
111586
111587
  this.allowedAuthServices = data.allowedAuthServices;
111587
111588
  this.archivedAt = (_a = parseDate(data.archivedAt)) !== null && _a !== void 0 ? _a : undefined;
@@ -111600,7 +111601,8 @@ class Organization extends Request {
111600
111601
  this.roadmapEnabled = data.roadmapEnabled;
111601
111602
  this.samlEnabled = data.samlEnabled;
111602
111603
  this.scimEnabled = data.scimEnabled;
111603
- this.updatedAt = (_f = parseDate(data.updatedAt)) !== null && _f !== void 0 ? _f : new Date();
111604
+ this.trialEndsAt = (_f = parseDate(data.trialEndsAt)) !== null && _f !== void 0 ? _f : undefined;
111605
+ this.updatedAt = (_g = parseDate(data.updatedAt)) !== null && _g !== void 0 ? _g : new Date();
111604
111606
  this.urlKey = data.urlKey;
111605
111607
  this.userCount = data.userCount;
111606
111608
  this.subscription = data.subscription ? new PaidSubscription(request, data.subscription) : undefined;
@@ -124040,10 +124042,12 @@ class LinearWebhooks {
124040
124042
  if (!crypto.timingSafeEqual(verificationBuffer, signatureBuffer)) {
124041
124043
  throw new Error("Invalid webhook signature");
124042
124044
  }
124043
- const timeDiff = Math.abs(new Date().getTime() - timestamp);
124044
- // Throw error if more than one minute delta between provided ts and current time
124045
- if (timeDiff > 1000 * 60) {
124046
- throw new Error("Invalid webhook timestamp");
124045
+ if (timestamp) {
124046
+ const timeDiff = Math.abs(new Date().getTime() - timestamp);
124047
+ // Throw error if more than one minute delta between provided ts and current time
124048
+ if (timeDiff > 1000 * 60) {
124049
+ throw new Error("Invalid webhook timestamp");
124050
+ }
124047
124051
  }
124048
124052
  return true;
124049
124053
  }