@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-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.3.0"};
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);
@@ -1433,6 +1437,14 @@
1433
1437
  PushSubscriptionType["Apple"] = "apple";
1434
1438
  PushSubscriptionType["Web"] = "web";
1435
1439
  })(PushSubscriptionType || (PushSubscriptionType = {}));
1440
+ /** Features release channel */
1441
+ var ReleaseChannel;
1442
+ (function (ReleaseChannel) {
1443
+ ReleaseChannel["Beta"] = "beta";
1444
+ ReleaseChannel["Internal"] = "internal";
1445
+ ReleaseChannel["PreRelease"] = "preRelease";
1446
+ ReleaseChannel["Public"] = "public";
1447
+ })(ReleaseChannel || (ReleaseChannel = {}));
1436
1448
  var SlaStatus;
1437
1449
  (function (SlaStatus) {
1438
1450
  SlaStatus["Breached"] = "Breached";
@@ -1513,7 +1525,6 @@
1513
1525
  ViewType["MyIssuesActivity"] = "myIssuesActivity";
1514
1526
  ViewType["MyIssuesCreatedByMe"] = "myIssuesCreatedByMe";
1515
1527
  ViewType["MyIssuesSubscribedTo"] = "myIssuesSubscribedTo";
1516
- ViewType["MyIssuesTouchedByMe"] = "myIssuesTouchedByMe";
1517
1528
  ViewType["Project"] = "project";
1518
1529
  ViewType["Projects"] = "projects";
1519
1530
  ViewType["ProjectsAll"] = "projectsAll";
@@ -1531,7 +1542,6 @@
1531
1542
  })(ViewType || (ViewType = {}));
1532
1543
  var WorkflowTrigger;
1533
1544
  (function (WorkflowTrigger) {
1534
- WorkflowTrigger["Cron"] = "cron";
1535
1545
  WorkflowTrigger["EntityCreated"] = "entityCreated";
1536
1546
  WorkflowTrigger["EntityCreatedOrUpdated"] = "entityCreatedOrUpdated";
1537
1547
  WorkflowTrigger["EntityRemoved"] = "entityRemoved";
@@ -1546,7 +1556,6 @@
1546
1556
  var WorkflowType;
1547
1557
  (function (WorkflowType) {
1548
1558
  WorkflowType["Custom"] = "custom";
1549
- WorkflowType["RecurringIssue"] = "recurringIssue";
1550
1559
  WorkflowType["Sla"] = "sla";
1551
1560
  })(WorkflowType || (WorkflowType = {}));
1552
1561
  const EntityFragmentDoc = {
@@ -1933,45 +1942,6 @@
1933
1942
  ...GithubOrgFragmentDoc.definitions,
1934
1943
  ],
1935
1944
  };
1936
- const OauthClientFragmentDoc = {
1937
- kind: "Document",
1938
- definitions: [
1939
- {
1940
- kind: "FragmentDefinition",
1941
- name: { kind: "Name", value: "OauthClient" },
1942
- typeCondition: { kind: "NamedType", name: { kind: "Name", value: "OauthClient" } },
1943
- selectionSet: {
1944
- kind: "SelectionSet",
1945
- selections: [
1946
- { kind: "Field", name: { kind: "Name", value: "__typename" } },
1947
- { kind: "Field", name: { kind: "Name", value: "imageUrl" } },
1948
- { kind: "Field", name: { kind: "Name", value: "description" } },
1949
- { kind: "Field", name: { kind: "Name", value: "redirectUris" } },
1950
- { kind: "Field", name: { kind: "Name", value: "developer" } },
1951
- { kind: "Field", name: { kind: "Name", value: "clientId" } },
1952
- { kind: "Field", name: { kind: "Name", value: "name" } },
1953
- { kind: "Field", name: { kind: "Name", value: "clientSecret" } },
1954
- { kind: "Field", name: { kind: "Name", value: "updatedAt" } },
1955
- { kind: "Field", name: { kind: "Name", value: "webhookResourceTypes" } },
1956
- { kind: "Field", name: { kind: "Name", value: "archivedAt" } },
1957
- { kind: "Field", name: { kind: "Name", value: "createdAt" } },
1958
- { kind: "Field", name: { kind: "Name", value: "id" } },
1959
- {
1960
- kind: "Field",
1961
- name: { kind: "Name", value: "creator" },
1962
- selectionSet: {
1963
- kind: "SelectionSet",
1964
- selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
1965
- },
1966
- },
1967
- { kind: "Field", name: { kind: "Name", value: "developerUrl" } },
1968
- { kind: "Field", name: { kind: "Name", value: "webhookUrl" } },
1969
- { kind: "Field", name: { kind: "Name", value: "publicEnabled" } },
1970
- ],
1971
- },
1972
- },
1973
- ],
1974
- };
1975
1945
  const UserAuthorizedApplicationFragmentDoc = {
1976
1946
  kind: "Document",
1977
1947
  definitions: [
@@ -2414,54 +2384,6 @@
2414
2384
  },
2415
2385
  ],
2416
2386
  };
2417
- const AdminJobConfigurationPayloadFragmentDoc = {
2418
- kind: "Document",
2419
- definitions: [
2420
- {
2421
- kind: "FragmentDefinition",
2422
- name: { kind: "Name", value: "AdminJobConfigurationPayload" },
2423
- typeCondition: { kind: "NamedType", name: { kind: "Name", value: "AdminJobConfigurationPayload" } },
2424
- selectionSet: {
2425
- kind: "SelectionSet",
2426
- selections: [
2427
- { kind: "Field", name: { kind: "Name", value: "__typename" } },
2428
- { kind: "Field", name: { kind: "Name", value: "currentJob" } },
2429
- { kind: "Field", name: { kind: "Name", value: "delay" } },
2430
- { kind: "Field", name: { kind: "Name", value: "enabled" } },
2431
- { kind: "Field", name: { kind: "Name", value: "param" } },
2432
- ],
2433
- },
2434
- },
2435
- ],
2436
- };
2437
- const AdminJobStatusPayloadFragmentDoc = {
2438
- kind: "Document",
2439
- definitions: [
2440
- {
2441
- kind: "FragmentDefinition",
2442
- name: { kind: "Name", value: "AdminJobStatusPayload" },
2443
- typeCondition: { kind: "NamedType", name: { kind: "Name", value: "AdminJobStatusPayload" } },
2444
- selectionSet: {
2445
- kind: "SelectionSet",
2446
- selections: [
2447
- { kind: "Field", name: { kind: "Name", value: "__typename" } },
2448
- { kind: "Field", name: { kind: "Name", value: "availableJobs" } },
2449
- {
2450
- kind: "Field",
2451
- name: { kind: "Name", value: "configuration" },
2452
- selectionSet: {
2453
- kind: "SelectionSet",
2454
- selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "AdminJobConfigurationPayload" } }],
2455
- },
2456
- },
2457
- { kind: "Field", name: { kind: "Name", value: "cursor" } },
2458
- { kind: "Field", name: { kind: "Name", value: "startedAt" } },
2459
- ],
2460
- },
2461
- },
2462
- ...AdminJobConfigurationPayloadFragmentDoc.definitions,
2463
- ],
2464
- };
2465
2387
  const ApiKeyFragmentDoc = {
2466
2388
  kind: "Document",
2467
2389
  definitions: [
@@ -5328,6 +5250,80 @@
5328
5250
  ...NotificationSubscriptionFragmentDoc.definitions,
5329
5251
  ],
5330
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
+ };
5331
5327
  const OrganizationCancelDeletePayloadFragmentDoc = {
5332
5328
  kind: "Document",
5333
5329
  definitions: [
@@ -5744,6 +5740,7 @@
5744
5740
  { kind: "Field", name: { kind: "Name", value: "description" } },
5745
5741
  { kind: "Field", name: { kind: "Name", value: "updatedAt" } },
5746
5742
  { kind: "Field", name: { kind: "Name", value: "name" } },
5743
+ { kind: "Field", name: { kind: "Name", value: "sortOrder" } },
5747
5744
  { kind: "Field", name: { kind: "Name", value: "targetDate" } },
5748
5745
  {
5749
5746
  kind: "Field",
@@ -7268,6 +7265,82 @@
7268
7265
  },
7269
7266
  ],
7270
7267
  };
7268
+ const WorkflowCronJobDefinitionFragmentDoc = {
7269
+ kind: "Document",
7270
+ definitions: [
7271
+ {
7272
+ kind: "FragmentDefinition",
7273
+ name: { kind: "Name", value: "WorkflowCronJobDefinition" },
7274
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "WorkflowCronJobDefinition" } },
7275
+ selectionSet: {
7276
+ kind: "SelectionSet",
7277
+ selections: [
7278
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
7279
+ { kind: "Field", name: { kind: "Name", value: "activities" } },
7280
+ { kind: "Field", name: { kind: "Name", value: "schedule" } },
7281
+ { kind: "Field", name: { kind: "Name", value: "description" } },
7282
+ { kind: "Field", name: { kind: "Name", value: "updatedAt" } },
7283
+ { kind: "Field", name: { kind: "Name", value: "name" } },
7284
+ { kind: "Field", name: { kind: "Name", value: "sortOrder" } },
7285
+ {
7286
+ kind: "Field",
7287
+ name: { kind: "Name", value: "team" },
7288
+ selectionSet: {
7289
+ kind: "SelectionSet",
7290
+ selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
7291
+ },
7292
+ },
7293
+ { kind: "Field", name: { kind: "Name", value: "archivedAt" } },
7294
+ { kind: "Field", name: { kind: "Name", value: "createdAt" } },
7295
+ { kind: "Field", name: { kind: "Name", value: "id" } },
7296
+ {
7297
+ kind: "Field",
7298
+ name: { kind: "Name", value: "creator" },
7299
+ selectionSet: {
7300
+ kind: "SelectionSet",
7301
+ selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
7302
+ },
7303
+ },
7304
+ { kind: "Field", name: { kind: "Name", value: "enabled" } },
7305
+ ],
7306
+ },
7307
+ },
7308
+ ],
7309
+ };
7310
+ const WorkflowCronJobDefinitionConnectionFragmentDoc = {
7311
+ kind: "Document",
7312
+ definitions: [
7313
+ {
7314
+ kind: "FragmentDefinition",
7315
+ name: { kind: "Name", value: "WorkflowCronJobDefinitionConnection" },
7316
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "WorkflowCronJobDefinitionConnection" } },
7317
+ selectionSet: {
7318
+ kind: "SelectionSet",
7319
+ selections: [
7320
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
7321
+ {
7322
+ kind: "Field",
7323
+ name: { kind: "Name", value: "nodes" },
7324
+ selectionSet: {
7325
+ kind: "SelectionSet",
7326
+ selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "WorkflowCronJobDefinition" } }],
7327
+ },
7328
+ },
7329
+ {
7330
+ kind: "Field",
7331
+ name: { kind: "Name", value: "pageInfo" },
7332
+ selectionSet: {
7333
+ kind: "SelectionSet",
7334
+ selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PageInfo" } }],
7335
+ },
7336
+ },
7337
+ ],
7338
+ },
7339
+ },
7340
+ ...WorkflowCronJobDefinitionFragmentDoc.definitions,
7341
+ ...PageInfoFragmentDoc.definitions,
7342
+ ],
7343
+ };
7271
7344
  const WorkflowDefinitionFragmentDoc = {
7272
7345
  kind: "Document",
7273
7346
  definitions: [
@@ -7280,7 +7353,6 @@
7280
7353
  selections: [
7281
7354
  { kind: "Field", name: { kind: "Name", value: "__typename" } },
7282
7355
  { kind: "Field", name: { kind: "Name", value: "activities" } },
7283
- { kind: "Field", name: { kind: "Name", value: "schedule" } },
7284
7356
  { kind: "Field", name: { kind: "Name", value: "conditions" } },
7285
7357
  { kind: "Field", name: { kind: "Name", value: "description" } },
7286
7358
  { kind: "Field", name: { kind: "Name", value: "updatedAt" } },
@@ -9912,6 +9984,54 @@
9912
9984
  ...IntegrationPayloadFragmentDoc.definitions,
9913
9985
  ],
9914
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
+ };
9915
10035
  const IntegrationSlackOrgProjectUpdatesPostDocument = {
9916
10036
  kind: "Document",
9917
10037
  definitions: [
@@ -26537,6 +26657,7 @@
26537
26657
  get ProjectUpdateHealthType () { return ProjectUpdateHealthType; },
26538
26658
  get ProjectUpdateReminderFrequency () { return ProjectUpdateReminderFrequency; },
26539
26659
  get PushSubscriptionType () { return PushSubscriptionType; },
26660
+ get ReleaseChannel () { return ReleaseChannel; },
26540
26661
  get SlaStatus () { return SlaStatus; },
26541
26662
  get UserFlagType () { return UserFlagType; },
26542
26663
  get UserFlagUpdateOperation () { return UserFlagUpdateOperation; },
@@ -26558,7 +26679,6 @@
26558
26679
  GithubRepoFragmentDoc: GithubRepoFragmentDoc,
26559
26680
  GithubOrgFragmentDoc: GithubOrgFragmentDoc,
26560
26681
  GithubOAuthTokenPayloadFragmentDoc: GithubOAuthTokenPayloadFragmentDoc,
26561
- OauthClientFragmentDoc: OauthClientFragmentDoc,
26562
26682
  UserAuthorizedApplicationFragmentDoc: UserAuthorizedApplicationFragmentDoc,
26563
26683
  ApplicationFragmentDoc: ApplicationFragmentDoc,
26564
26684
  FrontSettingsFragmentDoc: FrontSettingsFragmentDoc,
@@ -26575,8 +26695,6 @@
26575
26695
  IntegrationSettingsFragmentDoc: IntegrationSettingsFragmentDoc,
26576
26696
  SamlConfigurationPayloadFragmentDoc: SamlConfigurationPayloadFragmentDoc,
26577
26697
  UserSettingsFragmentDoc: UserSettingsFragmentDoc,
26578
- AdminJobConfigurationPayloadFragmentDoc: AdminJobConfigurationPayloadFragmentDoc,
26579
- AdminJobStatusPayloadFragmentDoc: AdminJobStatusPayloadFragmentDoc,
26580
26698
  ApiKeyFragmentDoc: ApiKeyFragmentDoc,
26581
26699
  PageInfoFragmentDoc: PageInfoFragmentDoc,
26582
26700
  ApiKeyConnectionFragmentDoc: ApiKeyConnectionFragmentDoc,
@@ -26659,6 +26777,8 @@
26659
26777
  NotificationSubscriptionFragmentDoc: NotificationSubscriptionFragmentDoc,
26660
26778
  NotificationSubscriptionConnectionFragmentDoc: NotificationSubscriptionConnectionFragmentDoc,
26661
26779
  NotificationSubscriptionPayloadFragmentDoc: NotificationSubscriptionPayloadFragmentDoc,
26780
+ OauthClientFragmentDoc: OauthClientFragmentDoc,
26781
+ OauthClientConnectionFragmentDoc: OauthClientConnectionFragmentDoc,
26662
26782
  OrganizationCancelDeletePayloadFragmentDoc: OrganizationCancelDeletePayloadFragmentDoc,
26663
26783
  OrganizationDeletePayloadFragmentDoc: OrganizationDeletePayloadFragmentDoc,
26664
26784
  OrganizationExistsPayloadFragmentDoc: OrganizationExistsPayloadFragmentDoc,
@@ -26723,6 +26843,8 @@
26723
26843
  WebhookFragmentDoc: WebhookFragmentDoc,
26724
26844
  WebhookConnectionFragmentDoc: WebhookConnectionFragmentDoc,
26725
26845
  WebhookPayloadFragmentDoc: WebhookPayloadFragmentDoc,
26846
+ WorkflowCronJobDefinitionFragmentDoc: WorkflowCronJobDefinitionFragmentDoc,
26847
+ WorkflowCronJobDefinitionConnectionFragmentDoc: WorkflowCronJobDefinitionConnectionFragmentDoc,
26726
26848
  WorkflowDefinitionFragmentDoc: WorkflowDefinitionFragmentDoc,
26727
26849
  WorkflowDefinitionConnectionFragmentDoc: WorkflowDefinitionConnectionFragmentDoc,
26728
26850
  WorkflowStateFragmentDoc: WorkflowStateFragmentDoc,
@@ -26784,6 +26906,7 @@
26784
26906
  IntegrationSentryConnectDocument: IntegrationSentryConnectDocument,
26785
26907
  IntegrationSlackDocument: IntegrationSlackDocument,
26786
26908
  IntegrationSlackImportEmojisDocument: IntegrationSlackImportEmojisDocument,
26909
+ IntegrationSlackIntakeDocument: IntegrationSlackIntakeDocument,
26787
26910
  IntegrationSlackOrgProjectUpdatesPostDocument: IntegrationSlackOrgProjectUpdatesPostDocument,
26788
26911
  IntegrationSlackPersonalDocument: IntegrationSlackPersonalDocument,
26789
26912
  IntegrationSlackPostDocument: IntegrationSlackPostDocument,
@@ -27163,38 +27286,6 @@
27163
27286
  return undefined;
27164
27287
  }
27165
27288
  }
27166
- /**
27167
- * AdminJobConfigurationPayload model
27168
- *
27169
- * @param request - function to call the graphql client
27170
- * @param data - L.AdminJobConfigurationPayloadFragment response data
27171
- */
27172
- class AdminJobConfigurationPayload extends Request {
27173
- constructor(request, data) {
27174
- var _a, _b;
27175
- super(request);
27176
- this.currentJob = (_a = data.currentJob) !== null && _a !== void 0 ? _a : undefined;
27177
- this.delay = data.delay;
27178
- this.enabled = data.enabled;
27179
- this.param = (_b = data.param) !== null && _b !== void 0 ? _b : undefined;
27180
- }
27181
- }
27182
- /**
27183
- * AdminJobStatusPayload model
27184
- *
27185
- * @param request - function to call the graphql client
27186
- * @param data - L.AdminJobStatusPayloadFragment response data
27187
- */
27188
- class AdminJobStatusPayload extends Request {
27189
- constructor(request, data) {
27190
- var _a, _b;
27191
- super(request);
27192
- this.availableJobs = data.availableJobs;
27193
- this.cursor = (_a = data.cursor) !== null && _a !== void 0 ? _a : undefined;
27194
- this.startedAt = (_b = parseDate(data.startedAt)) !== null && _b !== void 0 ? _b : undefined;
27195
- this.configuration = new AdminJobConfigurationPayload(request, data.configuration);
27196
- }
27197
- }
27198
27289
  /**
27199
27290
  * An API key. Grants access to the user's resources.
27200
27291
  *
@@ -29373,7 +29464,7 @@
29373
29464
  */
29374
29465
  class OauthClient extends Request {
29375
29466
  constructor(request, data) {
29376
- var _a, _b, _c, _d, _e, _f;
29467
+ var _a, _b, _c, _d, _e, _f, _g;
29377
29468
  super(request);
29378
29469
  this.archivedAt = (_a = parseDate(data.archivedAt)) !== null && _a !== void 0 ? _a : undefined;
29379
29470
  this.clientId = data.clientId;
@@ -29389,7 +29480,8 @@
29389
29480
  this.redirectUris = data.redirectUris;
29390
29481
  this.updatedAt = (_e = parseDate(data.updatedAt)) !== null && _e !== void 0 ? _e : new Date();
29391
29482
  this.webhookResourceTypes = data.webhookResourceTypes;
29392
- this.webhookUrl = (_f = data.webhookUrl) !== null && _f !== void 0 ? _f : undefined;
29483
+ this.webhookSecret = (_f = data.webhookSecret) !== null && _f !== void 0 ? _f : undefined;
29484
+ this.webhookUrl = (_g = data.webhookUrl) !== null && _g !== void 0 ? _g : undefined;
29393
29485
  this._creator = data.creator;
29394
29486
  }
29395
29487
  /** The user who created the OAuthClient. */
@@ -29456,6 +29548,18 @@
29456
29548
  return new UserQuery(this._request).fetch(this._user.id);
29457
29549
  }
29458
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
+ }
29459
29563
  /**
29460
29564
  * An organization. Organizations are root-level objects that contain user accounts and teams.
29461
29565
  *
@@ -29975,6 +30079,7 @@
29975
30079
  this.description = (_c = data.description) !== null && _c !== void 0 ? _c : undefined;
29976
30080
  this.id = data.id;
29977
30081
  this.name = data.name;
30082
+ this.sortOrder = data.sortOrder;
29978
30083
  this.targetDate = (_d = data.targetDate) !== null && _d !== void 0 ? _d : undefined;
29979
30084
  this.updatedAt = (_e = parseDate(data.updatedAt)) !== null && _e !== void 0 ? _e : new Date();
29980
30085
  this._project = data.project;
@@ -31482,6 +31587,50 @@
31482
31587
  return new WebhookQuery(this._request).fetch(this._webhook.id);
31483
31588
  }
31484
31589
  }
31590
+ /**
31591
+ * WorkflowCronJobDefinition model
31592
+ *
31593
+ * @param request - function to call the graphql client
31594
+ * @param data - L.WorkflowCronJobDefinitionFragment response data
31595
+ */
31596
+ class WorkflowCronJobDefinition extends Request {
31597
+ constructor(request, data) {
31598
+ var _a, _b, _c, _d, _e, _f;
31599
+ super(request);
31600
+ this.activities = (_a = parseJson(data.activities)) !== null && _a !== void 0 ? _a : {};
31601
+ this.archivedAt = (_b = parseDate(data.archivedAt)) !== null && _b !== void 0 ? _b : undefined;
31602
+ this.createdAt = (_c = parseDate(data.createdAt)) !== null && _c !== void 0 ? _c : new Date();
31603
+ this.description = (_d = data.description) !== null && _d !== void 0 ? _d : undefined;
31604
+ this.enabled = data.enabled;
31605
+ this.id = data.id;
31606
+ this.name = data.name;
31607
+ this.schedule = (_e = parseJson(data.schedule)) !== null && _e !== void 0 ? _e : {};
31608
+ this.sortOrder = data.sortOrder;
31609
+ this.updatedAt = (_f = parseDate(data.updatedAt)) !== null && _f !== void 0 ? _f : new Date();
31610
+ this._creator = data.creator;
31611
+ this._team = data.team;
31612
+ }
31613
+ /** The user who created the workflow cron job. */
31614
+ get creator() {
31615
+ return new UserQuery(this._request).fetch(this._creator.id);
31616
+ }
31617
+ /** The team associated with the workflow cron job. */
31618
+ get team() {
31619
+ return new TeamQuery(this._request).fetch(this._team.id);
31620
+ }
31621
+ }
31622
+ /**
31623
+ * WorkflowCronJobDefinitionConnection model
31624
+ *
31625
+ * @param request - function to call the graphql client
31626
+ * @param fetch - function to trigger a refetch of this WorkflowCronJobDefinitionConnection model
31627
+ * @param data - WorkflowCronJobDefinitionConnection response data
31628
+ */
31629
+ class WorkflowCronJobDefinitionConnection extends Connection {
31630
+ constructor(request, fetch, data) {
31631
+ super(request, fetch, data.nodes.map(node => new WorkflowCronJobDefinition(request, node)), new PageInfo(request, data.pageInfo));
31632
+ }
31633
+ }
31485
31634
  /**
31486
31635
  * WorkflowDefinition model
31487
31636
  *
@@ -31490,7 +31639,7 @@
31490
31639
  */
31491
31640
  class WorkflowDefinition extends Request {
31492
31641
  constructor(request, data) {
31493
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
31642
+ var _a, _b, _c, _d, _e, _f, _g, _h;
31494
31643
  super(request);
31495
31644
  this.activities = (_a = parseJson(data.activities)) !== null && _a !== void 0 ? _a : {};
31496
31645
  this.archivedAt = (_b = parseDate(data.archivedAt)) !== null && _b !== void 0 ? _b : undefined;
@@ -31501,11 +31650,10 @@
31501
31650
  this.groupName = (_f = data.groupName) !== null && _f !== void 0 ? _f : undefined;
31502
31651
  this.id = data.id;
31503
31652
  this.name = data.name;
31504
- this.schedule = (_g = parseJson(data.schedule)) !== null && _g !== void 0 ? _g : {};
31505
31653
  this.sortOrder = data.sortOrder;
31506
- this.updatedAt = (_h = parseDate(data.updatedAt)) !== null && _h !== void 0 ? _h : new Date();
31654
+ this.updatedAt = (_g = parseDate(data.updatedAt)) !== null && _g !== void 0 ? _g : new Date();
31507
31655
  this._creator = data.creator;
31508
- this._team = (_j = data.team) !== null && _j !== void 0 ? _j : undefined;
31656
+ this._team = (_h = data.team) !== null && _h !== void 0 ? _h : undefined;
31509
31657
  }
31510
31658
  /** The user who created the workflow. */
31511
31659
  get creator() {
@@ -33055,6 +33203,33 @@
33055
33203
  });
33056
33204
  }
33057
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
+ }
33058
33233
  /**
33059
33234
  * A fetchable IntegrationSlackOrgProjectUpdatesPost Mutation
33060
33235
  *
@@ -40021,6 +40196,16 @@
40021
40196
  integrationSlackImportEmojis(code, redirectUri) {
40022
40197
  return new IntegrationSlackImportEmojisMutation(this._request).fetch(code, redirectUri);
40023
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
+ }
40024
40209
  /**
40025
40210
  * Slack integration for organization level project update notifications.
40026
40211
  *
@@ -41818,8 +42003,39 @@
41818
42003
  }
41819
42004
  }
41820
42005
 
41821
- exports.AdminJobConfigurationPayload = AdminJobConfigurationPayload;
41822
- exports.AdminJobStatusPayload = AdminJobStatusPayload;
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
+
41823
42039
  exports.AdministrableTeamsQuery = AdministrableTeamsQuery;
41824
42040
  exports.AirbyteIntegrationConnectMutation = AirbyteIntegrationConnectMutation;
41825
42041
  exports.ApiKey = ApiKey;
@@ -42018,6 +42234,7 @@
42018
42234
  exports.IntegrationSentryConnectMutation = IntegrationSentryConnectMutation;
42019
42235
  exports.IntegrationSettings = IntegrationSettings;
42020
42236
  exports.IntegrationSlackImportEmojisMutation = IntegrationSlackImportEmojisMutation;
42237
+ exports.IntegrationSlackIntakeMutation = IntegrationSlackIntakeMutation;
42021
42238
  exports.IntegrationSlackMutation = IntegrationSlackMutation;
42022
42239
  exports.IntegrationSlackOrgProjectUpdatesPostMutation = IntegrationSlackOrgProjectUpdatesPostMutation;
42023
42240
  exports.IntegrationSlackPersonalMutation = IntegrationSlackPersonalMutation;
@@ -42092,6 +42309,8 @@
42092
42309
  exports.JiraProjectData = JiraProjectData;
42093
42310
  exports.JiraSettings = JiraSettings;
42094
42311
  exports.JoinOrganizationFromOnboardingMutation = JoinOrganizationFromOnboardingMutation;
42312
+ exports.LINEAR_WEBHOOK_SIGNATURE_HEADER = LINEAR_WEBHOOK_SIGNATURE_HEADER;
42313
+ exports.LINEAR_WEBHOOK_TS_FIELD = LINEAR_WEBHOOK_TS_FIELD;
42095
42314
  exports.LeaveOrganizationMutation = LeaveOrganizationMutation;
42096
42315
  exports.LinearClient = LinearClient;
42097
42316
  exports.LinearConnection = LinearConnection;
@@ -42100,6 +42319,7 @@
42100
42319
  exports.LinearGraphQLClient = LinearGraphQLClient;
42101
42320
  exports.LinearGraphQLError = LinearGraphQLError;
42102
42321
  exports.LinearSdk = LinearSdk;
42322
+ exports.LinearWebhooks = LinearWebhooks;
42103
42323
  exports.LockTimeoutLinearError = LockTimeoutLinearError;
42104
42324
  exports.LogoutMutation = LogoutMutation;
42105
42325
  exports.LogoutResponse = LogoutResponse;
@@ -42119,6 +42339,7 @@
42119
42339
  exports.OauthClient = OauthClient;
42120
42340
  exports.OauthClientApproval = OauthClientApproval;
42121
42341
  exports.OauthClientApprovalNotification = OauthClientApprovalNotification;
42342
+ exports.OauthClientConnection = OauthClientConnection;
42122
42343
  exports.Organization = Organization;
42123
42344
  exports.OrganizationCancelDeletePayload = OrganizationCancelDeletePayload;
42124
42345
  exports.OrganizationDeleteChallengeMutation = OrganizationDeleteChallengeMutation;
@@ -42321,6 +42542,8 @@
42321
42542
  exports.WebhookPayload = WebhookPayload;
42322
42543
  exports.WebhookQuery = WebhookQuery;
42323
42544
  exports.WebhooksQuery = WebhooksQuery;
42545
+ exports.WorkflowCronJobDefinition = WorkflowCronJobDefinition;
42546
+ exports.WorkflowCronJobDefinitionConnection = WorkflowCronJobDefinitionConnection;
42324
42547
  exports.WorkflowDefinition = WorkflowDefinition;
42325
42548
  exports.WorkflowDefinitionConnection = WorkflowDefinitionConnection;
42326
42549
  exports.WorkflowState = WorkflowState;