@linear/sdk 18.1.0 → 19.1.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
@@ -9,7 +9,7 @@
9
9
  var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
10
10
 
11
11
  (function() {
12
- const env = {"npm_package_name":"@linear/sdk","npm_package_version":"18.1.0"};
12
+ const env = {"npm_package_name":"@linear/sdk","npm_package_version":"19.1.0"};
13
13
  try {
14
14
  if (process) {
15
15
  process.env = Object.assign({}, process.env);
@@ -18871,44 +18871,6 @@
18871
18871
  ...PageInfoFragmentDoc.definitions,
18872
18872
  ],
18873
18873
  };
18874
- const OrganizationRegionDocument = {
18875
- kind: "Document",
18876
- definitions: [
18877
- {
18878
- kind: "OperationDefinition",
18879
- operation: "query",
18880
- name: { kind: "Name", value: "organizationRegion" },
18881
- variableDefinitions: [
18882
- {
18883
- kind: "VariableDefinition",
18884
- variable: { kind: "Variable", name: { kind: "Name", value: "id" } },
18885
- type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
18886
- },
18887
- ],
18888
- selectionSet: {
18889
- kind: "SelectionSet",
18890
- selections: [
18891
- {
18892
- kind: "Field",
18893
- name: { kind: "Name", value: "organizationRegion" },
18894
- arguments: [
18895
- {
18896
- kind: "Argument",
18897
- name: { kind: "Name", value: "id" },
18898
- value: { kind: "Variable", name: { kind: "Name", value: "id" } },
18899
- },
18900
- ],
18901
- selectionSet: {
18902
- kind: "SelectionSet",
18903
- selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "OrganizationRegionResponse" } }],
18904
- },
18905
- },
18906
- ],
18907
- },
18908
- },
18909
- ...OrganizationRegionResponseFragmentDoc.definitions,
18910
- ],
18911
- };
18912
18874
  const ProjectDocument = {
18913
18875
  kind: "Document",
18914
18876
  definitions: [
@@ -25837,7 +25799,7 @@
25837
25799
  {
25838
25800
  kind: "VariableDefinition",
25839
25801
  variable: { kind: "Variable", name: { kind: "Name", value: "channel" } },
25840
- type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
25802
+ type: { kind: "NamedType", name: { kind: "Name", value: "String" } },
25841
25803
  },
25842
25804
  {
25843
25805
  kind: "VariableDefinition",
@@ -25862,7 +25824,7 @@
25862
25824
  {
25863
25825
  kind: "VariableDefinition",
25864
25826
  variable: { kind: "Variable", name: { kind: "Name", value: "latest" } },
25865
- type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
25827
+ type: { kind: "NamedType", name: { kind: "Name", value: "String" } },
25866
25828
  },
25867
25829
  {
25868
25830
  kind: "VariableDefinition",
@@ -35151,7 +35113,6 @@
35151
35113
  OrganizationExistsDocument: OrganizationExistsDocument,
35152
35114
  OrganizationInviteDocument: OrganizationInviteDocument,
35153
35115
  OrganizationInvitesDocument: OrganizationInvitesDocument,
35154
- OrganizationRegionDocument: OrganizationRegionDocument,
35155
35116
  ProjectDocument: ProjectDocument,
35156
35117
  Project_DocumentsDocument: Project_DocumentsDocument,
35157
35118
  Project_IssuesDocument: Project_IssuesDocument,
@@ -35435,6 +35396,23 @@
35435
35396
  constructor(request) {
35436
35397
  this._request = request;
35437
35398
  }
35399
+ /**
35400
+ * Helper to paginate over all pages of a given connection query.
35401
+ * @param fn The query to paginate
35402
+ * @param args The arguments to pass to the query
35403
+ */
35404
+ paginate(fn, args) {
35405
+ return __awaiter(this, void 0, void 0, function* () {
35406
+ const boundFn = fn.bind(this);
35407
+ let connection = yield boundFn(args);
35408
+ const nodes = connection.nodes;
35409
+ while (connection.pageInfo.hasNextPage) {
35410
+ connection = yield boundFn(Object.assign(Object.assign({ first: 50 }, args), { after: connection.pageInfo.endCursor }));
35411
+ nodes.push(...connection.nodes);
35412
+ }
35413
+ return nodes;
35414
+ });
35415
+ }
35438
35416
  }
35439
35417
  /**
35440
35418
  * Default connection variables required for pagination
@@ -43611,31 +43589,6 @@
43611
43589
  });
43612
43590
  }
43613
43591
  }
43614
- /**
43615
- * A fetchable OrganizationRegion Query
43616
- *
43617
- * @param request - function to call the graphql client
43618
- */
43619
- class OrganizationRegionQuery extends Request {
43620
- constructor(request) {
43621
- super(request);
43622
- }
43623
- /**
43624
- * Call the OrganizationRegion query and return a OrganizationRegionResponse
43625
- *
43626
- * @param id - required id to pass to organizationRegion
43627
- * @returns parsed response from OrganizationRegionQuery
43628
- */
43629
- fetch(id) {
43630
- return __awaiter(this, void 0, void 0, function* () {
43631
- const response = yield this._request(OrganizationRegionDocument, {
43632
- id,
43633
- });
43634
- const data = response.organizationRegion;
43635
- return new OrganizationRegionResponse(this._request, data);
43636
- });
43637
- }
43638
- }
43639
43592
  /**
43640
43593
  * A fetchable Project Query
43641
43594
  *
@@ -44851,18 +44804,14 @@
44851
44804
  /**
44852
44805
  * Call the AttachmentLinkSlack mutation and return a AttachmentPayload
44853
44806
  *
44854
- * @param channel - required channel to pass to attachmentLinkSlack
44855
44807
  * @param issueId - required issueId to pass to attachmentLinkSlack
44856
- * @param latest - required latest to pass to attachmentLinkSlack
44857
44808
  * @param url - required url to pass to attachmentLinkSlack
44858
- * @param variables - variables without 'channel', 'issueId', 'latest', 'url' to pass into the AttachmentLinkSlackMutation
44809
+ * @param variables - variables without 'issueId', 'url' to pass into the AttachmentLinkSlackMutation
44859
44810
  * @returns parsed response from AttachmentLinkSlackMutation
44860
44811
  */
44861
- fetch(channel, issueId, latest, url, variables) {
44812
+ fetch(issueId, url, variables) {
44862
44813
  return __awaiter(this, void 0, void 0, function* () {
44863
- const response = yield this._request(AttachmentLinkSlackDocument, Object.assign({ channel,
44864
- issueId,
44865
- latest,
44814
+ const response = yield this._request(AttachmentLinkSlackDocument, Object.assign({ issueId,
44866
44815
  url }, variables));
44867
44816
  const data = response.attachmentLinkSlack;
44868
44817
  return new AttachmentPayload(this._request, data);
@@ -52238,15 +52187,6 @@
52238
52187
  organizationInvites(variables) {
52239
52188
  return new OrganizationInvitesQuery(this._request).fetch(variables);
52240
52189
  }
52241
- /**
52242
- * Fetch the region for the organization.
52243
- *
52244
- * @param id - required id to pass to organizationRegion
52245
- * @returns OrganizationRegionResponse
52246
- */
52247
- organizationRegion(id) {
52248
- return new OrganizationRegionQuery(this._request).fetch(id);
52249
- }
52250
52190
  /**
52251
52191
  * One specific project.
52252
52192
  *
@@ -52708,15 +52648,13 @@
52708
52648
  /**
52709
52649
  * Link an existing Slack message to an issue.
52710
52650
  *
52711
- * @param channel - required channel to pass to attachmentLinkSlack
52712
52651
  * @param issueId - required issueId to pass to attachmentLinkSlack
52713
- * @param latest - required latest to pass to attachmentLinkSlack
52714
52652
  * @param url - required url to pass to attachmentLinkSlack
52715
- * @param variables - variables without 'channel', 'issueId', 'latest', 'url' to pass into the AttachmentLinkSlackMutation
52653
+ * @param variables - variables without 'issueId', 'url' to pass into the AttachmentLinkSlackMutation
52716
52654
  * @returns AttachmentPayload
52717
52655
  */
52718
- attachmentLinkSlack(channel, issueId, latest, url, variables) {
52719
- return new AttachmentLinkSlackMutation(this._request).fetch(channel, issueId, latest, url, variables);
52656
+ attachmentLinkSlack(issueId, url, variables) {
52657
+ return new AttachmentLinkSlackMutation(this._request).fetch(issueId, url, variables);
52720
52658
  }
52721
52659
  /**
52722
52660
  * Link any url to an issue.
@@ -54572,23 +54510,6 @@
54572
54510
  this.options = parsedOptions;
54573
54511
  this.client = graphQLClient;
54574
54512
  }
54575
- /**
54576
- * Helper to paginate over all pages of a given connection query.
54577
- * @param fn The query to paginate
54578
- * @param args The arguments to pass to the query
54579
- */
54580
- paginate(fn, args) {
54581
- return __awaiter(this, void 0, void 0, function* () {
54582
- const boundFn = fn.bind(this);
54583
- let connection = (yield boundFn(args));
54584
- const nodes = connection.nodes;
54585
- while (connection.pageInfo.hasNextPage) {
54586
- connection = (yield boundFn(Object.assign(Object.assign({}, args), { after: connection.pageInfo.endCursor })));
54587
- nodes.push(...connection.nodes);
54588
- }
54589
- return nodes;
54590
- });
54591
- }
54592
54513
  }
54593
54514
 
54594
54515
  const LINEAR_WEBHOOK_SIGNATURE_HEADER = "linear-signature";
@@ -55052,7 +54973,6 @@
55052
54973
  exports.OrganizationInvitesQuery = OrganizationInvitesQuery;
55053
54974
  exports.OrganizationPayload = OrganizationPayload;
55054
54975
  exports.OrganizationQuery = OrganizationQuery;
55055
- exports.OrganizationRegionQuery = OrganizationRegionQuery;
55056
54976
  exports.OrganizationRegionResponse = OrganizationRegionResponse;
55057
54977
  exports.OrganizationStartPlusTrialMutation = OrganizationStartPlusTrialMutation;
55058
54978
  exports.OrganizationStartPlusTrialPayload = OrganizationStartPlusTrialPayload;