@linear/sdk 17.0.1 → 18.0.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
@@ -85442,6 +85442,24 @@ const ApplicationFragmentDoc = {
85442
85442
  },
85443
85443
  ],
85444
85444
  };
85445
+ const SharedSlackSettingsFragmentDoc = {
85446
+ kind: "Document",
85447
+ definitions: [
85448
+ {
85449
+ kind: "FragmentDefinition",
85450
+ name: { kind: "Name", value: "SharedSlackSettings" },
85451
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SharedSlackSettings" } },
85452
+ selectionSet: {
85453
+ kind: "SelectionSet",
85454
+ selections: [
85455
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
85456
+ { kind: "Field", name: { kind: "Name", value: "teamId" } },
85457
+ { kind: "Field", name: { kind: "Name", value: "teamName" } },
85458
+ ],
85459
+ },
85460
+ },
85461
+ ],
85462
+ };
85445
85463
  const FrontSettingsFragmentDoc = {
85446
85464
  kind: "Document",
85447
85465
  definitions: [
@@ -85781,6 +85799,8 @@ const SlackSettingsFragmentDoc = {
85781
85799
  kind: "SelectionSet",
85782
85800
  selections: [
85783
85801
  { kind: "Field", name: { kind: "Name", value: "__typename" } },
85802
+ { kind: "Field", name: { kind: "Name", value: "teamId" } },
85803
+ { kind: "Field", name: { kind: "Name", value: "teamName" } },
85784
85804
  { kind: "Field", name: { kind: "Name", value: "linkOnIssueIdMention" } },
85785
85805
  ],
85786
85806
  },
@@ -85849,6 +85869,8 @@ const SlackAsksSettingsFragmentDoc = {
85849
85869
  kind: "SelectionSet",
85850
85870
  selections: [
85851
85871
  { kind: "Field", name: { kind: "Name", value: "__typename" } },
85872
+ { kind: "Field", name: { kind: "Name", value: "teamId" } },
85873
+ { kind: "Field", name: { kind: "Name", value: "teamName" } },
85852
85874
  {
85853
85875
  kind: "Field",
85854
85876
  name: { kind: "Name", value: "slackChannelMapping" },
@@ -88661,6 +88683,14 @@ const IssueFragmentDoc = {
88661
88683
  selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "ActorBot" } }],
88662
88684
  },
88663
88685
  },
88686
+ {
88687
+ kind: "Field",
88688
+ name: { kind: "Name", value: "sourceComment" },
88689
+ selectionSet: {
88690
+ kind: "SelectionSet",
88691
+ selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
88692
+ },
88693
+ },
88664
88694
  {
88665
88695
  kind: "Field",
88666
88696
  name: { kind: "Name", value: "cycle" },
@@ -89497,6 +89527,14 @@ const IssueSearchResultFragmentDoc = {
89497
89527
  selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "ActorBot" } }],
89498
89528
  },
89499
89529
  },
89530
+ {
89531
+ kind: "Field",
89532
+ name: { kind: "Name", value: "sourceComment" },
89533
+ selectionSet: {
89534
+ kind: "SelectionSet",
89535
+ selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
89536
+ },
89537
+ },
89500
89538
  {
89501
89539
  kind: "Field",
89502
89540
  name: { kind: "Name", value: "cycle" },
@@ -107971,44 +108009,6 @@ const AttachmentLinkZendeskDocument = {
107971
108009
  ...AttachmentPayloadFragmentDoc.definitions,
107972
108010
  ],
107973
108011
  };
107974
- const AttachmentUnsyncSlackDocument = {
107975
- kind: "Document",
107976
- definitions: [
107977
- {
107978
- kind: "OperationDefinition",
107979
- operation: "mutation",
107980
- name: { kind: "Name", value: "attachmentUnsyncSlack" },
107981
- variableDefinitions: [
107982
- {
107983
- kind: "VariableDefinition",
107984
- variable: { kind: "Variable", name: { kind: "Name", value: "id" } },
107985
- type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
107986
- },
107987
- ],
107988
- selectionSet: {
107989
- kind: "SelectionSet",
107990
- selections: [
107991
- {
107992
- kind: "Field",
107993
- name: { kind: "Name", value: "attachmentUnsyncSlack" },
107994
- arguments: [
107995
- {
107996
- kind: "Argument",
107997
- name: { kind: "Name", value: "id" },
107998
- value: { kind: "Variable", name: { kind: "Name", value: "id" } },
107999
- },
108000
- ],
108001
- selectionSet: {
108002
- kind: "SelectionSet",
108003
- selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "AttachmentPayload" } }],
108004
- },
108005
- },
108006
- ],
108007
- },
108008
- },
108009
- ...AttachmentPayloadFragmentDoc.definitions,
108010
- ],
108011
- };
108012
108012
  const UpdateAttachmentDocument = {
108013
108013
  kind: "Document",
108014
108014
  definitions: [
@@ -116716,6 +116716,7 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
116716
116716
  GithubOAuthTokenPayloadFragmentDoc: GithubOAuthTokenPayloadFragmentDoc,
116717
116717
  UserAuthorizedApplicationFragmentDoc: UserAuthorizedApplicationFragmentDoc,
116718
116718
  ApplicationFragmentDoc: ApplicationFragmentDoc,
116719
+ SharedSlackSettingsFragmentDoc: SharedSlackSettingsFragmentDoc,
116719
116720
  FrontSettingsFragmentDoc: FrontSettingsFragmentDoc,
116720
116721
  TeamRepoMappingFragmentDoc: TeamRepoMappingFragmentDoc,
116721
116722
  GitHubRepoFragmentDoc: GitHubRepoFragmentDoc,
@@ -117119,7 +117120,6 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
117119
117120
  AttachmentLinkSlackDocument: AttachmentLinkSlackDocument,
117120
117121
  AttachmentLinkUrlDocument: AttachmentLinkUrlDocument,
117121
117122
  AttachmentLinkZendeskDocument: AttachmentLinkZendeskDocument,
117122
- AttachmentUnsyncSlackDocument: AttachmentUnsyncSlackDocument,
117123
117123
  UpdateAttachmentDocument: UpdateAttachmentDocument,
117124
117124
  CreateCommentDocument: CreateCommentDocument,
117125
117125
  DeleteCommentDocument: DeleteCommentDocument,
@@ -119804,7 +119804,7 @@ class IntercomSettings extends Request {
119804
119804
  */
119805
119805
  class Issue extends Request {
119806
119806
  constructor(request, data) {
119807
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
119807
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
119808
119808
  super(request);
119809
119809
  this.archivedAt = (_a = parseDate(data.archivedAt)) !== null && _a !== void 0 ? _a : undefined;
119810
119810
  this.autoArchivedAt = (_b = parseDate(data.autoArchivedAt)) !== null && _b !== void 0 ? _b : undefined;
@@ -119846,6 +119846,7 @@ class Issue extends Request {
119846
119846
  this._project = (_z = data.project) !== null && _z !== void 0 ? _z : undefined;
119847
119847
  this._projectMilestone = (_0 = data.projectMilestone) !== null && _0 !== void 0 ? _0 : undefined;
119848
119848
  this._snoozedBy = (_1 = data.snoozedBy) !== null && _1 !== void 0 ? _1 : undefined;
119849
+ this._sourceComment = (_2 = data.sourceComment) !== null && _2 !== void 0 ? _2 : undefined;
119849
119850
  this._state = data.state;
119850
119851
  this._team = data.team;
119851
119852
  }
@@ -119905,6 +119906,11 @@ class Issue extends Request {
119905
119906
  var _a, _b;
119906
119907
  return ((_a = this._snoozedBy) === null || _a === void 0 ? void 0 : _a.id) ? new UserQuery(this._request).fetch((_b = this._snoozedBy) === null || _b === void 0 ? void 0 : _b.id) : undefined;
119907
119908
  }
119909
+ /** The comment that this issue was created from. */
119910
+ get sourceComment() {
119911
+ var _a, _b;
119912
+ return ((_a = this._sourceComment) === null || _a === void 0 ? void 0 : _a.id) ? new CommentQuery(this._request).fetch({ id: (_b = this._sourceComment) === null || _b === void 0 ? void 0 : _b.id }) : undefined;
119913
+ }
119908
119914
  /** The workflow state that the issue is associated with. */
119909
119915
  get state() {
119910
119916
  return new WorkflowStateQuery(this._request).fetch(this._state.id);
@@ -120550,7 +120556,7 @@ class IssueSearchPayload extends Request {
120550
120556
  */
120551
120557
  class IssueSearchResult extends Request {
120552
120558
  constructor(request, data) {
120553
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
120559
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
120554
120560
  super(request);
120555
120561
  this.archivedAt = (_a = parseDate(data.archivedAt)) !== null && _a !== void 0 ? _a : undefined;
120556
120562
  this.autoArchivedAt = (_b = parseDate(data.autoArchivedAt)) !== null && _b !== void 0 ? _b : undefined;
@@ -120593,6 +120599,7 @@ class IssueSearchResult extends Request {
120593
120599
  this._project = (_z = data.project) !== null && _z !== void 0 ? _z : undefined;
120594
120600
  this._projectMilestone = (_0 = data.projectMilestone) !== null && _0 !== void 0 ? _0 : undefined;
120595
120601
  this._snoozedBy = (_1 = data.snoozedBy) !== null && _1 !== void 0 ? _1 : undefined;
120602
+ this._sourceComment = (_2 = data.sourceComment) !== null && _2 !== void 0 ? _2 : undefined;
120596
120603
  this._state = data.state;
120597
120604
  this._team = data.team;
120598
120605
  }
@@ -120652,6 +120659,11 @@ class IssueSearchResult extends Request {
120652
120659
  var _a, _b;
120653
120660
  return ((_a = this._snoozedBy) === null || _a === void 0 ? void 0 : _a.id) ? new UserQuery(this._request).fetch((_b = this._snoozedBy) === null || _b === void 0 ? void 0 : _b.id) : undefined;
120654
120661
  }
120662
+ /** The comment that this issue was created from. */
120663
+ get sourceComment() {
120664
+ var _a, _b;
120665
+ return ((_a = this._sourceComment) === null || _a === void 0 ? void 0 : _a.id) ? new CommentQuery(this._request).fetch({ id: (_b = this._sourceComment) === null || _b === void 0 ? void 0 : _b.id }) : undefined;
120666
+ }
120655
120667
  /** The workflow state that the issue is associated with. */
120656
120668
  get state() {
120657
120669
  return new WorkflowStateQuery(this._request).fetch(this._state.id);
@@ -122599,6 +122611,20 @@ class SentrySettings extends Request {
122599
122611
  this.organizationSlug = data.organizationSlug;
122600
122612
  }
122601
122613
  }
122614
+ /**
122615
+ * Shared Slack integration settings.
122616
+ *
122617
+ * @param request - function to call the graphql client
122618
+ * @param data - L.SharedSlackSettingsFragment response data
122619
+ */
122620
+ class SharedSlackSettings extends Request {
122621
+ constructor(request, data) {
122622
+ var _a, _b;
122623
+ super(request);
122624
+ this.teamId = (_a = data.teamId) !== null && _a !== void 0 ? _a : undefined;
122625
+ this.teamName = (_b = data.teamName) !== null && _b !== void 0 ? _b : undefined;
122626
+ }
122627
+ }
122602
122628
  /**
122603
122629
  * Slack Asks specific settings.
122604
122630
  *
@@ -122607,7 +122633,10 @@ class SentrySettings extends Request {
122607
122633
  */
122608
122634
  class SlackAsksSettings extends Request {
122609
122635
  constructor(request, data) {
122636
+ var _a, _b;
122610
122637
  super(request);
122638
+ this.teamId = (_a = data.teamId) !== null && _a !== void 0 ? _a : undefined;
122639
+ this.teamName = (_b = data.teamName) !== null && _b !== void 0 ? _b : undefined;
122611
122640
  this.slackChannelMapping = data.slackChannelMapping
122612
122641
  ? data.slackChannelMapping.map(node => new SlackChannelNameMapping(request, node))
122613
122642
  : undefined;
@@ -122693,8 +122722,11 @@ class SlackPostSettings extends Request {
122693
122722
  */
122694
122723
  class SlackSettings extends Request {
122695
122724
  constructor(request, data) {
122725
+ var _a, _b;
122696
122726
  super(request);
122697
122727
  this.linkOnIssueIdMention = data.linkOnIssueIdMention;
122728
+ this.teamId = (_a = data.teamId) !== null && _a !== void 0 ? _a : undefined;
122729
+ this.teamName = (_b = data.teamName) !== null && _b !== void 0 ? _b : undefined;
122698
122730
  }
122699
122731
  }
122700
122732
  /**
@@ -126682,31 +126714,6 @@ class AttachmentLinkZendeskMutation extends Request {
126682
126714
  });
126683
126715
  }
126684
126716
  }
126685
- /**
126686
- * A fetchable AttachmentUnsyncSlack Mutation
126687
- *
126688
- * @param request - function to call the graphql client
126689
- */
126690
- class AttachmentUnsyncSlackMutation extends Request {
126691
- constructor(request) {
126692
- super(request);
126693
- }
126694
- /**
126695
- * Call the AttachmentUnsyncSlack mutation and return a AttachmentPayload
126696
- *
126697
- * @param id - required id to pass to attachmentUnsyncSlack
126698
- * @returns parsed response from AttachmentUnsyncSlackMutation
126699
- */
126700
- fetch(id) {
126701
- return __awaiter(this, void 0, void 0, function* () {
126702
- const response = yield this._request(AttachmentUnsyncSlackDocument, {
126703
- id,
126704
- });
126705
- const data = response.attachmentUnsyncSlack;
126706
- return new AttachmentPayload(this._request, data);
126707
- });
126708
- }
126709
- }
126710
126717
  /**
126711
126718
  * A fetchable UpdateAttachment Mutation
126712
126719
  *
@@ -134517,15 +134524,6 @@ class LinearSdk extends Request {
134517
134524
  attachmentLinkZendesk(issueId, ticketId, variables) {
134518
134525
  return new AttachmentLinkZendeskMutation(this._request).fetch(issueId, ticketId, variables);
134519
134526
  }
134520
- /**
134521
- * [DEPRECATED] Unsyncs an existing synced Slack attachment.
134522
- *
134523
- * @param id - required id to pass to attachmentUnsyncSlack
134524
- * @returns AttachmentPayload
134525
- */
134526
- attachmentUnsyncSlack(id) {
134527
- return new AttachmentUnsyncSlackMutation(this._request).fetch(id);
134528
- }
134529
134527
  /**
134530
134528
  * Updates an existing issue attachment.
134531
134529
  *
@@ -136442,7 +136440,6 @@ exports.AttachmentLinkZendeskMutation = AttachmentLinkZendeskMutation;
136442
136440
  exports.AttachmentPayload = AttachmentPayload;
136443
136441
  exports.AttachmentQuery = AttachmentQuery;
136444
136442
  exports.AttachmentSourcesPayload = AttachmentSourcesPayload;
136445
- exports.AttachmentUnsyncSlackMutation = AttachmentUnsyncSlackMutation;
136446
136443
  exports.AttachmentsForUrlQuery = AttachmentsForUrlQuery;
136447
136444
  exports.AttachmentsQuery = AttachmentsQuery;
136448
136445
  exports.AuditEntriesQuery = AuditEntriesQuery;
@@ -136911,6 +136908,7 @@ exports.SearchIssues_ArchivePayloadQuery = SearchIssues_ArchivePayloadQuery;
136911
136908
  exports.SearchProjectsQuery = SearchProjectsQuery;
136912
136909
  exports.SearchProjects_ArchivePayloadQuery = SearchProjects_ArchivePayloadQuery;
136913
136910
  exports.SentrySettings = SentrySettings;
136911
+ exports.SharedSlackSettings = SharedSlackSettings;
136914
136912
  exports.SlackAsksSettings = SlackAsksSettings;
136915
136913
  exports.SlackAsksTeamSettings = SlackAsksTeamSettings;
136916
136914
  exports.SlackChannelConnectPayload = SlackChannelConnectPayload;