@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/CHANGELOG.md +14 -0
- package/dist/_generated_documents.d.ts +4 -2
- package/dist/_generated_documents.d.ts.map +1 -1
- package/dist/_generated_sdk.d.ts +2 -0
- package/dist/_generated_sdk.d.ts.map +1 -1
- package/dist/index-cjs.js +10 -6
- package/dist/index-cjs.js.map +1 -1
- package/dist/index-cjs.min.js +1 -1
- package/dist/index-cjs.min.js.br +0 -0
- package/dist/index-cjs.min.js.gz +0 -0
- package/dist/index-cjs.min.js.map +1 -1
- package/dist/index-es.js +10 -6
- package/dist/index-es.js.map +1 -1
- package/dist/index-es.min.js +1 -1
- package/dist/index-es.min.js.br +0 -0
- package/dist/index-es.min.js.gz +0 -0
- package/dist/index-es.min.js.map +1 -1
- package/dist/index-umd.js +11 -7
- package/dist/index-umd.js.map +1 -1
- package/dist/index-umd.min.js +1 -1
- package/dist/index-umd.min.js.br +0 -0
- package/dist/index-umd.min.js.gz +0 -0
- package/dist/index-umd.min.js.map +1 -1
- package/dist/webhooks.d.ts +1 -1
- package/dist/webhooks.d.ts.map +1 -1
- package/package.json +1 -1
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.
|
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
|
-
|
124044
|
-
|
124045
|
-
|
124046
|
-
|
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
|
}
|