@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-umd.js
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
|
10
10
|
|
11
11
|
(function() {
|
12
|
-
const env = {"npm_package_name":"@linear/sdk","npm_package_version":"2.
|
12
|
+
const env = {"npm_package_name":"@linear/sdk","npm_package_version":"2.6.0"};
|
13
13
|
try {
|
14
14
|
if (process) {
|
15
15
|
process.env = Object.assign({}, process.env);
|
@@ -2761,6 +2761,7 @@
|
|
2761
2761
|
{ kind: "Field", name: { kind: "Name", value: "deletionRequestedAt" } },
|
2762
2762
|
{ kind: "Field", name: { kind: "Name", value: "archivedAt" } },
|
2763
2763
|
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
|
2764
|
+
{ kind: "Field", name: { kind: "Name", value: "trialEndsAt" } },
|
2764
2765
|
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
2765
2766
|
{ kind: "Field", name: { kind: "Name", value: "samlEnabled" } },
|
2766
2767
|
{ kind: "Field", name: { kind: "Name", value: "scimEnabled" } },
|
@@ -29568,7 +29569,7 @@
|
|
29568
29569
|
*/
|
29569
29570
|
class Organization extends Request {
|
29570
29571
|
constructor(request, data) {
|
29571
|
-
var _a, _b, _c, _d, _e, _f;
|
29572
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
29572
29573
|
super(request);
|
29573
29574
|
this.allowedAuthServices = data.allowedAuthServices;
|
29574
29575
|
this.archivedAt = (_a = parseDate(data.archivedAt)) !== null && _a !== void 0 ? _a : undefined;
|
@@ -29587,7 +29588,8 @@
|
|
29587
29588
|
this.roadmapEnabled = data.roadmapEnabled;
|
29588
29589
|
this.samlEnabled = data.samlEnabled;
|
29589
29590
|
this.scimEnabled = data.scimEnabled;
|
29590
|
-
this.
|
29591
|
+
this.trialEndsAt = (_f = parseDate(data.trialEndsAt)) !== null && _f !== void 0 ? _f : undefined;
|
29592
|
+
this.updatedAt = (_g = parseDate(data.updatedAt)) !== null && _g !== void 0 ? _g : new Date();
|
29591
29593
|
this.urlKey = data.urlKey;
|
29592
29594
|
this.userCount = data.userCount;
|
29593
29595
|
this.subscription = data.subscription ? new PaidSubscription(request, data.subscription) : undefined;
|
@@ -42027,10 +42029,12 @@
|
|
42027
42029
|
if (!crypto__default["default"].timingSafeEqual(verificationBuffer, signatureBuffer)) {
|
42028
42030
|
throw new Error("Invalid webhook signature");
|
42029
42031
|
}
|
42030
|
-
|
42031
|
-
|
42032
|
-
|
42033
|
-
|
42032
|
+
if (timestamp) {
|
42033
|
+
const timeDiff = Math.abs(new Date().getTime() - timestamp);
|
42034
|
+
// Throw error if more than one minute delta between provided ts and current time
|
42035
|
+
if (timeDiff > 1000 * 60) {
|
42036
|
+
throw new Error("Invalid webhook timestamp");
|
42037
|
+
}
|
42034
42038
|
}
|
42035
42039
|
return true;
|
42036
42040
|
}
|