@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-cjs.js CHANGED
@@ -84787,6 +84787,7 @@ const OrganizationFragmentDoc = {
84787
84787
  { kind: "Field", name: { kind: "Name", value: "deletionRequestedAt" } },
84788
84788
  { kind: "Field", name: { kind: "Name", value: "archivedAt" } },
84789
84789
  { kind: "Field", name: { kind: "Name", value: "createdAt" } },
84790
+ { kind: "Field", name: { kind: "Name", value: "trialEndsAt" } },
84790
84791
  { kind: "Field", name: { kind: "Name", value: "id" } },
84791
84792
  { kind: "Field", name: { kind: "Name", value: "samlEnabled" } },
84792
84793
  { kind: "Field", name: { kind: "Name", value: "scimEnabled" } },
@@ -111594,7 +111595,7 @@ class OauthClientConnection extends Connection {
111594
111595
  */
111595
111596
  class Organization extends Request {
111596
111597
  constructor(request, data) {
111597
- var _a, _b, _c, _d, _e, _f;
111598
+ var _a, _b, _c, _d, _e, _f, _g;
111598
111599
  super(request);
111599
111600
  this.allowedAuthServices = data.allowedAuthServices;
111600
111601
  this.archivedAt = (_a = parseDate(data.archivedAt)) !== null && _a !== void 0 ? _a : undefined;
@@ -111613,7 +111614,8 @@ class Organization extends Request {
111613
111614
  this.roadmapEnabled = data.roadmapEnabled;
111614
111615
  this.samlEnabled = data.samlEnabled;
111615
111616
  this.scimEnabled = data.scimEnabled;
111616
- this.updatedAt = (_f = parseDate(data.updatedAt)) !== null && _f !== void 0 ? _f : new Date();
111617
+ this.trialEndsAt = (_f = parseDate(data.trialEndsAt)) !== null && _f !== void 0 ? _f : undefined;
111618
+ this.updatedAt = (_g = parseDate(data.updatedAt)) !== null && _g !== void 0 ? _g : new Date();
111617
111619
  this.urlKey = data.urlKey;
111618
111620
  this.userCount = data.userCount;
111619
111621
  this.subscription = data.subscription ? new PaidSubscription(request, data.subscription) : undefined;
@@ -124053,10 +124055,12 @@ class LinearWebhooks {
124053
124055
  if (!crypto__default["default"].timingSafeEqual(verificationBuffer, signatureBuffer)) {
124054
124056
  throw new Error("Invalid webhook signature");
124055
124057
  }
124056
- const timeDiff = Math.abs(new Date().getTime() - timestamp);
124057
- // Throw error if more than one minute delta between provided ts and current time
124058
- if (timeDiff > 1000 * 60) {
124059
- throw new Error("Invalid webhook timestamp");
124058
+ if (timestamp) {
124059
+ const timeDiff = Math.abs(new Date().getTime() - timestamp);
124060
+ // Throw error if more than one minute delta between provided ts and current time
124061
+ if (timeDiff > 1000 * 60) {
124062
+ throw new Error("Invalid webhook timestamp");
124063
+ }
124060
124064
  }
124061
124065
  return true;
124062
124066
  }