@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-cjs.js
CHANGED
@@ -7,6 +7,7 @@ var http = require('http');
|
|
7
7
|
var Url = require('url');
|
8
8
|
var https = require('https');
|
9
9
|
var zlib = require('zlib');
|
10
|
+
var crypto = require('crypto');
|
10
11
|
|
11
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
12
13
|
|
@@ -15,6 +16,7 @@ var http__default = /*#__PURE__*/_interopDefaultLegacy(http);
|
|
15
16
|
var Url__default = /*#__PURE__*/_interopDefaultLegacy(Url);
|
16
17
|
var https__default = /*#__PURE__*/_interopDefaultLegacy(https);
|
17
18
|
var zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib);
|
19
|
+
var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
|
18
20
|
|
19
21
|
/******************************************************************************
|
20
22
|
Copyright (c) Microsoft Corporation.
|
@@ -83966,45 +83968,6 @@ const GithubOAuthTokenPayloadFragmentDoc = {
|
|
83966
83968
|
...GithubOrgFragmentDoc.definitions,
|
83967
83969
|
],
|
83968
83970
|
};
|
83969
|
-
const OauthClientFragmentDoc = {
|
83970
|
-
kind: "Document",
|
83971
|
-
definitions: [
|
83972
|
-
{
|
83973
|
-
kind: "FragmentDefinition",
|
83974
|
-
name: { kind: "Name", value: "OauthClient" },
|
83975
|
-
typeCondition: { kind: "NamedType", name: { kind: "Name", value: "OauthClient" } },
|
83976
|
-
selectionSet: {
|
83977
|
-
kind: "SelectionSet",
|
83978
|
-
selections: [
|
83979
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } },
|
83980
|
-
{ kind: "Field", name: { kind: "Name", value: "imageUrl" } },
|
83981
|
-
{ kind: "Field", name: { kind: "Name", value: "description" } },
|
83982
|
-
{ kind: "Field", name: { kind: "Name", value: "redirectUris" } },
|
83983
|
-
{ kind: "Field", name: { kind: "Name", value: "developer" } },
|
83984
|
-
{ kind: "Field", name: { kind: "Name", value: "clientId" } },
|
83985
|
-
{ kind: "Field", name: { kind: "Name", value: "name" } },
|
83986
|
-
{ kind: "Field", name: { kind: "Name", value: "clientSecret" } },
|
83987
|
-
{ kind: "Field", name: { kind: "Name", value: "updatedAt" } },
|
83988
|
-
{ kind: "Field", name: { kind: "Name", value: "webhookResourceTypes" } },
|
83989
|
-
{ kind: "Field", name: { kind: "Name", value: "archivedAt" } },
|
83990
|
-
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
|
83991
|
-
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
83992
|
-
{
|
83993
|
-
kind: "Field",
|
83994
|
-
name: { kind: "Name", value: "creator" },
|
83995
|
-
selectionSet: {
|
83996
|
-
kind: "SelectionSet",
|
83997
|
-
selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
|
83998
|
-
},
|
83999
|
-
},
|
84000
|
-
{ kind: "Field", name: { kind: "Name", value: "developerUrl" } },
|
84001
|
-
{ kind: "Field", name: { kind: "Name", value: "webhookUrl" } },
|
84002
|
-
{ kind: "Field", name: { kind: "Name", value: "publicEnabled" } },
|
84003
|
-
],
|
84004
|
-
},
|
84005
|
-
},
|
84006
|
-
],
|
84007
|
-
};
|
84008
83971
|
const UserAuthorizedApplicationFragmentDoc = {
|
84009
83972
|
kind: "Document",
|
84010
83973
|
definitions: [
|
@@ -84447,54 +84410,6 @@ const UserSettingsFragmentDoc = {
|
|
84447
84410
|
},
|
84448
84411
|
],
|
84449
84412
|
};
|
84450
|
-
const AdminJobConfigurationPayloadFragmentDoc = {
|
84451
|
-
kind: "Document",
|
84452
|
-
definitions: [
|
84453
|
-
{
|
84454
|
-
kind: "FragmentDefinition",
|
84455
|
-
name: { kind: "Name", value: "AdminJobConfigurationPayload" },
|
84456
|
-
typeCondition: { kind: "NamedType", name: { kind: "Name", value: "AdminJobConfigurationPayload" } },
|
84457
|
-
selectionSet: {
|
84458
|
-
kind: "SelectionSet",
|
84459
|
-
selections: [
|
84460
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } },
|
84461
|
-
{ kind: "Field", name: { kind: "Name", value: "currentJob" } },
|
84462
|
-
{ kind: "Field", name: { kind: "Name", value: "delay" } },
|
84463
|
-
{ kind: "Field", name: { kind: "Name", value: "enabled" } },
|
84464
|
-
{ kind: "Field", name: { kind: "Name", value: "param" } },
|
84465
|
-
],
|
84466
|
-
},
|
84467
|
-
},
|
84468
|
-
],
|
84469
|
-
};
|
84470
|
-
const AdminJobStatusPayloadFragmentDoc = {
|
84471
|
-
kind: "Document",
|
84472
|
-
definitions: [
|
84473
|
-
{
|
84474
|
-
kind: "FragmentDefinition",
|
84475
|
-
name: { kind: "Name", value: "AdminJobStatusPayload" },
|
84476
|
-
typeCondition: { kind: "NamedType", name: { kind: "Name", value: "AdminJobStatusPayload" } },
|
84477
|
-
selectionSet: {
|
84478
|
-
kind: "SelectionSet",
|
84479
|
-
selections: [
|
84480
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } },
|
84481
|
-
{ kind: "Field", name: { kind: "Name", value: "availableJobs" } },
|
84482
|
-
{
|
84483
|
-
kind: "Field",
|
84484
|
-
name: { kind: "Name", value: "configuration" },
|
84485
|
-
selectionSet: {
|
84486
|
-
kind: "SelectionSet",
|
84487
|
-
selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "AdminJobConfigurationPayload" } }],
|
84488
|
-
},
|
84489
|
-
},
|
84490
|
-
{ kind: "Field", name: { kind: "Name", value: "cursor" } },
|
84491
|
-
{ kind: "Field", name: { kind: "Name", value: "startedAt" } },
|
84492
|
-
],
|
84493
|
-
},
|
84494
|
-
},
|
84495
|
-
...AdminJobConfigurationPayloadFragmentDoc.definitions,
|
84496
|
-
],
|
84497
|
-
};
|
84498
84413
|
const ApiKeyFragmentDoc = {
|
84499
84414
|
kind: "Document",
|
84500
84415
|
definitions: [
|
@@ -87361,6 +87276,80 @@ const NotificationSubscriptionPayloadFragmentDoc = {
|
|
87361
87276
|
...NotificationSubscriptionFragmentDoc.definitions,
|
87362
87277
|
],
|
87363
87278
|
};
|
87279
|
+
const OauthClientFragmentDoc = {
|
87280
|
+
kind: "Document",
|
87281
|
+
definitions: [
|
87282
|
+
{
|
87283
|
+
kind: "FragmentDefinition",
|
87284
|
+
name: { kind: "Name", value: "OauthClient" },
|
87285
|
+
typeCondition: { kind: "NamedType", name: { kind: "Name", value: "OauthClient" } },
|
87286
|
+
selectionSet: {
|
87287
|
+
kind: "SelectionSet",
|
87288
|
+
selections: [
|
87289
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } },
|
87290
|
+
{ kind: "Field", name: { kind: "Name", value: "imageUrl" } },
|
87291
|
+
{ kind: "Field", name: { kind: "Name", value: "description" } },
|
87292
|
+
{ kind: "Field", name: { kind: "Name", value: "redirectUris" } },
|
87293
|
+
{ kind: "Field", name: { kind: "Name", value: "developer" } },
|
87294
|
+
{ kind: "Field", name: { kind: "Name", value: "clientId" } },
|
87295
|
+
{ kind: "Field", name: { kind: "Name", value: "name" } },
|
87296
|
+
{ kind: "Field", name: { kind: "Name", value: "clientSecret" } },
|
87297
|
+
{ kind: "Field", name: { kind: "Name", value: "updatedAt" } },
|
87298
|
+
{ kind: "Field", name: { kind: "Name", value: "webhookResourceTypes" } },
|
87299
|
+
{ kind: "Field", name: { kind: "Name", value: "archivedAt" } },
|
87300
|
+
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
|
87301
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
87302
|
+
{
|
87303
|
+
kind: "Field",
|
87304
|
+
name: { kind: "Name", value: "creator" },
|
87305
|
+
selectionSet: {
|
87306
|
+
kind: "SelectionSet",
|
87307
|
+
selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
|
87308
|
+
},
|
87309
|
+
},
|
87310
|
+
{ kind: "Field", name: { kind: "Name", value: "developerUrl" } },
|
87311
|
+
{ kind: "Field", name: { kind: "Name", value: "webhookUrl" } },
|
87312
|
+
{ kind: "Field", name: { kind: "Name", value: "webhookSecret" } },
|
87313
|
+
{ kind: "Field", name: { kind: "Name", value: "publicEnabled" } },
|
87314
|
+
],
|
87315
|
+
},
|
87316
|
+
},
|
87317
|
+
],
|
87318
|
+
};
|
87319
|
+
const OauthClientConnectionFragmentDoc = {
|
87320
|
+
kind: "Document",
|
87321
|
+
definitions: [
|
87322
|
+
{
|
87323
|
+
kind: "FragmentDefinition",
|
87324
|
+
name: { kind: "Name", value: "OauthClientConnection" },
|
87325
|
+
typeCondition: { kind: "NamedType", name: { kind: "Name", value: "OauthClientConnection" } },
|
87326
|
+
selectionSet: {
|
87327
|
+
kind: "SelectionSet",
|
87328
|
+
selections: [
|
87329
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } },
|
87330
|
+
{
|
87331
|
+
kind: "Field",
|
87332
|
+
name: { kind: "Name", value: "nodes" },
|
87333
|
+
selectionSet: {
|
87334
|
+
kind: "SelectionSet",
|
87335
|
+
selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "OauthClient" } }],
|
87336
|
+
},
|
87337
|
+
},
|
87338
|
+
{
|
87339
|
+
kind: "Field",
|
87340
|
+
name: { kind: "Name", value: "pageInfo" },
|
87341
|
+
selectionSet: {
|
87342
|
+
kind: "SelectionSet",
|
87343
|
+
selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PageInfo" } }],
|
87344
|
+
},
|
87345
|
+
},
|
87346
|
+
],
|
87347
|
+
},
|
87348
|
+
},
|
87349
|
+
...OauthClientFragmentDoc.definitions,
|
87350
|
+
...PageInfoFragmentDoc.definitions,
|
87351
|
+
],
|
87352
|
+
};
|
87364
87353
|
const OrganizationCancelDeletePayloadFragmentDoc = {
|
87365
87354
|
kind: "Document",
|
87366
87355
|
definitions: [
|
@@ -92021,6 +92010,54 @@ const IntegrationSlackImportEmojisDocument = {
|
|
92021
92010
|
...IntegrationPayloadFragmentDoc.definitions,
|
92022
92011
|
],
|
92023
92012
|
};
|
92013
|
+
const IntegrationSlackIntakeDocument = {
|
92014
|
+
kind: "Document",
|
92015
|
+
definitions: [
|
92016
|
+
{
|
92017
|
+
kind: "OperationDefinition",
|
92018
|
+
operation: "mutation",
|
92019
|
+
name: { kind: "Name", value: "integrationSlackIntake" },
|
92020
|
+
variableDefinitions: [
|
92021
|
+
{
|
92022
|
+
kind: "VariableDefinition",
|
92023
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "code" } },
|
92024
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
|
92025
|
+
},
|
92026
|
+
{
|
92027
|
+
kind: "VariableDefinition",
|
92028
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "redirectUri" } },
|
92029
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
|
92030
|
+
},
|
92031
|
+
],
|
92032
|
+
selectionSet: {
|
92033
|
+
kind: "SelectionSet",
|
92034
|
+
selections: [
|
92035
|
+
{
|
92036
|
+
kind: "Field",
|
92037
|
+
name: { kind: "Name", value: "integrationSlackIntake" },
|
92038
|
+
arguments: [
|
92039
|
+
{
|
92040
|
+
kind: "Argument",
|
92041
|
+
name: { kind: "Name", value: "code" },
|
92042
|
+
value: { kind: "Variable", name: { kind: "Name", value: "code" } },
|
92043
|
+
},
|
92044
|
+
{
|
92045
|
+
kind: "Argument",
|
92046
|
+
name: { kind: "Name", value: "redirectUri" },
|
92047
|
+
value: { kind: "Variable", name: { kind: "Name", value: "redirectUri" } },
|
92048
|
+
},
|
92049
|
+
],
|
92050
|
+
selectionSet: {
|
92051
|
+
kind: "SelectionSet",
|
92052
|
+
selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "IntegrationPayload" } }],
|
92053
|
+
},
|
92054
|
+
},
|
92055
|
+
],
|
92056
|
+
},
|
92057
|
+
},
|
92058
|
+
...IntegrationPayloadFragmentDoc.definitions,
|
92059
|
+
],
|
92060
|
+
};
|
92024
92061
|
const IntegrationSlackOrgProjectUpdatesPostDocument = {
|
92025
92062
|
kind: "Document",
|
92026
92063
|
definitions: [
|
@@ -108668,7 +108705,6 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
|
|
108668
108705
|
GithubRepoFragmentDoc: GithubRepoFragmentDoc,
|
108669
108706
|
GithubOrgFragmentDoc: GithubOrgFragmentDoc,
|
108670
108707
|
GithubOAuthTokenPayloadFragmentDoc: GithubOAuthTokenPayloadFragmentDoc,
|
108671
|
-
OauthClientFragmentDoc: OauthClientFragmentDoc,
|
108672
108708
|
UserAuthorizedApplicationFragmentDoc: UserAuthorizedApplicationFragmentDoc,
|
108673
108709
|
ApplicationFragmentDoc: ApplicationFragmentDoc,
|
108674
108710
|
FrontSettingsFragmentDoc: FrontSettingsFragmentDoc,
|
@@ -108685,8 +108721,6 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
|
|
108685
108721
|
IntegrationSettingsFragmentDoc: IntegrationSettingsFragmentDoc,
|
108686
108722
|
SamlConfigurationPayloadFragmentDoc: SamlConfigurationPayloadFragmentDoc,
|
108687
108723
|
UserSettingsFragmentDoc: UserSettingsFragmentDoc,
|
108688
|
-
AdminJobConfigurationPayloadFragmentDoc: AdminJobConfigurationPayloadFragmentDoc,
|
108689
|
-
AdminJobStatusPayloadFragmentDoc: AdminJobStatusPayloadFragmentDoc,
|
108690
108724
|
ApiKeyFragmentDoc: ApiKeyFragmentDoc,
|
108691
108725
|
PageInfoFragmentDoc: PageInfoFragmentDoc,
|
108692
108726
|
ApiKeyConnectionFragmentDoc: ApiKeyConnectionFragmentDoc,
|
@@ -108769,6 +108803,8 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
|
|
108769
108803
|
NotificationSubscriptionFragmentDoc: NotificationSubscriptionFragmentDoc,
|
108770
108804
|
NotificationSubscriptionConnectionFragmentDoc: NotificationSubscriptionConnectionFragmentDoc,
|
108771
108805
|
NotificationSubscriptionPayloadFragmentDoc: NotificationSubscriptionPayloadFragmentDoc,
|
108806
|
+
OauthClientFragmentDoc: OauthClientFragmentDoc,
|
108807
|
+
OauthClientConnectionFragmentDoc: OauthClientConnectionFragmentDoc,
|
108772
108808
|
OrganizationCancelDeletePayloadFragmentDoc: OrganizationCancelDeletePayloadFragmentDoc,
|
108773
108809
|
OrganizationDeletePayloadFragmentDoc: OrganizationDeletePayloadFragmentDoc,
|
108774
108810
|
OrganizationExistsPayloadFragmentDoc: OrganizationExistsPayloadFragmentDoc,
|
@@ -108896,6 +108932,7 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
|
|
108896
108932
|
IntegrationSentryConnectDocument: IntegrationSentryConnectDocument,
|
108897
108933
|
IntegrationSlackDocument: IntegrationSlackDocument,
|
108898
108934
|
IntegrationSlackImportEmojisDocument: IntegrationSlackImportEmojisDocument,
|
108935
|
+
IntegrationSlackIntakeDocument: IntegrationSlackIntakeDocument,
|
108899
108936
|
IntegrationSlackOrgProjectUpdatesPostDocument: IntegrationSlackOrgProjectUpdatesPostDocument,
|
108900
108937
|
IntegrationSlackPersonalDocument: IntegrationSlackPersonalDocument,
|
108901
108938
|
IntegrationSlackPostDocument: IntegrationSlackPostDocument,
|
@@ -109275,38 +109312,6 @@ function parseJson(value) {
|
|
109275
109312
|
return undefined;
|
109276
109313
|
}
|
109277
109314
|
}
|
109278
|
-
/**
|
109279
|
-
* AdminJobConfigurationPayload model
|
109280
|
-
*
|
109281
|
-
* @param request - function to call the graphql client
|
109282
|
-
* @param data - L.AdminJobConfigurationPayloadFragment response data
|
109283
|
-
*/
|
109284
|
-
class AdminJobConfigurationPayload extends Request {
|
109285
|
-
constructor(request, data) {
|
109286
|
-
var _a, _b;
|
109287
|
-
super(request);
|
109288
|
-
this.currentJob = (_a = data.currentJob) !== null && _a !== void 0 ? _a : undefined;
|
109289
|
-
this.delay = data.delay;
|
109290
|
-
this.enabled = data.enabled;
|
109291
|
-
this.param = (_b = data.param) !== null && _b !== void 0 ? _b : undefined;
|
109292
|
-
}
|
109293
|
-
}
|
109294
|
-
/**
|
109295
|
-
* AdminJobStatusPayload model
|
109296
|
-
*
|
109297
|
-
* @param request - function to call the graphql client
|
109298
|
-
* @param data - L.AdminJobStatusPayloadFragment response data
|
109299
|
-
*/
|
109300
|
-
class AdminJobStatusPayload extends Request {
|
109301
|
-
constructor(request, data) {
|
109302
|
-
var _a, _b;
|
109303
|
-
super(request);
|
109304
|
-
this.availableJobs = data.availableJobs;
|
109305
|
-
this.cursor = (_a = data.cursor) !== null && _a !== void 0 ? _a : undefined;
|
109306
|
-
this.startedAt = (_b = parseDate(data.startedAt)) !== null && _b !== void 0 ? _b : undefined;
|
109307
|
-
this.configuration = new AdminJobConfigurationPayload(request, data.configuration);
|
109308
|
-
}
|
109309
|
-
}
|
109310
109315
|
/**
|
109311
109316
|
* An API key. Grants access to the user's resources.
|
109312
109317
|
*
|
@@ -111485,7 +111490,7 @@ class NotionSettings extends Request {
|
|
111485
111490
|
*/
|
111486
111491
|
class OauthClient extends Request {
|
111487
111492
|
constructor(request, data) {
|
111488
|
-
var _a, _b, _c, _d, _e, _f;
|
111493
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
111489
111494
|
super(request);
|
111490
111495
|
this.archivedAt = (_a = parseDate(data.archivedAt)) !== null && _a !== void 0 ? _a : undefined;
|
111491
111496
|
this.clientId = data.clientId;
|
@@ -111501,7 +111506,8 @@ class OauthClient extends Request {
|
|
111501
111506
|
this.redirectUris = data.redirectUris;
|
111502
111507
|
this.updatedAt = (_e = parseDate(data.updatedAt)) !== null && _e !== void 0 ? _e : new Date();
|
111503
111508
|
this.webhookResourceTypes = data.webhookResourceTypes;
|
111504
|
-
this.
|
111509
|
+
this.webhookSecret = (_f = data.webhookSecret) !== null && _f !== void 0 ? _f : undefined;
|
111510
|
+
this.webhookUrl = (_g = data.webhookUrl) !== null && _g !== void 0 ? _g : undefined;
|
111505
111511
|
this._creator = data.creator;
|
111506
111512
|
}
|
111507
111513
|
/** The user who created the OAuthClient. */
|
@@ -111568,6 +111574,18 @@ class OauthClientApprovalNotification extends Request {
|
|
111568
111574
|
return new UserQuery(this._request).fetch(this._user.id);
|
111569
111575
|
}
|
111570
111576
|
}
|
111577
|
+
/**
|
111578
|
+
* OauthClientConnection model
|
111579
|
+
*
|
111580
|
+
* @param request - function to call the graphql client
|
111581
|
+
* @param fetch - function to trigger a refetch of this OauthClientConnection model
|
111582
|
+
* @param data - OauthClientConnection response data
|
111583
|
+
*/
|
111584
|
+
class OauthClientConnection extends Connection {
|
111585
|
+
constructor(request, fetch, data) {
|
111586
|
+
super(request, fetch, data.nodes.map(node => new OauthClient(request, node)), new PageInfo(request, data.pageInfo));
|
111587
|
+
}
|
111588
|
+
}
|
111571
111589
|
/**
|
111572
111590
|
* An organization. Organizations are root-level objects that contain user accounts and teams.
|
111573
111591
|
*
|
@@ -115211,6 +115229,33 @@ class IntegrationSlackImportEmojisMutation extends Request {
|
|
115211
115229
|
});
|
115212
115230
|
}
|
115213
115231
|
}
|
115232
|
+
/**
|
115233
|
+
* A fetchable IntegrationSlackIntake Mutation
|
115234
|
+
*
|
115235
|
+
* @param request - function to call the graphql client
|
115236
|
+
*/
|
115237
|
+
class IntegrationSlackIntakeMutation extends Request {
|
115238
|
+
constructor(request) {
|
115239
|
+
super(request);
|
115240
|
+
}
|
115241
|
+
/**
|
115242
|
+
* Call the IntegrationSlackIntake mutation and return a IntegrationPayload
|
115243
|
+
*
|
115244
|
+
* @param code - required code to pass to integrationSlackIntake
|
115245
|
+
* @param redirectUri - required redirectUri to pass to integrationSlackIntake
|
115246
|
+
* @returns parsed response from IntegrationSlackIntakeMutation
|
115247
|
+
*/
|
115248
|
+
fetch(code, redirectUri) {
|
115249
|
+
return __awaiter(this, void 0, void 0, function* () {
|
115250
|
+
const response = yield this._request(IntegrationSlackIntakeDocument, {
|
115251
|
+
code,
|
115252
|
+
redirectUri,
|
115253
|
+
});
|
115254
|
+
const data = response.integrationSlackIntake;
|
115255
|
+
return new IntegrationPayload(this._request, data);
|
115256
|
+
});
|
115257
|
+
}
|
115258
|
+
}
|
115214
115259
|
/**
|
115215
115260
|
* A fetchable IntegrationSlackOrgProjectUpdatesPost Mutation
|
115216
115261
|
*
|
@@ -122177,6 +122222,16 @@ class LinearSdk extends Request {
|
|
122177
122222
|
integrationSlackImportEmojis(code, redirectUri) {
|
122178
122223
|
return new IntegrationSlackImportEmojisMutation(this._request).fetch(code, redirectUri);
|
122179
122224
|
}
|
122225
|
+
/**
|
122226
|
+
* Integrates the organization with Slack for issue intake.
|
122227
|
+
*
|
122228
|
+
* @param code - required code to pass to integrationSlackIntake
|
122229
|
+
* @param redirectUri - required redirectUri to pass to integrationSlackIntake
|
122230
|
+
* @returns IntegrationPayload
|
122231
|
+
*/
|
122232
|
+
integrationSlackIntake(code, redirectUri) {
|
122233
|
+
return new IntegrationSlackIntakeMutation(this._request).fetch(code, redirectUri);
|
122234
|
+
}
|
122180
122235
|
/**
|
122181
122236
|
* Slack integration for organization level project update notifications.
|
122182
122237
|
*
|
@@ -123974,8 +124029,39 @@ class LinearClient extends LinearSdk {
|
|
123974
124029
|
}
|
123975
124030
|
}
|
123976
124031
|
|
123977
|
-
|
123978
|
-
|
124032
|
+
const LINEAR_WEBHOOK_SIGNATURE_HEADER = "linear-signature";
|
124033
|
+
const LINEAR_WEBHOOK_TS_FIELD = "webhookTimestamp";
|
124034
|
+
/**
|
124035
|
+
* Provides helper functions to work with Linear webhooks
|
124036
|
+
*/
|
124037
|
+
class LinearWebhooks {
|
124038
|
+
constructor(secret) {
|
124039
|
+
this.secret = secret;
|
124040
|
+
}
|
124041
|
+
/**
|
124042
|
+
* Verify the webhook signature
|
124043
|
+
* @param rawBody The webhook request raw body.
|
124044
|
+
* @param signature The signature to verify.
|
124045
|
+
* @param timestamp The `webhookTimestamp` field from the request parsed body.
|
124046
|
+
*/
|
124047
|
+
verify(rawBody, signature, timestamp) {
|
124048
|
+
const verificationBuffer = Buffer.from(crypto__default["default"].createHmac("sha256", this.secret).update(rawBody).digest("hex"));
|
124049
|
+
const signatureBuffer = Buffer.from(signature);
|
124050
|
+
if (verificationBuffer.length !== signatureBuffer.length) {
|
124051
|
+
throw new Error("Invalid webhook signature");
|
124052
|
+
}
|
124053
|
+
if (!crypto__default["default"].timingSafeEqual(verificationBuffer, signatureBuffer)) {
|
124054
|
+
throw new Error("Invalid webhook signature");
|
124055
|
+
}
|
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");
|
124060
|
+
}
|
124061
|
+
return true;
|
124062
|
+
}
|
124063
|
+
}
|
124064
|
+
|
123979
124065
|
exports.AdministrableTeamsQuery = AdministrableTeamsQuery;
|
123980
124066
|
exports.AirbyteIntegrationConnectMutation = AirbyteIntegrationConnectMutation;
|
123981
124067
|
exports.ApiKey = ApiKey;
|
@@ -124174,6 +124260,7 @@ exports.IntegrationRequestPayload = IntegrationRequestPayload;
|
|
124174
124260
|
exports.IntegrationSentryConnectMutation = IntegrationSentryConnectMutation;
|
124175
124261
|
exports.IntegrationSettings = IntegrationSettings;
|
124176
124262
|
exports.IntegrationSlackImportEmojisMutation = IntegrationSlackImportEmojisMutation;
|
124263
|
+
exports.IntegrationSlackIntakeMutation = IntegrationSlackIntakeMutation;
|
124177
124264
|
exports.IntegrationSlackMutation = IntegrationSlackMutation;
|
124178
124265
|
exports.IntegrationSlackOrgProjectUpdatesPostMutation = IntegrationSlackOrgProjectUpdatesPostMutation;
|
124179
124266
|
exports.IntegrationSlackPersonalMutation = IntegrationSlackPersonalMutation;
|
@@ -124248,6 +124335,8 @@ exports.JiraLinearMapping = JiraLinearMapping;
|
|
124248
124335
|
exports.JiraProjectData = JiraProjectData;
|
124249
124336
|
exports.JiraSettings = JiraSettings;
|
124250
124337
|
exports.JoinOrganizationFromOnboardingMutation = JoinOrganizationFromOnboardingMutation;
|
124338
|
+
exports.LINEAR_WEBHOOK_SIGNATURE_HEADER = LINEAR_WEBHOOK_SIGNATURE_HEADER;
|
124339
|
+
exports.LINEAR_WEBHOOK_TS_FIELD = LINEAR_WEBHOOK_TS_FIELD;
|
124251
124340
|
exports.LeaveOrganizationMutation = LeaveOrganizationMutation;
|
124252
124341
|
exports.LinearClient = LinearClient;
|
124253
124342
|
exports.LinearConnection = LinearConnection;
|
@@ -124256,6 +124345,7 @@ exports.LinearError = LinearError;
|
|
124256
124345
|
exports.LinearGraphQLClient = LinearGraphQLClient;
|
124257
124346
|
exports.LinearGraphQLError = LinearGraphQLError;
|
124258
124347
|
exports.LinearSdk = LinearSdk;
|
124348
|
+
exports.LinearWebhooks = LinearWebhooks;
|
124259
124349
|
exports.LockTimeoutLinearError = LockTimeoutLinearError;
|
124260
124350
|
exports.LogoutMutation = LogoutMutation;
|
124261
124351
|
exports.LogoutResponse = LogoutResponse;
|
@@ -124275,6 +124365,7 @@ exports.NotionSettings = NotionSettings;
|
|
124275
124365
|
exports.OauthClient = OauthClient;
|
124276
124366
|
exports.OauthClientApproval = OauthClientApproval;
|
124277
124367
|
exports.OauthClientApprovalNotification = OauthClientApprovalNotification;
|
124368
|
+
exports.OauthClientConnection = OauthClientConnection;
|
124278
124369
|
exports.Organization = Organization;
|
124279
124370
|
exports.OrganizationCancelDeletePayload = OrganizationCancelDeletePayload;
|
124280
124371
|
exports.OrganizationDeleteChallengeMutation = OrganizationDeleteChallengeMutation;
|