@linear/sdk 4.0.0 → 5.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
@@ -83430,6 +83430,13 @@ var OrganizationDomainAuthType;
83430
83430
  OrganizationDomainAuthType["General"] = "general";
83431
83431
  OrganizationDomainAuthType["Saml"] = "saml";
83432
83432
  })(OrganizationDomainAuthType || (OrganizationDomainAuthType = {}));
83433
+ /** The different statuses possible for an organization invite. */
83434
+ var OrganizationInviteStatus;
83435
+ (function (OrganizationInviteStatus) {
83436
+ OrganizationInviteStatus["Accepted"] = "accepted";
83437
+ OrganizationInviteStatus["Expired"] = "expired";
83438
+ OrganizationInviteStatus["Pending"] = "pending";
83439
+ })(OrganizationInviteStatus || (OrganizationInviteStatus = {}));
83433
83440
  /** By which field should the pagination order by */
83434
83441
  var PaginationOrderBy;
83435
83442
  (function (PaginationOrderBy) {
@@ -84413,6 +84420,7 @@ const UserSettingsFragmentDoc = {
84413
84420
  selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
84414
84421
  },
84415
84422
  },
84423
+ { kind: "Field", name: { kind: "Name", value: "showFullUserNames" } },
84416
84424
  ],
84417
84425
  },
84418
84426
  },
@@ -87916,13 +87924,13 @@ const OrganizationInviteConnectionFragmentDoc = {
87916
87924
  ...PageInfoFragmentDoc.definitions,
87917
87925
  ],
87918
87926
  };
87919
- const OrganizationInviteDetailsPayloadFragmentDoc = {
87927
+ const OrganizationInviteFullDetailsPayloadFragmentDoc = {
87920
87928
  kind: "Document",
87921
87929
  definitions: [
87922
87930
  {
87923
87931
  kind: "FragmentDefinition",
87924
- name: { kind: "Name", value: "OrganizationInviteDetailsPayload" },
87925
- typeCondition: { kind: "NamedType", name: { kind: "Name", value: "OrganizationInviteDetailsPayload" } },
87932
+ name: { kind: "Name", value: "OrganizationInviteFullDetailsPayload" },
87933
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "OrganizationInviteFullDetailsPayload" } },
87926
87934
  selectionSet: {
87927
87935
  kind: "SelectionSet",
87928
87936
  selections: [
@@ -97298,6 +97306,44 @@ const UserGoogleCalendarConnectDocument = {
97298
97306
  ...UserPayloadFragmentDoc.definitions,
97299
97307
  ],
97300
97308
  };
97309
+ const UserJiraConnectDocument = {
97310
+ kind: "Document",
97311
+ definitions: [
97312
+ {
97313
+ kind: "OperationDefinition",
97314
+ operation: "mutation",
97315
+ name: { kind: "Name", value: "userJiraConnect" },
97316
+ variableDefinitions: [
97317
+ {
97318
+ kind: "VariableDefinition",
97319
+ variable: { kind: "Variable", name: { kind: "Name", value: "code" } },
97320
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
97321
+ },
97322
+ ],
97323
+ selectionSet: {
97324
+ kind: "SelectionSet",
97325
+ selections: [
97326
+ {
97327
+ kind: "Field",
97328
+ name: { kind: "Name", value: "userJiraConnect" },
97329
+ arguments: [
97330
+ {
97331
+ kind: "Argument",
97332
+ name: { kind: "Name", value: "code" },
97333
+ value: { kind: "Variable", name: { kind: "Name", value: "code" } },
97334
+ },
97335
+ ],
97336
+ selectionSet: {
97337
+ kind: "SelectionSet",
97338
+ selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "UserPayload" } }],
97339
+ },
97340
+ },
97341
+ ],
97342
+ },
97343
+ },
97344
+ ...UserPayloadFragmentDoc.definitions,
97345
+ ],
97346
+ };
97301
97347
  const UserPromoteAdminDocument = {
97302
97348
  kind: "Document",
97303
97349
  definitions: [
@@ -98074,6 +98120,11 @@ const ProjectMilestonesDocument = {
98074
98120
  variable: { kind: "Variable", name: { kind: "Name", value: "before" } },
98075
98121
  type: { kind: "NamedType", name: { kind: "Name", value: "String" } },
98076
98122
  },
98123
+ {
98124
+ kind: "VariableDefinition",
98125
+ variable: { kind: "Variable", name: { kind: "Name", value: "filter" } },
98126
+ type: { kind: "NamedType", name: { kind: "Name", value: "ProjectMilestoneFilter" } },
98127
+ },
98077
98128
  {
98078
98129
  kind: "VariableDefinition",
98079
98130
  variable: { kind: "Variable", name: { kind: "Name", value: "first" } },
@@ -98112,6 +98163,11 @@ const ProjectMilestonesDocument = {
98112
98163
  name: { kind: "Name", value: "before" },
98113
98164
  value: { kind: "Variable", name: { kind: "Name", value: "before" } },
98114
98165
  },
98166
+ {
98167
+ kind: "Argument",
98168
+ name: { kind: "Name", value: "filter" },
98169
+ value: { kind: "Variable", name: { kind: "Name", value: "filter" } },
98170
+ },
98115
98171
  {
98116
98172
  kind: "Argument",
98117
98173
  name: { kind: "Name", value: "first" },
@@ -105115,46 +105171,6 @@ const OrganizationInviteDocument = {
105115
105171
  ...OrganizationInviteFragmentDoc.definitions,
105116
105172
  ],
105117
105173
  };
105118
- const OrganizationInviteDetailsDocument = {
105119
- kind: "Document",
105120
- definitions: [
105121
- {
105122
- kind: "OperationDefinition",
105123
- operation: "query",
105124
- name: { kind: "Name", value: "organizationInviteDetails" },
105125
- variableDefinitions: [
105126
- {
105127
- kind: "VariableDefinition",
105128
- variable: { kind: "Variable", name: { kind: "Name", value: "id" } },
105129
- type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
105130
- },
105131
- ],
105132
- selectionSet: {
105133
- kind: "SelectionSet",
105134
- selections: [
105135
- {
105136
- kind: "Field",
105137
- name: { kind: "Name", value: "organizationInviteDetails" },
105138
- arguments: [
105139
- {
105140
- kind: "Argument",
105141
- name: { kind: "Name", value: "id" },
105142
- value: { kind: "Variable", name: { kind: "Name", value: "id" } },
105143
- },
105144
- ],
105145
- selectionSet: {
105146
- kind: "SelectionSet",
105147
- selections: [
105148
- { kind: "FragmentSpread", name: { kind: "Name", value: "OrganizationInviteDetailsPayload" } },
105149
- ],
105150
- },
105151
- },
105152
- ],
105153
- },
105154
- },
105155
- ...OrganizationInviteDetailsPayloadFragmentDoc.definitions,
105156
- ],
105157
- };
105158
105174
  const OrganizationInvitesDocument = {
105159
105175
  kind: "Document",
105160
105176
  definitions: [
@@ -110545,6 +110561,7 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
110545
110561
  get IssueRelationType () { return IssueRelationType; },
110546
110562
  get OAuthClientApprovalStatus () { return OAuthClientApprovalStatus; },
110547
110563
  get OrganizationDomainAuthType () { return OrganizationDomainAuthType; },
110564
+ get OrganizationInviteStatus () { return OrganizationInviteStatus; },
110548
110565
  get PaginationOrderBy () { return PaginationOrderBy; },
110549
110566
  get ProjectNotificationSubscriptionType () { return ProjectNotificationSubscriptionType; },
110550
110567
  get ProjectUpdateHealthType () { return ProjectUpdateHealthType; },
@@ -110687,7 +110704,7 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
110687
110704
  OrganizationExistsPayloadFragmentDoc: OrganizationExistsPayloadFragmentDoc,
110688
110705
  OrganizationInviteFragmentDoc: OrganizationInviteFragmentDoc,
110689
110706
  OrganizationInviteConnectionFragmentDoc: OrganizationInviteConnectionFragmentDoc,
110690
- OrganizationInviteDetailsPayloadFragmentDoc: OrganizationInviteDetailsPayloadFragmentDoc,
110707
+ OrganizationInviteFullDetailsPayloadFragmentDoc: OrganizationInviteFullDetailsPayloadFragmentDoc,
110691
110708
  OrganizationInvitePayloadFragmentDoc: OrganizationInvitePayloadFragmentDoc,
110692
110709
  OrganizationPayloadFragmentDoc: OrganizationPayloadFragmentDoc,
110693
110710
  OrganizationStartPlusTrialPayloadFragmentDoc: OrganizationStartPlusTrialPayloadFragmentDoc,
@@ -110914,6 +110931,7 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
110914
110931
  UpdateUserFlagDocument: UpdateUserFlagDocument,
110915
110932
  UserGitHubConnectDocument: UserGitHubConnectDocument,
110916
110933
  UserGoogleCalendarConnectDocument: UserGoogleCalendarConnectDocument,
110934
+ UserJiraConnectDocument: UserJiraConnectDocument,
110917
110935
  UserPromoteAdminDocument: UserPromoteAdminDocument,
110918
110936
  UserPromoteMemberDocument: UserPromoteMemberDocument,
110919
110937
  UserSettingsFlagIncrementDocument: UserSettingsFlagIncrementDocument,
@@ -111018,7 +111036,6 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
111018
111036
  Organization_UsersDocument: Organization_UsersDocument,
111019
111037
  OrganizationExistsDocument: OrganizationExistsDocument,
111020
111038
  OrganizationInviteDocument: OrganizationInviteDocument,
111021
- OrganizationInviteDetailsDocument: OrganizationInviteDetailsDocument,
111022
111039
  OrganizationInvitesDocument: OrganizationInvitesDocument,
111023
111040
  ProjectDocument: ProjectDocument,
111024
111041
  Project_DocumentsDocument: Project_DocumentsDocument,
@@ -113966,12 +113983,12 @@ class OrganizationInviteConnection extends Connection {
113966
113983
  }
113967
113984
  }
113968
113985
  /**
113969
- * OrganizationInviteDetailsPayload model
113986
+ * OrganizationInviteFullDetailsPayload model
113970
113987
  *
113971
113988
  * @param request - function to call the graphql client
113972
- * @param data - L.OrganizationInviteDetailsPayloadFragment response data
113989
+ * @param data - L.OrganizationInviteFullDetailsPayloadFragment response data
113973
113990
  */
113974
- class OrganizationInviteDetailsPayload extends Request {
113991
+ class OrganizationInviteFullDetailsPayload extends Request {
113975
113992
  constructor(request, data) {
113976
113993
  var _a, _b;
113977
113994
  super(request);
@@ -115739,6 +115756,7 @@ class UserSettings extends Request {
115739
115756
  this.createdAt = (_c = parseDate(data.createdAt)) !== null && _c !== void 0 ? _c : new Date();
115740
115757
  this.id = data.id;
115741
115758
  this.notificationPreferences = (_d = parseJson(data.notificationPreferences)) !== null && _d !== void 0 ? _d : {};
115759
+ this.showFullUserNames = data.showFullUserNames;
115742
115760
  this.unsubscribedFrom = data.unsubscribedFrom;
115743
115761
  this.updatedAt = (_e = parseDate(data.updatedAt)) !== null && _e !== void 0 ? _e : new Date();
115744
115762
  this._user = data.user;
@@ -120095,6 +120113,31 @@ class UserGoogleCalendarConnectMutation extends Request {
120095
120113
  });
120096
120114
  }
120097
120115
  }
120116
+ /**
120117
+ * A fetchable UserJiraConnect Mutation
120118
+ *
120119
+ * @param request - function to call the graphql client
120120
+ */
120121
+ class UserJiraConnectMutation extends Request {
120122
+ constructor(request) {
120123
+ super(request);
120124
+ }
120125
+ /**
120126
+ * Call the UserJiraConnect mutation and return a UserPayload
120127
+ *
120128
+ * @param code - required code to pass to userJiraConnect
120129
+ * @returns parsed response from UserJiraConnectMutation
120130
+ */
120131
+ fetch(code) {
120132
+ return __awaiter(this, void 0, void 0, function* () {
120133
+ const response = yield this._request(UserJiraConnectDocument, {
120134
+ code,
120135
+ });
120136
+ const data = response.userJiraConnect;
120137
+ return new UserPayload(this._request, data);
120138
+ });
120139
+ }
120140
+ }
120098
120141
  /**
120099
120142
  * A fetchable UserPromoteAdmin Mutation
120100
120143
  *
@@ -121750,31 +121793,6 @@ class OrganizationInviteQuery extends Request {
121750
121793
  });
121751
121794
  }
121752
121795
  }
121753
- /**
121754
- * A fetchable OrganizationInviteDetails Query
121755
- *
121756
- * @param request - function to call the graphql client
121757
- */
121758
- class OrganizationInviteDetailsQuery extends Request {
121759
- constructor(request) {
121760
- super(request);
121761
- }
121762
- /**
121763
- * Call the OrganizationInviteDetails query and return a OrganizationInviteDetailsPayload
121764
- *
121765
- * @param id - required id to pass to organizationInviteDetails
121766
- * @returns parsed response from OrganizationInviteDetailsQuery
121767
- */
121768
- fetch(id) {
121769
- return __awaiter(this, void 0, void 0, function* () {
121770
- const response = yield this._request(OrganizationInviteDetailsDocument, {
121771
- id,
121772
- });
121773
- const data = response.organizationInviteDetails;
121774
- return new OrganizationInviteDetailsPayload(this._request, data);
121775
- });
121776
- }
121777
- }
121778
121796
  /**
121779
121797
  * A fetchable OrganizationInvites Query
121780
121798
  *
@@ -125879,6 +125897,15 @@ class LinearSdk extends Request {
125879
125897
  userGoogleCalendarConnect(code) {
125880
125898
  return new UserGoogleCalendarConnectMutation(this._request).fetch(code);
125881
125899
  }
125900
+ /**
125901
+ * Connects the Jira user to this Linear account via OAuth2.
125902
+ *
125903
+ * @param code - required code to pass to userJiraConnect
125904
+ * @returns UserPayload
125905
+ */
125906
+ userJiraConnect(code) {
125907
+ return new UserJiraConnectMutation(this._request).fetch(code);
125908
+ }
125882
125909
  /**
125883
125910
  * Makes user an admin. Can only be called by an admin.
125884
125911
  *
@@ -126492,15 +126519,6 @@ class LinearSdk extends Request {
126492
126519
  organizationInvite(id) {
126493
126520
  return new OrganizationInviteQuery(this._request).fetch(id);
126494
126521
  }
126495
- /**
126496
- * One specific organization invite.
126497
- *
126498
- * @param id - required id to pass to organizationInviteDetails
126499
- * @returns OrganizationInviteDetailsPayload
126500
- */
126501
- organizationInviteDetails(id) {
126502
- return new OrganizationInviteDetailsQuery(this._request).fetch(id);
126503
- }
126504
126522
  /**
126505
126523
  * All invites for the organization.
126506
126524
  *
@@ -127219,8 +127237,7 @@ exports.OrganizationExistsPayload = OrganizationExistsPayload;
127219
127237
  exports.OrganizationExistsQuery = OrganizationExistsQuery;
127220
127238
  exports.OrganizationInvite = OrganizationInvite;
127221
127239
  exports.OrganizationInviteConnection = OrganizationInviteConnection;
127222
- exports.OrganizationInviteDetailsPayload = OrganizationInviteDetailsPayload;
127223
- exports.OrganizationInviteDetailsQuery = OrganizationInviteDetailsQuery;
127240
+ exports.OrganizationInviteFullDetailsPayload = OrganizationInviteFullDetailsPayload;
127224
127241
  exports.OrganizationInvitePayload = OrganizationInvitePayload;
127225
127242
  exports.OrganizationInviteQuery = OrganizationInviteQuery;
127226
127243
  exports.OrganizationInvitesQuery = OrganizationInvitesQuery;
@@ -127397,6 +127414,7 @@ exports.UserDiscordConnectMutation = UserDiscordConnectMutation;
127397
127414
  exports.UserExternalUserDisconnectMutation = UserExternalUserDisconnectMutation;
127398
127415
  exports.UserGitHubConnectMutation = UserGitHubConnectMutation;
127399
127416
  exports.UserGoogleCalendarConnectMutation = UserGoogleCalendarConnectMutation;
127417
+ exports.UserJiraConnectMutation = UserJiraConnectMutation;
127400
127418
  exports.UserLinearError = UserLinearError;
127401
127419
  exports.UserPayload = UserPayload;
127402
127420
  exports.UserPromoteAdminMutation = UserPromoteAdminMutation;