@linear/sdk 2.4.0 → 2.5.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 +34 -0
- package/dist/_generated_documents.d.ts +56 -36
- package/dist/_generated_documents.d.ts.map +1 -1
- package/dist/_generated_sdk.d.ts +36 -26
- package/dist/_generated_sdk.d.ts.map +1 -1
- package/dist/index-cjs.js +217 -126
- 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 +212 -125
- 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 +224 -131
- 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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/webhooks.d.ts +18 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index-umd.js
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Linear = {}));
|
5
|
-
})(this, (function (exports) { 'use strict';
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('crypto')) :
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'crypto'], factory) :
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Linear = {}, global.crypto));
|
5
|
+
})(this, (function (exports, crypto) { 'use strict';
|
6
|
+
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
8
|
+
|
9
|
+
var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
|
6
10
|
|
7
11
|
(function() {
|
8
|
-
const env = {"npm_package_name":"@linear/sdk","npm_package_version":"2.
|
12
|
+
const env = {"npm_package_name":"@linear/sdk","npm_package_version":"2.5.0"};
|
9
13
|
try {
|
10
14
|
if (process) {
|
11
15
|
process.env = Object.assign({}, process.env);
|
@@ -1938,45 +1942,6 @@
|
|
1938
1942
|
...GithubOrgFragmentDoc.definitions,
|
1939
1943
|
],
|
1940
1944
|
};
|
1941
|
-
const OauthClientFragmentDoc = {
|
1942
|
-
kind: "Document",
|
1943
|
-
definitions: [
|
1944
|
-
{
|
1945
|
-
kind: "FragmentDefinition",
|
1946
|
-
name: { kind: "Name", value: "OauthClient" },
|
1947
|
-
typeCondition: { kind: "NamedType", name: { kind: "Name", value: "OauthClient" } },
|
1948
|
-
selectionSet: {
|
1949
|
-
kind: "SelectionSet",
|
1950
|
-
selections: [
|
1951
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } },
|
1952
|
-
{ kind: "Field", name: { kind: "Name", value: "imageUrl" } },
|
1953
|
-
{ kind: "Field", name: { kind: "Name", value: "description" } },
|
1954
|
-
{ kind: "Field", name: { kind: "Name", value: "redirectUris" } },
|
1955
|
-
{ kind: "Field", name: { kind: "Name", value: "developer" } },
|
1956
|
-
{ kind: "Field", name: { kind: "Name", value: "clientId" } },
|
1957
|
-
{ kind: "Field", name: { kind: "Name", value: "name" } },
|
1958
|
-
{ kind: "Field", name: { kind: "Name", value: "clientSecret" } },
|
1959
|
-
{ kind: "Field", name: { kind: "Name", value: "updatedAt" } },
|
1960
|
-
{ kind: "Field", name: { kind: "Name", value: "webhookResourceTypes" } },
|
1961
|
-
{ kind: "Field", name: { kind: "Name", value: "archivedAt" } },
|
1962
|
-
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
|
1963
|
-
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
1964
|
-
{
|
1965
|
-
kind: "Field",
|
1966
|
-
name: { kind: "Name", value: "creator" },
|
1967
|
-
selectionSet: {
|
1968
|
-
kind: "SelectionSet",
|
1969
|
-
selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
|
1970
|
-
},
|
1971
|
-
},
|
1972
|
-
{ kind: "Field", name: { kind: "Name", value: "developerUrl" } },
|
1973
|
-
{ kind: "Field", name: { kind: "Name", value: "webhookUrl" } },
|
1974
|
-
{ kind: "Field", name: { kind: "Name", value: "publicEnabled" } },
|
1975
|
-
],
|
1976
|
-
},
|
1977
|
-
},
|
1978
|
-
],
|
1979
|
-
};
|
1980
1945
|
const UserAuthorizedApplicationFragmentDoc = {
|
1981
1946
|
kind: "Document",
|
1982
1947
|
definitions: [
|
@@ -2419,54 +2384,6 @@
|
|
2419
2384
|
},
|
2420
2385
|
],
|
2421
2386
|
};
|
2422
|
-
const AdminJobConfigurationPayloadFragmentDoc = {
|
2423
|
-
kind: "Document",
|
2424
|
-
definitions: [
|
2425
|
-
{
|
2426
|
-
kind: "FragmentDefinition",
|
2427
|
-
name: { kind: "Name", value: "AdminJobConfigurationPayload" },
|
2428
|
-
typeCondition: { kind: "NamedType", name: { kind: "Name", value: "AdminJobConfigurationPayload" } },
|
2429
|
-
selectionSet: {
|
2430
|
-
kind: "SelectionSet",
|
2431
|
-
selections: [
|
2432
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } },
|
2433
|
-
{ kind: "Field", name: { kind: "Name", value: "currentJob" } },
|
2434
|
-
{ kind: "Field", name: { kind: "Name", value: "delay" } },
|
2435
|
-
{ kind: "Field", name: { kind: "Name", value: "enabled" } },
|
2436
|
-
{ kind: "Field", name: { kind: "Name", value: "param" } },
|
2437
|
-
],
|
2438
|
-
},
|
2439
|
-
},
|
2440
|
-
],
|
2441
|
-
};
|
2442
|
-
const AdminJobStatusPayloadFragmentDoc = {
|
2443
|
-
kind: "Document",
|
2444
|
-
definitions: [
|
2445
|
-
{
|
2446
|
-
kind: "FragmentDefinition",
|
2447
|
-
name: { kind: "Name", value: "AdminJobStatusPayload" },
|
2448
|
-
typeCondition: { kind: "NamedType", name: { kind: "Name", value: "AdminJobStatusPayload" } },
|
2449
|
-
selectionSet: {
|
2450
|
-
kind: "SelectionSet",
|
2451
|
-
selections: [
|
2452
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } },
|
2453
|
-
{ kind: "Field", name: { kind: "Name", value: "availableJobs" } },
|
2454
|
-
{
|
2455
|
-
kind: "Field",
|
2456
|
-
name: { kind: "Name", value: "configuration" },
|
2457
|
-
selectionSet: {
|
2458
|
-
kind: "SelectionSet",
|
2459
|
-
selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "AdminJobConfigurationPayload" } }],
|
2460
|
-
},
|
2461
|
-
},
|
2462
|
-
{ kind: "Field", name: { kind: "Name", value: "cursor" } },
|
2463
|
-
{ kind: "Field", name: { kind: "Name", value: "startedAt" } },
|
2464
|
-
],
|
2465
|
-
},
|
2466
|
-
},
|
2467
|
-
...AdminJobConfigurationPayloadFragmentDoc.definitions,
|
2468
|
-
],
|
2469
|
-
};
|
2470
2387
|
const ApiKeyFragmentDoc = {
|
2471
2388
|
kind: "Document",
|
2472
2389
|
definitions: [
|
@@ -5333,6 +5250,80 @@
|
|
5333
5250
|
...NotificationSubscriptionFragmentDoc.definitions,
|
5334
5251
|
],
|
5335
5252
|
};
|
5253
|
+
const OauthClientFragmentDoc = {
|
5254
|
+
kind: "Document",
|
5255
|
+
definitions: [
|
5256
|
+
{
|
5257
|
+
kind: "FragmentDefinition",
|
5258
|
+
name: { kind: "Name", value: "OauthClient" },
|
5259
|
+
typeCondition: { kind: "NamedType", name: { kind: "Name", value: "OauthClient" } },
|
5260
|
+
selectionSet: {
|
5261
|
+
kind: "SelectionSet",
|
5262
|
+
selections: [
|
5263
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } },
|
5264
|
+
{ kind: "Field", name: { kind: "Name", value: "imageUrl" } },
|
5265
|
+
{ kind: "Field", name: { kind: "Name", value: "description" } },
|
5266
|
+
{ kind: "Field", name: { kind: "Name", value: "redirectUris" } },
|
5267
|
+
{ kind: "Field", name: { kind: "Name", value: "developer" } },
|
5268
|
+
{ kind: "Field", name: { kind: "Name", value: "clientId" } },
|
5269
|
+
{ kind: "Field", name: { kind: "Name", value: "name" } },
|
5270
|
+
{ kind: "Field", name: { kind: "Name", value: "clientSecret" } },
|
5271
|
+
{ kind: "Field", name: { kind: "Name", value: "updatedAt" } },
|
5272
|
+
{ kind: "Field", name: { kind: "Name", value: "webhookResourceTypes" } },
|
5273
|
+
{ kind: "Field", name: { kind: "Name", value: "archivedAt" } },
|
5274
|
+
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
|
5275
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
5276
|
+
{
|
5277
|
+
kind: "Field",
|
5278
|
+
name: { kind: "Name", value: "creator" },
|
5279
|
+
selectionSet: {
|
5280
|
+
kind: "SelectionSet",
|
5281
|
+
selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
|
5282
|
+
},
|
5283
|
+
},
|
5284
|
+
{ kind: "Field", name: { kind: "Name", value: "developerUrl" } },
|
5285
|
+
{ kind: "Field", name: { kind: "Name", value: "webhookUrl" } },
|
5286
|
+
{ kind: "Field", name: { kind: "Name", value: "webhookSecret" } },
|
5287
|
+
{ kind: "Field", name: { kind: "Name", value: "publicEnabled" } },
|
5288
|
+
],
|
5289
|
+
},
|
5290
|
+
},
|
5291
|
+
],
|
5292
|
+
};
|
5293
|
+
const OauthClientConnectionFragmentDoc = {
|
5294
|
+
kind: "Document",
|
5295
|
+
definitions: [
|
5296
|
+
{
|
5297
|
+
kind: "FragmentDefinition",
|
5298
|
+
name: { kind: "Name", value: "OauthClientConnection" },
|
5299
|
+
typeCondition: { kind: "NamedType", name: { kind: "Name", value: "OauthClientConnection" } },
|
5300
|
+
selectionSet: {
|
5301
|
+
kind: "SelectionSet",
|
5302
|
+
selections: [
|
5303
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } },
|
5304
|
+
{
|
5305
|
+
kind: "Field",
|
5306
|
+
name: { kind: "Name", value: "nodes" },
|
5307
|
+
selectionSet: {
|
5308
|
+
kind: "SelectionSet",
|
5309
|
+
selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "OauthClient" } }],
|
5310
|
+
},
|
5311
|
+
},
|
5312
|
+
{
|
5313
|
+
kind: "Field",
|
5314
|
+
name: { kind: "Name", value: "pageInfo" },
|
5315
|
+
selectionSet: {
|
5316
|
+
kind: "SelectionSet",
|
5317
|
+
selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PageInfo" } }],
|
5318
|
+
},
|
5319
|
+
},
|
5320
|
+
],
|
5321
|
+
},
|
5322
|
+
},
|
5323
|
+
...OauthClientFragmentDoc.definitions,
|
5324
|
+
...PageInfoFragmentDoc.definitions,
|
5325
|
+
],
|
5326
|
+
};
|
5336
5327
|
const OrganizationCancelDeletePayloadFragmentDoc = {
|
5337
5328
|
kind: "Document",
|
5338
5329
|
definitions: [
|
@@ -9993,6 +9984,54 @@
|
|
9993
9984
|
...IntegrationPayloadFragmentDoc.definitions,
|
9994
9985
|
],
|
9995
9986
|
};
|
9987
|
+
const IntegrationSlackIntakeDocument = {
|
9988
|
+
kind: "Document",
|
9989
|
+
definitions: [
|
9990
|
+
{
|
9991
|
+
kind: "OperationDefinition",
|
9992
|
+
operation: "mutation",
|
9993
|
+
name: { kind: "Name", value: "integrationSlackIntake" },
|
9994
|
+
variableDefinitions: [
|
9995
|
+
{
|
9996
|
+
kind: "VariableDefinition",
|
9997
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "code" } },
|
9998
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
|
9999
|
+
},
|
10000
|
+
{
|
10001
|
+
kind: "VariableDefinition",
|
10002
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "redirectUri" } },
|
10003
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
|
10004
|
+
},
|
10005
|
+
],
|
10006
|
+
selectionSet: {
|
10007
|
+
kind: "SelectionSet",
|
10008
|
+
selections: [
|
10009
|
+
{
|
10010
|
+
kind: "Field",
|
10011
|
+
name: { kind: "Name", value: "integrationSlackIntake" },
|
10012
|
+
arguments: [
|
10013
|
+
{
|
10014
|
+
kind: "Argument",
|
10015
|
+
name: { kind: "Name", value: "code" },
|
10016
|
+
value: { kind: "Variable", name: { kind: "Name", value: "code" } },
|
10017
|
+
},
|
10018
|
+
{
|
10019
|
+
kind: "Argument",
|
10020
|
+
name: { kind: "Name", value: "redirectUri" },
|
10021
|
+
value: { kind: "Variable", name: { kind: "Name", value: "redirectUri" } },
|
10022
|
+
},
|
10023
|
+
],
|
10024
|
+
selectionSet: {
|
10025
|
+
kind: "SelectionSet",
|
10026
|
+
selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "IntegrationPayload" } }],
|
10027
|
+
},
|
10028
|
+
},
|
10029
|
+
],
|
10030
|
+
},
|
10031
|
+
},
|
10032
|
+
...IntegrationPayloadFragmentDoc.definitions,
|
10033
|
+
],
|
10034
|
+
};
|
9996
10035
|
const IntegrationSlackOrgProjectUpdatesPostDocument = {
|
9997
10036
|
kind: "Document",
|
9998
10037
|
definitions: [
|
@@ -26640,7 +26679,6 @@
|
|
26640
26679
|
GithubRepoFragmentDoc: GithubRepoFragmentDoc,
|
26641
26680
|
GithubOrgFragmentDoc: GithubOrgFragmentDoc,
|
26642
26681
|
GithubOAuthTokenPayloadFragmentDoc: GithubOAuthTokenPayloadFragmentDoc,
|
26643
|
-
OauthClientFragmentDoc: OauthClientFragmentDoc,
|
26644
26682
|
UserAuthorizedApplicationFragmentDoc: UserAuthorizedApplicationFragmentDoc,
|
26645
26683
|
ApplicationFragmentDoc: ApplicationFragmentDoc,
|
26646
26684
|
FrontSettingsFragmentDoc: FrontSettingsFragmentDoc,
|
@@ -26657,8 +26695,6 @@
|
|
26657
26695
|
IntegrationSettingsFragmentDoc: IntegrationSettingsFragmentDoc,
|
26658
26696
|
SamlConfigurationPayloadFragmentDoc: SamlConfigurationPayloadFragmentDoc,
|
26659
26697
|
UserSettingsFragmentDoc: UserSettingsFragmentDoc,
|
26660
|
-
AdminJobConfigurationPayloadFragmentDoc: AdminJobConfigurationPayloadFragmentDoc,
|
26661
|
-
AdminJobStatusPayloadFragmentDoc: AdminJobStatusPayloadFragmentDoc,
|
26662
26698
|
ApiKeyFragmentDoc: ApiKeyFragmentDoc,
|
26663
26699
|
PageInfoFragmentDoc: PageInfoFragmentDoc,
|
26664
26700
|
ApiKeyConnectionFragmentDoc: ApiKeyConnectionFragmentDoc,
|
@@ -26741,6 +26777,8 @@
|
|
26741
26777
|
NotificationSubscriptionFragmentDoc: NotificationSubscriptionFragmentDoc,
|
26742
26778
|
NotificationSubscriptionConnectionFragmentDoc: NotificationSubscriptionConnectionFragmentDoc,
|
26743
26779
|
NotificationSubscriptionPayloadFragmentDoc: NotificationSubscriptionPayloadFragmentDoc,
|
26780
|
+
OauthClientFragmentDoc: OauthClientFragmentDoc,
|
26781
|
+
OauthClientConnectionFragmentDoc: OauthClientConnectionFragmentDoc,
|
26744
26782
|
OrganizationCancelDeletePayloadFragmentDoc: OrganizationCancelDeletePayloadFragmentDoc,
|
26745
26783
|
OrganizationDeletePayloadFragmentDoc: OrganizationDeletePayloadFragmentDoc,
|
26746
26784
|
OrganizationExistsPayloadFragmentDoc: OrganizationExistsPayloadFragmentDoc,
|
@@ -26868,6 +26906,7 @@
|
|
26868
26906
|
IntegrationSentryConnectDocument: IntegrationSentryConnectDocument,
|
26869
26907
|
IntegrationSlackDocument: IntegrationSlackDocument,
|
26870
26908
|
IntegrationSlackImportEmojisDocument: IntegrationSlackImportEmojisDocument,
|
26909
|
+
IntegrationSlackIntakeDocument: IntegrationSlackIntakeDocument,
|
26871
26910
|
IntegrationSlackOrgProjectUpdatesPostDocument: IntegrationSlackOrgProjectUpdatesPostDocument,
|
26872
26911
|
IntegrationSlackPersonalDocument: IntegrationSlackPersonalDocument,
|
26873
26912
|
IntegrationSlackPostDocument: IntegrationSlackPostDocument,
|
@@ -27247,38 +27286,6 @@
|
|
27247
27286
|
return undefined;
|
27248
27287
|
}
|
27249
27288
|
}
|
27250
|
-
/**
|
27251
|
-
* AdminJobConfigurationPayload model
|
27252
|
-
*
|
27253
|
-
* @param request - function to call the graphql client
|
27254
|
-
* @param data - L.AdminJobConfigurationPayloadFragment response data
|
27255
|
-
*/
|
27256
|
-
class AdminJobConfigurationPayload extends Request {
|
27257
|
-
constructor(request, data) {
|
27258
|
-
var _a, _b;
|
27259
|
-
super(request);
|
27260
|
-
this.currentJob = (_a = data.currentJob) !== null && _a !== void 0 ? _a : undefined;
|
27261
|
-
this.delay = data.delay;
|
27262
|
-
this.enabled = data.enabled;
|
27263
|
-
this.param = (_b = data.param) !== null && _b !== void 0 ? _b : undefined;
|
27264
|
-
}
|
27265
|
-
}
|
27266
|
-
/**
|
27267
|
-
* AdminJobStatusPayload model
|
27268
|
-
*
|
27269
|
-
* @param request - function to call the graphql client
|
27270
|
-
* @param data - L.AdminJobStatusPayloadFragment response data
|
27271
|
-
*/
|
27272
|
-
class AdminJobStatusPayload extends Request {
|
27273
|
-
constructor(request, data) {
|
27274
|
-
var _a, _b;
|
27275
|
-
super(request);
|
27276
|
-
this.availableJobs = data.availableJobs;
|
27277
|
-
this.cursor = (_a = data.cursor) !== null && _a !== void 0 ? _a : undefined;
|
27278
|
-
this.startedAt = (_b = parseDate(data.startedAt)) !== null && _b !== void 0 ? _b : undefined;
|
27279
|
-
this.configuration = new AdminJobConfigurationPayload(request, data.configuration);
|
27280
|
-
}
|
27281
|
-
}
|
27282
27289
|
/**
|
27283
27290
|
* An API key. Grants access to the user's resources.
|
27284
27291
|
*
|
@@ -29457,7 +29464,7 @@
|
|
29457
29464
|
*/
|
29458
29465
|
class OauthClient extends Request {
|
29459
29466
|
constructor(request, data) {
|
29460
|
-
var _a, _b, _c, _d, _e, _f;
|
29467
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
29461
29468
|
super(request);
|
29462
29469
|
this.archivedAt = (_a = parseDate(data.archivedAt)) !== null && _a !== void 0 ? _a : undefined;
|
29463
29470
|
this.clientId = data.clientId;
|
@@ -29473,7 +29480,8 @@
|
|
29473
29480
|
this.redirectUris = data.redirectUris;
|
29474
29481
|
this.updatedAt = (_e = parseDate(data.updatedAt)) !== null && _e !== void 0 ? _e : new Date();
|
29475
29482
|
this.webhookResourceTypes = data.webhookResourceTypes;
|
29476
|
-
this.
|
29483
|
+
this.webhookSecret = (_f = data.webhookSecret) !== null && _f !== void 0 ? _f : undefined;
|
29484
|
+
this.webhookUrl = (_g = data.webhookUrl) !== null && _g !== void 0 ? _g : undefined;
|
29477
29485
|
this._creator = data.creator;
|
29478
29486
|
}
|
29479
29487
|
/** The user who created the OAuthClient. */
|
@@ -29540,6 +29548,18 @@
|
|
29540
29548
|
return new UserQuery(this._request).fetch(this._user.id);
|
29541
29549
|
}
|
29542
29550
|
}
|
29551
|
+
/**
|
29552
|
+
* OauthClientConnection model
|
29553
|
+
*
|
29554
|
+
* @param request - function to call the graphql client
|
29555
|
+
* @param fetch - function to trigger a refetch of this OauthClientConnection model
|
29556
|
+
* @param data - OauthClientConnection response data
|
29557
|
+
*/
|
29558
|
+
class OauthClientConnection extends Connection {
|
29559
|
+
constructor(request, fetch, data) {
|
29560
|
+
super(request, fetch, data.nodes.map(node => new OauthClient(request, node)), new PageInfo(request, data.pageInfo));
|
29561
|
+
}
|
29562
|
+
}
|
29543
29563
|
/**
|
29544
29564
|
* An organization. Organizations are root-level objects that contain user accounts and teams.
|
29545
29565
|
*
|
@@ -33183,6 +33203,33 @@
|
|
33183
33203
|
});
|
33184
33204
|
}
|
33185
33205
|
}
|
33206
|
+
/**
|
33207
|
+
* A fetchable IntegrationSlackIntake Mutation
|
33208
|
+
*
|
33209
|
+
* @param request - function to call the graphql client
|
33210
|
+
*/
|
33211
|
+
class IntegrationSlackIntakeMutation extends Request {
|
33212
|
+
constructor(request) {
|
33213
|
+
super(request);
|
33214
|
+
}
|
33215
|
+
/**
|
33216
|
+
* Call the IntegrationSlackIntake mutation and return a IntegrationPayload
|
33217
|
+
*
|
33218
|
+
* @param code - required code to pass to integrationSlackIntake
|
33219
|
+
* @param redirectUri - required redirectUri to pass to integrationSlackIntake
|
33220
|
+
* @returns parsed response from IntegrationSlackIntakeMutation
|
33221
|
+
*/
|
33222
|
+
fetch(code, redirectUri) {
|
33223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
33224
|
+
const response = yield this._request(IntegrationSlackIntakeDocument, {
|
33225
|
+
code,
|
33226
|
+
redirectUri,
|
33227
|
+
});
|
33228
|
+
const data = response.integrationSlackIntake;
|
33229
|
+
return new IntegrationPayload(this._request, data);
|
33230
|
+
});
|
33231
|
+
}
|
33232
|
+
}
|
33186
33233
|
/**
|
33187
33234
|
* A fetchable IntegrationSlackOrgProjectUpdatesPost Mutation
|
33188
33235
|
*
|
@@ -40149,6 +40196,16 @@
|
|
40149
40196
|
integrationSlackImportEmojis(code, redirectUri) {
|
40150
40197
|
return new IntegrationSlackImportEmojisMutation(this._request).fetch(code, redirectUri);
|
40151
40198
|
}
|
40199
|
+
/**
|
40200
|
+
* Integrates the organization with Slack for issue intake.
|
40201
|
+
*
|
40202
|
+
* @param code - required code to pass to integrationSlackIntake
|
40203
|
+
* @param redirectUri - required redirectUri to pass to integrationSlackIntake
|
40204
|
+
* @returns IntegrationPayload
|
40205
|
+
*/
|
40206
|
+
integrationSlackIntake(code, redirectUri) {
|
40207
|
+
return new IntegrationSlackIntakeMutation(this._request).fetch(code, redirectUri);
|
40208
|
+
}
|
40152
40209
|
/**
|
40153
40210
|
* Slack integration for organization level project update notifications.
|
40154
40211
|
*
|
@@ -41946,8 +42003,39 @@
|
|
41946
42003
|
}
|
41947
42004
|
}
|
41948
42005
|
|
41949
|
-
|
41950
|
-
|
42006
|
+
const LINEAR_WEBHOOK_SIGNATURE_HEADER = "linear-signature";
|
42007
|
+
const LINEAR_WEBHOOK_TS_FIELD = "webhookTimestamp";
|
42008
|
+
/**
|
42009
|
+
* Provides helper functions to work with Linear webhooks
|
42010
|
+
*/
|
42011
|
+
class LinearWebhooks {
|
42012
|
+
constructor(secret) {
|
42013
|
+
this.secret = secret;
|
42014
|
+
}
|
42015
|
+
/**
|
42016
|
+
* Verify the webhook signature
|
42017
|
+
* @param rawBody The webhook request raw body.
|
42018
|
+
* @param signature The signature to verify.
|
42019
|
+
* @param timestamp The `webhookTimestamp` field from the request parsed body.
|
42020
|
+
*/
|
42021
|
+
verify(rawBody, signature, timestamp) {
|
42022
|
+
const verificationBuffer = Buffer.from(crypto__default["default"].createHmac("sha256", this.secret).update(rawBody).digest("hex"));
|
42023
|
+
const signatureBuffer = Buffer.from(signature);
|
42024
|
+
if (verificationBuffer.length !== signatureBuffer.length) {
|
42025
|
+
throw new Error("Invalid webhook signature");
|
42026
|
+
}
|
42027
|
+
if (!crypto__default["default"].timingSafeEqual(verificationBuffer, signatureBuffer)) {
|
42028
|
+
throw new Error("Invalid webhook signature");
|
42029
|
+
}
|
42030
|
+
const timeDiff = Math.abs(new Date().getTime() - timestamp);
|
42031
|
+
// Throw error if more than one minute delta between provided ts and current time
|
42032
|
+
if (timeDiff > 1000 * 60) {
|
42033
|
+
throw new Error("Invalid webhook timestamp");
|
42034
|
+
}
|
42035
|
+
return true;
|
42036
|
+
}
|
42037
|
+
}
|
42038
|
+
|
41951
42039
|
exports.AdministrableTeamsQuery = AdministrableTeamsQuery;
|
41952
42040
|
exports.AirbyteIntegrationConnectMutation = AirbyteIntegrationConnectMutation;
|
41953
42041
|
exports.ApiKey = ApiKey;
|
@@ -42146,6 +42234,7 @@
|
|
42146
42234
|
exports.IntegrationSentryConnectMutation = IntegrationSentryConnectMutation;
|
42147
42235
|
exports.IntegrationSettings = IntegrationSettings;
|
42148
42236
|
exports.IntegrationSlackImportEmojisMutation = IntegrationSlackImportEmojisMutation;
|
42237
|
+
exports.IntegrationSlackIntakeMutation = IntegrationSlackIntakeMutation;
|
42149
42238
|
exports.IntegrationSlackMutation = IntegrationSlackMutation;
|
42150
42239
|
exports.IntegrationSlackOrgProjectUpdatesPostMutation = IntegrationSlackOrgProjectUpdatesPostMutation;
|
42151
42240
|
exports.IntegrationSlackPersonalMutation = IntegrationSlackPersonalMutation;
|
@@ -42220,6 +42309,8 @@
|
|
42220
42309
|
exports.JiraProjectData = JiraProjectData;
|
42221
42310
|
exports.JiraSettings = JiraSettings;
|
42222
42311
|
exports.JoinOrganizationFromOnboardingMutation = JoinOrganizationFromOnboardingMutation;
|
42312
|
+
exports.LINEAR_WEBHOOK_SIGNATURE_HEADER = LINEAR_WEBHOOK_SIGNATURE_HEADER;
|
42313
|
+
exports.LINEAR_WEBHOOK_TS_FIELD = LINEAR_WEBHOOK_TS_FIELD;
|
42223
42314
|
exports.LeaveOrganizationMutation = LeaveOrganizationMutation;
|
42224
42315
|
exports.LinearClient = LinearClient;
|
42225
42316
|
exports.LinearConnection = LinearConnection;
|
@@ -42228,6 +42319,7 @@
|
|
42228
42319
|
exports.LinearGraphQLClient = LinearGraphQLClient;
|
42229
42320
|
exports.LinearGraphQLError = LinearGraphQLError;
|
42230
42321
|
exports.LinearSdk = LinearSdk;
|
42322
|
+
exports.LinearWebhooks = LinearWebhooks;
|
42231
42323
|
exports.LockTimeoutLinearError = LockTimeoutLinearError;
|
42232
42324
|
exports.LogoutMutation = LogoutMutation;
|
42233
42325
|
exports.LogoutResponse = LogoutResponse;
|
@@ -42247,6 +42339,7 @@
|
|
42247
42339
|
exports.OauthClient = OauthClient;
|
42248
42340
|
exports.OauthClientApproval = OauthClientApproval;
|
42249
42341
|
exports.OauthClientApprovalNotification = OauthClientApprovalNotification;
|
42342
|
+
exports.OauthClientConnection = OauthClientConnection;
|
42250
42343
|
exports.Organization = Organization;
|
42251
42344
|
exports.OrganizationCancelDeletePayload = OrganizationCancelDeletePayload;
|
42252
42345
|
exports.OrganizationDeleteChallengeMutation = OrganizationDeleteChallengeMutation;
|