@linear/sdk 2.3.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/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.
@@ -83461,6 +83463,14 @@ var PushSubscriptionType;
83461
83463
  PushSubscriptionType["Apple"] = "apple";
83462
83464
  PushSubscriptionType["Web"] = "web";
83463
83465
  })(PushSubscriptionType || (PushSubscriptionType = {}));
83466
+ /** Features release channel */
83467
+ var ReleaseChannel;
83468
+ (function (ReleaseChannel) {
83469
+ ReleaseChannel["Beta"] = "beta";
83470
+ ReleaseChannel["Internal"] = "internal";
83471
+ ReleaseChannel["PreRelease"] = "preRelease";
83472
+ ReleaseChannel["Public"] = "public";
83473
+ })(ReleaseChannel || (ReleaseChannel = {}));
83464
83474
  var SlaStatus;
83465
83475
  (function (SlaStatus) {
83466
83476
  SlaStatus["Breached"] = "Breached";
@@ -83541,7 +83551,6 @@ var ViewType;
83541
83551
  ViewType["MyIssuesActivity"] = "myIssuesActivity";
83542
83552
  ViewType["MyIssuesCreatedByMe"] = "myIssuesCreatedByMe";
83543
83553
  ViewType["MyIssuesSubscribedTo"] = "myIssuesSubscribedTo";
83544
- ViewType["MyIssuesTouchedByMe"] = "myIssuesTouchedByMe";
83545
83554
  ViewType["Project"] = "project";
83546
83555
  ViewType["Projects"] = "projects";
83547
83556
  ViewType["ProjectsAll"] = "projectsAll";
@@ -83559,7 +83568,6 @@ var ViewType;
83559
83568
  })(ViewType || (ViewType = {}));
83560
83569
  var WorkflowTrigger;
83561
83570
  (function (WorkflowTrigger) {
83562
- WorkflowTrigger["Cron"] = "cron";
83563
83571
  WorkflowTrigger["EntityCreated"] = "entityCreated";
83564
83572
  WorkflowTrigger["EntityCreatedOrUpdated"] = "entityCreatedOrUpdated";
83565
83573
  WorkflowTrigger["EntityRemoved"] = "entityRemoved";
@@ -83574,7 +83582,6 @@ var WorkflowTriggerType;
83574
83582
  var WorkflowType;
83575
83583
  (function (WorkflowType) {
83576
83584
  WorkflowType["Custom"] = "custom";
83577
- WorkflowType["RecurringIssue"] = "recurringIssue";
83578
83585
  WorkflowType["Sla"] = "sla";
83579
83586
  })(WorkflowType || (WorkflowType = {}));
83580
83587
  const EntityFragmentDoc = {
@@ -83961,45 +83968,6 @@ const GithubOAuthTokenPayloadFragmentDoc = {
83961
83968
  ...GithubOrgFragmentDoc.definitions,
83962
83969
  ],
83963
83970
  };
83964
- const OauthClientFragmentDoc = {
83965
- kind: "Document",
83966
- definitions: [
83967
- {
83968
- kind: "FragmentDefinition",
83969
- name: { kind: "Name", value: "OauthClient" },
83970
- typeCondition: { kind: "NamedType", name: { kind: "Name", value: "OauthClient" } },
83971
- selectionSet: {
83972
- kind: "SelectionSet",
83973
- selections: [
83974
- { kind: "Field", name: { kind: "Name", value: "__typename" } },
83975
- { kind: "Field", name: { kind: "Name", value: "imageUrl" } },
83976
- { kind: "Field", name: { kind: "Name", value: "description" } },
83977
- { kind: "Field", name: { kind: "Name", value: "redirectUris" } },
83978
- { kind: "Field", name: { kind: "Name", value: "developer" } },
83979
- { kind: "Field", name: { kind: "Name", value: "clientId" } },
83980
- { kind: "Field", name: { kind: "Name", value: "name" } },
83981
- { kind: "Field", name: { kind: "Name", value: "clientSecret" } },
83982
- { kind: "Field", name: { kind: "Name", value: "updatedAt" } },
83983
- { kind: "Field", name: { kind: "Name", value: "webhookResourceTypes" } },
83984
- { kind: "Field", name: { kind: "Name", value: "archivedAt" } },
83985
- { kind: "Field", name: { kind: "Name", value: "createdAt" } },
83986
- { kind: "Field", name: { kind: "Name", value: "id" } },
83987
- {
83988
- kind: "Field",
83989
- name: { kind: "Name", value: "creator" },
83990
- selectionSet: {
83991
- kind: "SelectionSet",
83992
- selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
83993
- },
83994
- },
83995
- { kind: "Field", name: { kind: "Name", value: "developerUrl" } },
83996
- { kind: "Field", name: { kind: "Name", value: "webhookUrl" } },
83997
- { kind: "Field", name: { kind: "Name", value: "publicEnabled" } },
83998
- ],
83999
- },
84000
- },
84001
- ],
84002
- };
84003
83971
  const UserAuthorizedApplicationFragmentDoc = {
84004
83972
  kind: "Document",
84005
83973
  definitions: [
@@ -84442,54 +84410,6 @@ const UserSettingsFragmentDoc = {
84442
84410
  },
84443
84411
  ],
84444
84412
  };
84445
- const AdminJobConfigurationPayloadFragmentDoc = {
84446
- kind: "Document",
84447
- definitions: [
84448
- {
84449
- kind: "FragmentDefinition",
84450
- name: { kind: "Name", value: "AdminJobConfigurationPayload" },
84451
- typeCondition: { kind: "NamedType", name: { kind: "Name", value: "AdminJobConfigurationPayload" } },
84452
- selectionSet: {
84453
- kind: "SelectionSet",
84454
- selections: [
84455
- { kind: "Field", name: { kind: "Name", value: "__typename" } },
84456
- { kind: "Field", name: { kind: "Name", value: "currentJob" } },
84457
- { kind: "Field", name: { kind: "Name", value: "delay" } },
84458
- { kind: "Field", name: { kind: "Name", value: "enabled" } },
84459
- { kind: "Field", name: { kind: "Name", value: "param" } },
84460
- ],
84461
- },
84462
- },
84463
- ],
84464
- };
84465
- const AdminJobStatusPayloadFragmentDoc = {
84466
- kind: "Document",
84467
- definitions: [
84468
- {
84469
- kind: "FragmentDefinition",
84470
- name: { kind: "Name", value: "AdminJobStatusPayload" },
84471
- typeCondition: { kind: "NamedType", name: { kind: "Name", value: "AdminJobStatusPayload" } },
84472
- selectionSet: {
84473
- kind: "SelectionSet",
84474
- selections: [
84475
- { kind: "Field", name: { kind: "Name", value: "__typename" } },
84476
- { kind: "Field", name: { kind: "Name", value: "availableJobs" } },
84477
- {
84478
- kind: "Field",
84479
- name: { kind: "Name", value: "configuration" },
84480
- selectionSet: {
84481
- kind: "SelectionSet",
84482
- selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "AdminJobConfigurationPayload" } }],
84483
- },
84484
- },
84485
- { kind: "Field", name: { kind: "Name", value: "cursor" } },
84486
- { kind: "Field", name: { kind: "Name", value: "startedAt" } },
84487
- ],
84488
- },
84489
- },
84490
- ...AdminJobConfigurationPayloadFragmentDoc.definitions,
84491
- ],
84492
- };
84493
84413
  const ApiKeyFragmentDoc = {
84494
84414
  kind: "Document",
84495
84415
  definitions: [
@@ -87356,6 +87276,80 @@ const NotificationSubscriptionPayloadFragmentDoc = {
87356
87276
  ...NotificationSubscriptionFragmentDoc.definitions,
87357
87277
  ],
87358
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
+ };
87359
87353
  const OrganizationCancelDeletePayloadFragmentDoc = {
87360
87354
  kind: "Document",
87361
87355
  definitions: [
@@ -87772,6 +87766,7 @@ const ProjectMilestoneFragmentDoc = {
87772
87766
  { kind: "Field", name: { kind: "Name", value: "description" } },
87773
87767
  { kind: "Field", name: { kind: "Name", value: "updatedAt" } },
87774
87768
  { kind: "Field", name: { kind: "Name", value: "name" } },
87769
+ { kind: "Field", name: { kind: "Name", value: "sortOrder" } },
87775
87770
  { kind: "Field", name: { kind: "Name", value: "targetDate" } },
87776
87771
  {
87777
87772
  kind: "Field",
@@ -89296,6 +89291,82 @@ const WebhookPayloadFragmentDoc = {
89296
89291
  },
89297
89292
  ],
89298
89293
  };
89294
+ const WorkflowCronJobDefinitionFragmentDoc = {
89295
+ kind: "Document",
89296
+ definitions: [
89297
+ {
89298
+ kind: "FragmentDefinition",
89299
+ name: { kind: "Name", value: "WorkflowCronJobDefinition" },
89300
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "WorkflowCronJobDefinition" } },
89301
+ selectionSet: {
89302
+ kind: "SelectionSet",
89303
+ selections: [
89304
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
89305
+ { kind: "Field", name: { kind: "Name", value: "activities" } },
89306
+ { kind: "Field", name: { kind: "Name", value: "schedule" } },
89307
+ { kind: "Field", name: { kind: "Name", value: "description" } },
89308
+ { kind: "Field", name: { kind: "Name", value: "updatedAt" } },
89309
+ { kind: "Field", name: { kind: "Name", value: "name" } },
89310
+ { kind: "Field", name: { kind: "Name", value: "sortOrder" } },
89311
+ {
89312
+ kind: "Field",
89313
+ name: { kind: "Name", value: "team" },
89314
+ selectionSet: {
89315
+ kind: "SelectionSet",
89316
+ selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
89317
+ },
89318
+ },
89319
+ { kind: "Field", name: { kind: "Name", value: "archivedAt" } },
89320
+ { kind: "Field", name: { kind: "Name", value: "createdAt" } },
89321
+ { kind: "Field", name: { kind: "Name", value: "id" } },
89322
+ {
89323
+ kind: "Field",
89324
+ name: { kind: "Name", value: "creator" },
89325
+ selectionSet: {
89326
+ kind: "SelectionSet",
89327
+ selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
89328
+ },
89329
+ },
89330
+ { kind: "Field", name: { kind: "Name", value: "enabled" } },
89331
+ ],
89332
+ },
89333
+ },
89334
+ ],
89335
+ };
89336
+ const WorkflowCronJobDefinitionConnectionFragmentDoc = {
89337
+ kind: "Document",
89338
+ definitions: [
89339
+ {
89340
+ kind: "FragmentDefinition",
89341
+ name: { kind: "Name", value: "WorkflowCronJobDefinitionConnection" },
89342
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "WorkflowCronJobDefinitionConnection" } },
89343
+ selectionSet: {
89344
+ kind: "SelectionSet",
89345
+ selections: [
89346
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
89347
+ {
89348
+ kind: "Field",
89349
+ name: { kind: "Name", value: "nodes" },
89350
+ selectionSet: {
89351
+ kind: "SelectionSet",
89352
+ selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "WorkflowCronJobDefinition" } }],
89353
+ },
89354
+ },
89355
+ {
89356
+ kind: "Field",
89357
+ name: { kind: "Name", value: "pageInfo" },
89358
+ selectionSet: {
89359
+ kind: "SelectionSet",
89360
+ selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PageInfo" } }],
89361
+ },
89362
+ },
89363
+ ],
89364
+ },
89365
+ },
89366
+ ...WorkflowCronJobDefinitionFragmentDoc.definitions,
89367
+ ...PageInfoFragmentDoc.definitions,
89368
+ ],
89369
+ };
89299
89370
  const WorkflowDefinitionFragmentDoc = {
89300
89371
  kind: "Document",
89301
89372
  definitions: [
@@ -89308,7 +89379,6 @@ const WorkflowDefinitionFragmentDoc = {
89308
89379
  selections: [
89309
89380
  { kind: "Field", name: { kind: "Name", value: "__typename" } },
89310
89381
  { kind: "Field", name: { kind: "Name", value: "activities" } },
89311
- { kind: "Field", name: { kind: "Name", value: "schedule" } },
89312
89382
  { kind: "Field", name: { kind: "Name", value: "conditions" } },
89313
89383
  { kind: "Field", name: { kind: "Name", value: "description" } },
89314
89384
  { kind: "Field", name: { kind: "Name", value: "updatedAt" } },
@@ -91940,6 +92010,54 @@ const IntegrationSlackImportEmojisDocument = {
91940
92010
  ...IntegrationPayloadFragmentDoc.definitions,
91941
92011
  ],
91942
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
+ };
91943
92061
  const IntegrationSlackOrgProjectUpdatesPostDocument = {
91944
92062
  kind: "Document",
91945
92063
  definitions: [
@@ -108565,6 +108683,7 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
108565
108683
  get ProjectUpdateHealthType () { return ProjectUpdateHealthType; },
108566
108684
  get ProjectUpdateReminderFrequency () { return ProjectUpdateReminderFrequency; },
108567
108685
  get PushSubscriptionType () { return PushSubscriptionType; },
108686
+ get ReleaseChannel () { return ReleaseChannel; },
108568
108687
  get SlaStatus () { return SlaStatus; },
108569
108688
  get UserFlagType () { return UserFlagType; },
108570
108689
  get UserFlagUpdateOperation () { return UserFlagUpdateOperation; },
@@ -108586,7 +108705,6 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
108586
108705
  GithubRepoFragmentDoc: GithubRepoFragmentDoc,
108587
108706
  GithubOrgFragmentDoc: GithubOrgFragmentDoc,
108588
108707
  GithubOAuthTokenPayloadFragmentDoc: GithubOAuthTokenPayloadFragmentDoc,
108589
- OauthClientFragmentDoc: OauthClientFragmentDoc,
108590
108708
  UserAuthorizedApplicationFragmentDoc: UserAuthorizedApplicationFragmentDoc,
108591
108709
  ApplicationFragmentDoc: ApplicationFragmentDoc,
108592
108710
  FrontSettingsFragmentDoc: FrontSettingsFragmentDoc,
@@ -108603,8 +108721,6 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
108603
108721
  IntegrationSettingsFragmentDoc: IntegrationSettingsFragmentDoc,
108604
108722
  SamlConfigurationPayloadFragmentDoc: SamlConfigurationPayloadFragmentDoc,
108605
108723
  UserSettingsFragmentDoc: UserSettingsFragmentDoc,
108606
- AdminJobConfigurationPayloadFragmentDoc: AdminJobConfigurationPayloadFragmentDoc,
108607
- AdminJobStatusPayloadFragmentDoc: AdminJobStatusPayloadFragmentDoc,
108608
108724
  ApiKeyFragmentDoc: ApiKeyFragmentDoc,
108609
108725
  PageInfoFragmentDoc: PageInfoFragmentDoc,
108610
108726
  ApiKeyConnectionFragmentDoc: ApiKeyConnectionFragmentDoc,
@@ -108687,6 +108803,8 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
108687
108803
  NotificationSubscriptionFragmentDoc: NotificationSubscriptionFragmentDoc,
108688
108804
  NotificationSubscriptionConnectionFragmentDoc: NotificationSubscriptionConnectionFragmentDoc,
108689
108805
  NotificationSubscriptionPayloadFragmentDoc: NotificationSubscriptionPayloadFragmentDoc,
108806
+ OauthClientFragmentDoc: OauthClientFragmentDoc,
108807
+ OauthClientConnectionFragmentDoc: OauthClientConnectionFragmentDoc,
108690
108808
  OrganizationCancelDeletePayloadFragmentDoc: OrganizationCancelDeletePayloadFragmentDoc,
108691
108809
  OrganizationDeletePayloadFragmentDoc: OrganizationDeletePayloadFragmentDoc,
108692
108810
  OrganizationExistsPayloadFragmentDoc: OrganizationExistsPayloadFragmentDoc,
@@ -108751,6 +108869,8 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
108751
108869
  WebhookFragmentDoc: WebhookFragmentDoc,
108752
108870
  WebhookConnectionFragmentDoc: WebhookConnectionFragmentDoc,
108753
108871
  WebhookPayloadFragmentDoc: WebhookPayloadFragmentDoc,
108872
+ WorkflowCronJobDefinitionFragmentDoc: WorkflowCronJobDefinitionFragmentDoc,
108873
+ WorkflowCronJobDefinitionConnectionFragmentDoc: WorkflowCronJobDefinitionConnectionFragmentDoc,
108754
108874
  WorkflowDefinitionFragmentDoc: WorkflowDefinitionFragmentDoc,
108755
108875
  WorkflowDefinitionConnectionFragmentDoc: WorkflowDefinitionConnectionFragmentDoc,
108756
108876
  WorkflowStateFragmentDoc: WorkflowStateFragmentDoc,
@@ -108812,6 +108932,7 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
108812
108932
  IntegrationSentryConnectDocument: IntegrationSentryConnectDocument,
108813
108933
  IntegrationSlackDocument: IntegrationSlackDocument,
108814
108934
  IntegrationSlackImportEmojisDocument: IntegrationSlackImportEmojisDocument,
108935
+ IntegrationSlackIntakeDocument: IntegrationSlackIntakeDocument,
108815
108936
  IntegrationSlackOrgProjectUpdatesPostDocument: IntegrationSlackOrgProjectUpdatesPostDocument,
108816
108937
  IntegrationSlackPersonalDocument: IntegrationSlackPersonalDocument,
108817
108938
  IntegrationSlackPostDocument: IntegrationSlackPostDocument,
@@ -109191,38 +109312,6 @@ function parseJson(value) {
109191
109312
  return undefined;
109192
109313
  }
109193
109314
  }
109194
- /**
109195
- * AdminJobConfigurationPayload model
109196
- *
109197
- * @param request - function to call the graphql client
109198
- * @param data - L.AdminJobConfigurationPayloadFragment response data
109199
- */
109200
- class AdminJobConfigurationPayload extends Request {
109201
- constructor(request, data) {
109202
- var _a, _b;
109203
- super(request);
109204
- this.currentJob = (_a = data.currentJob) !== null && _a !== void 0 ? _a : undefined;
109205
- this.delay = data.delay;
109206
- this.enabled = data.enabled;
109207
- this.param = (_b = data.param) !== null && _b !== void 0 ? _b : undefined;
109208
- }
109209
- }
109210
- /**
109211
- * AdminJobStatusPayload model
109212
- *
109213
- * @param request - function to call the graphql client
109214
- * @param data - L.AdminJobStatusPayloadFragment response data
109215
- */
109216
- class AdminJobStatusPayload extends Request {
109217
- constructor(request, data) {
109218
- var _a, _b;
109219
- super(request);
109220
- this.availableJobs = data.availableJobs;
109221
- this.cursor = (_a = data.cursor) !== null && _a !== void 0 ? _a : undefined;
109222
- this.startedAt = (_b = parseDate(data.startedAt)) !== null && _b !== void 0 ? _b : undefined;
109223
- this.configuration = new AdminJobConfigurationPayload(request, data.configuration);
109224
- }
109225
- }
109226
109315
  /**
109227
109316
  * An API key. Grants access to the user's resources.
109228
109317
  *
@@ -111401,7 +111490,7 @@ class NotionSettings extends Request {
111401
111490
  */
111402
111491
  class OauthClient extends Request {
111403
111492
  constructor(request, data) {
111404
- var _a, _b, _c, _d, _e, _f;
111493
+ var _a, _b, _c, _d, _e, _f, _g;
111405
111494
  super(request);
111406
111495
  this.archivedAt = (_a = parseDate(data.archivedAt)) !== null && _a !== void 0 ? _a : undefined;
111407
111496
  this.clientId = data.clientId;
@@ -111417,7 +111506,8 @@ class OauthClient extends Request {
111417
111506
  this.redirectUris = data.redirectUris;
111418
111507
  this.updatedAt = (_e = parseDate(data.updatedAt)) !== null && _e !== void 0 ? _e : new Date();
111419
111508
  this.webhookResourceTypes = data.webhookResourceTypes;
111420
- this.webhookUrl = (_f = data.webhookUrl) !== null && _f !== void 0 ? _f : undefined;
111509
+ this.webhookSecret = (_f = data.webhookSecret) !== null && _f !== void 0 ? _f : undefined;
111510
+ this.webhookUrl = (_g = data.webhookUrl) !== null && _g !== void 0 ? _g : undefined;
111421
111511
  this._creator = data.creator;
111422
111512
  }
111423
111513
  /** The user who created the OAuthClient. */
@@ -111484,6 +111574,18 @@ class OauthClientApprovalNotification extends Request {
111484
111574
  return new UserQuery(this._request).fetch(this._user.id);
111485
111575
  }
111486
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
+ }
111487
111589
  /**
111488
111590
  * An organization. Organizations are root-level objects that contain user accounts and teams.
111489
111591
  *
@@ -112003,6 +112105,7 @@ class ProjectMilestone extends Request {
112003
112105
  this.description = (_c = data.description) !== null && _c !== void 0 ? _c : undefined;
112004
112106
  this.id = data.id;
112005
112107
  this.name = data.name;
112108
+ this.sortOrder = data.sortOrder;
112006
112109
  this.targetDate = (_d = data.targetDate) !== null && _d !== void 0 ? _d : undefined;
112007
112110
  this.updatedAt = (_e = parseDate(data.updatedAt)) !== null && _e !== void 0 ? _e : new Date();
112008
112111
  this._project = data.project;
@@ -113510,6 +113613,50 @@ class WebhookPayload extends Request {
113510
113613
  return new WebhookQuery(this._request).fetch(this._webhook.id);
113511
113614
  }
113512
113615
  }
113616
+ /**
113617
+ * WorkflowCronJobDefinition model
113618
+ *
113619
+ * @param request - function to call the graphql client
113620
+ * @param data - L.WorkflowCronJobDefinitionFragment response data
113621
+ */
113622
+ class WorkflowCronJobDefinition extends Request {
113623
+ constructor(request, data) {
113624
+ var _a, _b, _c, _d, _e, _f;
113625
+ super(request);
113626
+ this.activities = (_a = parseJson(data.activities)) !== null && _a !== void 0 ? _a : {};
113627
+ this.archivedAt = (_b = parseDate(data.archivedAt)) !== null && _b !== void 0 ? _b : undefined;
113628
+ this.createdAt = (_c = parseDate(data.createdAt)) !== null && _c !== void 0 ? _c : new Date();
113629
+ this.description = (_d = data.description) !== null && _d !== void 0 ? _d : undefined;
113630
+ this.enabled = data.enabled;
113631
+ this.id = data.id;
113632
+ this.name = data.name;
113633
+ this.schedule = (_e = parseJson(data.schedule)) !== null && _e !== void 0 ? _e : {};
113634
+ this.sortOrder = data.sortOrder;
113635
+ this.updatedAt = (_f = parseDate(data.updatedAt)) !== null && _f !== void 0 ? _f : new Date();
113636
+ this._creator = data.creator;
113637
+ this._team = data.team;
113638
+ }
113639
+ /** The user who created the workflow cron job. */
113640
+ get creator() {
113641
+ return new UserQuery(this._request).fetch(this._creator.id);
113642
+ }
113643
+ /** The team associated with the workflow cron job. */
113644
+ get team() {
113645
+ return new TeamQuery(this._request).fetch(this._team.id);
113646
+ }
113647
+ }
113648
+ /**
113649
+ * WorkflowCronJobDefinitionConnection model
113650
+ *
113651
+ * @param request - function to call the graphql client
113652
+ * @param fetch - function to trigger a refetch of this WorkflowCronJobDefinitionConnection model
113653
+ * @param data - WorkflowCronJobDefinitionConnection response data
113654
+ */
113655
+ class WorkflowCronJobDefinitionConnection extends Connection {
113656
+ constructor(request, fetch, data) {
113657
+ super(request, fetch, data.nodes.map(node => new WorkflowCronJobDefinition(request, node)), new PageInfo(request, data.pageInfo));
113658
+ }
113659
+ }
113513
113660
  /**
113514
113661
  * WorkflowDefinition model
113515
113662
  *
@@ -113518,7 +113665,7 @@ class WebhookPayload extends Request {
113518
113665
  */
113519
113666
  class WorkflowDefinition extends Request {
113520
113667
  constructor(request, data) {
113521
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
113668
+ var _a, _b, _c, _d, _e, _f, _g, _h;
113522
113669
  super(request);
113523
113670
  this.activities = (_a = parseJson(data.activities)) !== null && _a !== void 0 ? _a : {};
113524
113671
  this.archivedAt = (_b = parseDate(data.archivedAt)) !== null && _b !== void 0 ? _b : undefined;
@@ -113529,11 +113676,10 @@ class WorkflowDefinition extends Request {
113529
113676
  this.groupName = (_f = data.groupName) !== null && _f !== void 0 ? _f : undefined;
113530
113677
  this.id = data.id;
113531
113678
  this.name = data.name;
113532
- this.schedule = (_g = parseJson(data.schedule)) !== null && _g !== void 0 ? _g : {};
113533
113679
  this.sortOrder = data.sortOrder;
113534
- this.updatedAt = (_h = parseDate(data.updatedAt)) !== null && _h !== void 0 ? _h : new Date();
113680
+ this.updatedAt = (_g = parseDate(data.updatedAt)) !== null && _g !== void 0 ? _g : new Date();
113535
113681
  this._creator = data.creator;
113536
- this._team = (_j = data.team) !== null && _j !== void 0 ? _j : undefined;
113682
+ this._team = (_h = data.team) !== null && _h !== void 0 ? _h : undefined;
113537
113683
  }
113538
113684
  /** The user who created the workflow. */
113539
113685
  get creator() {
@@ -115083,6 +115229,33 @@ class IntegrationSlackImportEmojisMutation extends Request {
115083
115229
  });
115084
115230
  }
115085
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
+ }
115086
115259
  /**
115087
115260
  * A fetchable IntegrationSlackOrgProjectUpdatesPost Mutation
115088
115261
  *
@@ -122049,6 +122222,16 @@ class LinearSdk extends Request {
122049
122222
  integrationSlackImportEmojis(code, redirectUri) {
122050
122223
  return new IntegrationSlackImportEmojisMutation(this._request).fetch(code, redirectUri);
122051
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
+ }
122052
122235
  /**
122053
122236
  * Slack integration for organization level project update notifications.
122054
122237
  *
@@ -123846,8 +124029,39 @@ class LinearClient extends LinearSdk {
123846
124029
  }
123847
124030
  }
123848
124031
 
123849
- exports.AdminJobConfigurationPayload = AdminJobConfigurationPayload;
123850
- exports.AdminJobStatusPayload = AdminJobStatusPayload;
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
+
123851
124065
  exports.AdministrableTeamsQuery = AdministrableTeamsQuery;
123852
124066
  exports.AirbyteIntegrationConnectMutation = AirbyteIntegrationConnectMutation;
123853
124067
  exports.ApiKey = ApiKey;
@@ -124046,6 +124260,7 @@ exports.IntegrationRequestPayload = IntegrationRequestPayload;
124046
124260
  exports.IntegrationSentryConnectMutation = IntegrationSentryConnectMutation;
124047
124261
  exports.IntegrationSettings = IntegrationSettings;
124048
124262
  exports.IntegrationSlackImportEmojisMutation = IntegrationSlackImportEmojisMutation;
124263
+ exports.IntegrationSlackIntakeMutation = IntegrationSlackIntakeMutation;
124049
124264
  exports.IntegrationSlackMutation = IntegrationSlackMutation;
124050
124265
  exports.IntegrationSlackOrgProjectUpdatesPostMutation = IntegrationSlackOrgProjectUpdatesPostMutation;
124051
124266
  exports.IntegrationSlackPersonalMutation = IntegrationSlackPersonalMutation;
@@ -124120,6 +124335,8 @@ exports.JiraLinearMapping = JiraLinearMapping;
124120
124335
  exports.JiraProjectData = JiraProjectData;
124121
124336
  exports.JiraSettings = JiraSettings;
124122
124337
  exports.JoinOrganizationFromOnboardingMutation = JoinOrganizationFromOnboardingMutation;
124338
+ exports.LINEAR_WEBHOOK_SIGNATURE_HEADER = LINEAR_WEBHOOK_SIGNATURE_HEADER;
124339
+ exports.LINEAR_WEBHOOK_TS_FIELD = LINEAR_WEBHOOK_TS_FIELD;
124123
124340
  exports.LeaveOrganizationMutation = LeaveOrganizationMutation;
124124
124341
  exports.LinearClient = LinearClient;
124125
124342
  exports.LinearConnection = LinearConnection;
@@ -124128,6 +124345,7 @@ exports.LinearError = LinearError;
124128
124345
  exports.LinearGraphQLClient = LinearGraphQLClient;
124129
124346
  exports.LinearGraphQLError = LinearGraphQLError;
124130
124347
  exports.LinearSdk = LinearSdk;
124348
+ exports.LinearWebhooks = LinearWebhooks;
124131
124349
  exports.LockTimeoutLinearError = LockTimeoutLinearError;
124132
124350
  exports.LogoutMutation = LogoutMutation;
124133
124351
  exports.LogoutResponse = LogoutResponse;
@@ -124147,6 +124365,7 @@ exports.NotionSettings = NotionSettings;
124147
124365
  exports.OauthClient = OauthClient;
124148
124366
  exports.OauthClientApproval = OauthClientApproval;
124149
124367
  exports.OauthClientApprovalNotification = OauthClientApprovalNotification;
124368
+ exports.OauthClientConnection = OauthClientConnection;
124150
124369
  exports.Organization = Organization;
124151
124370
  exports.OrganizationCancelDeletePayload = OrganizationCancelDeletePayload;
124152
124371
  exports.OrganizationDeleteChallengeMutation = OrganizationDeleteChallengeMutation;
@@ -124349,6 +124568,8 @@ exports.WebhookConnection = WebhookConnection;
124349
124568
  exports.WebhookPayload = WebhookPayload;
124350
124569
  exports.WebhookQuery = WebhookQuery;
124351
124570
  exports.WebhooksQuery = WebhooksQuery;
124571
+ exports.WorkflowCronJobDefinition = WorkflowCronJobDefinition;
124572
+ exports.WorkflowCronJobDefinitionConnection = WorkflowCronJobDefinitionConnection;
124352
124573
  exports.WorkflowDefinition = WorkflowDefinition;
124353
124574
  exports.WorkflowDefinitionConnection = WorkflowDefinitionConnection;
124354
124575
  exports.WorkflowState = WorkflowState;