@linear/sdk 5.0.0 → 6.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
@@ -84964,6 +84964,73 @@ const CommentPayloadFragmentDoc = {
84964
84964
  },
84965
84965
  ],
84966
84966
  };
84967
+ const CompanyFragmentDoc = {
84968
+ kind: "Document",
84969
+ definitions: [
84970
+ {
84971
+ kind: "FragmentDefinition",
84972
+ name: { kind: "Name", value: "Company" },
84973
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Company" } },
84974
+ selectionSet: {
84975
+ kind: "SelectionSet",
84976
+ selections: [
84977
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
84978
+ { kind: "Field", name: { kind: "Name", value: "externalId" } },
84979
+ { kind: "Field", name: { kind: "Name", value: "logoUrl" } },
84980
+ { kind: "Field", name: { kind: "Name", value: "name" } },
84981
+ { kind: "Field", name: { kind: "Name", value: "websiteUrl" } },
84982
+ { kind: "Field", name: { kind: "Name", value: "companyProperties" } },
84983
+ { kind: "Field", name: { kind: "Name", value: "updatedAt" } },
84984
+ { kind: "Field", name: { kind: "Name", value: "archivedAt" } },
84985
+ { kind: "Field", name: { kind: "Name", value: "createdAt" } },
84986
+ { kind: "Field", name: { kind: "Name", value: "id" } },
84987
+ {
84988
+ kind: "Field",
84989
+ name: { kind: "Name", value: "creator" },
84990
+ selectionSet: {
84991
+ kind: "SelectionSet",
84992
+ selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
84993
+ },
84994
+ },
84995
+ ],
84996
+ },
84997
+ },
84998
+ ],
84999
+ };
85000
+ const CompanyConnectionFragmentDoc = {
85001
+ kind: "Document",
85002
+ definitions: [
85003
+ {
85004
+ kind: "FragmentDefinition",
85005
+ name: { kind: "Name", value: "CompanyConnection" },
85006
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CompanyConnection" } },
85007
+ selectionSet: {
85008
+ kind: "SelectionSet",
85009
+ selections: [
85010
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
85011
+ {
85012
+ kind: "Field",
85013
+ name: { kind: "Name", value: "nodes" },
85014
+ selectionSet: {
85015
+ kind: "SelectionSet",
85016
+ selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "Company" } }],
85017
+ },
85018
+ },
85019
+ {
85020
+ kind: "Field",
85021
+ name: { kind: "Name", value: "pageInfo" },
85022
+ selectionSet: {
85023
+ kind: "SelectionSet",
85024
+ selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PageInfo" } }],
85025
+ },
85026
+ },
85027
+ ],
85028
+ },
85029
+ },
85030
+ ...CompanyFragmentDoc.definitions,
85031
+ ...PageInfoFragmentDoc.definitions,
85032
+ ],
85033
+ };
84967
85034
  const ContactPayloadFragmentDoc = {
84968
85035
  kind: "Document",
84969
85036
  definitions: [
@@ -85059,6 +85126,7 @@ const CustomViewFragmentDoc = {
85059
85126
  selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
85060
85127
  },
85061
85128
  },
85129
+ { kind: "Field", name: { kind: "Name", value: "shared" } },
85062
85130
  {
85063
85131
  kind: "Field",
85064
85132
  name: { kind: "Name", value: "owner" },
@@ -85067,7 +85135,6 @@ const CustomViewFragmentDoc = {
85067
85135
  selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
85068
85136
  },
85069
85137
  },
85070
- { kind: "Field", name: { kind: "Name", value: "shared" } },
85071
85138
  ],
85072
85139
  },
85073
85140
  },
@@ -93076,6 +93143,54 @@ const DeleteIntegrationTemplateDocument = {
93076
93143
  ...ArchivePayloadFragmentDoc.definitions,
93077
93144
  ],
93078
93145
  };
93146
+ const IntegrationUpdateSlackDocument = {
93147
+ kind: "Document",
93148
+ definitions: [
93149
+ {
93150
+ kind: "OperationDefinition",
93151
+ operation: "mutation",
93152
+ name: { kind: "Name", value: "integrationUpdateSlack" },
93153
+ variableDefinitions: [
93154
+ {
93155
+ kind: "VariableDefinition",
93156
+ variable: { kind: "Variable", name: { kind: "Name", value: "code" } },
93157
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
93158
+ },
93159
+ {
93160
+ kind: "VariableDefinition",
93161
+ variable: { kind: "Variable", name: { kind: "Name", value: "redirectUri" } },
93162
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
93163
+ },
93164
+ ],
93165
+ selectionSet: {
93166
+ kind: "SelectionSet",
93167
+ selections: [
93168
+ {
93169
+ kind: "Field",
93170
+ name: { kind: "Name", value: "integrationUpdateSlack" },
93171
+ arguments: [
93172
+ {
93173
+ kind: "Argument",
93174
+ name: { kind: "Name", value: "code" },
93175
+ value: { kind: "Variable", name: { kind: "Name", value: "code" } },
93176
+ },
93177
+ {
93178
+ kind: "Argument",
93179
+ name: { kind: "Name", value: "redirectUri" },
93180
+ value: { kind: "Variable", name: { kind: "Name", value: "redirectUri" } },
93181
+ },
93182
+ ],
93183
+ selectionSet: {
93184
+ kind: "SelectionSet",
93185
+ selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "IntegrationPayload" } }],
93186
+ },
93187
+ },
93188
+ ],
93189
+ },
93190
+ },
93191
+ ...IntegrationPayloadFragmentDoc.definitions,
93192
+ ],
93193
+ };
93079
93194
  const IntegrationZendeskDocument = {
93080
93195
  kind: "Document",
93081
93196
  definitions: [
@@ -110622,6 +110737,8 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
110622
110737
  CommentFragmentDoc: CommentFragmentDoc,
110623
110738
  CommentConnectionFragmentDoc: CommentConnectionFragmentDoc,
110624
110739
  CommentPayloadFragmentDoc: CommentPayloadFragmentDoc,
110740
+ CompanyFragmentDoc: CompanyFragmentDoc,
110741
+ CompanyConnectionFragmentDoc: CompanyConnectionFragmentDoc,
110625
110742
  ContactPayloadFragmentDoc: ContactPayloadFragmentDoc,
110626
110743
  CreateCsvExportReportPayloadFragmentDoc: CreateCsvExportReportPayloadFragmentDoc,
110627
110744
  CreateOrJoinOrganizationResponseFragmentDoc: CreateOrJoinOrganizationResponseFragmentDoc,
@@ -110839,6 +110956,7 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
110839
110956
  IntegrationSlackProjectPostDocument: IntegrationSlackProjectPostDocument,
110840
110957
  CreateIntegrationTemplateDocument: CreateIntegrationTemplateDocument,
110841
110958
  DeleteIntegrationTemplateDocument: DeleteIntegrationTemplateDocument,
110959
+ IntegrationUpdateSlackDocument: IntegrationUpdateSlackDocument,
110842
110960
  IntegrationZendeskDocument: IntegrationZendeskDocument,
110843
110961
  CreateIntegrationsSettingsDocument: CreateIntegrationsSettingsDocument,
110844
110962
  UpdateIntegrationsSettingsDocument: UpdateIntegrationsSettingsDocument,
@@ -111567,6 +111685,48 @@ class CommentPayload extends Request {
111567
111685
  return new CommentQuery(this._request).fetch(this._comment.id);
111568
111686
  }
111569
111687
  }
111688
+ /**
111689
+ * A company related to issue's origin.
111690
+ *
111691
+ * @param request - function to call the graphql client
111692
+ * @param data - L.CompanyFragment response data
111693
+ */
111694
+ class Company extends Request {
111695
+ constructor(request, data) {
111696
+ var _a, _b, _c, _d, _e, _f;
111697
+ super(request);
111698
+ this.archivedAt = (_a = parseDate(data.archivedAt)) !== null && _a !== void 0 ? _a : undefined;
111699
+ this.companyProperties = (_b = parseJson(data.companyProperties)) !== null && _b !== void 0 ? _b : {};
111700
+ this.createdAt = (_c = parseDate(data.createdAt)) !== null && _c !== void 0 ? _c : new Date();
111701
+ this.externalId = data.externalId;
111702
+ this.id = data.id;
111703
+ this.logoUrl = (_d = data.logoUrl) !== null && _d !== void 0 ? _d : undefined;
111704
+ this.name = data.name;
111705
+ this.updatedAt = (_e = parseDate(data.updatedAt)) !== null && _e !== void 0 ? _e : new Date();
111706
+ this.websiteUrl = (_f = data.websiteUrl) !== null && _f !== void 0 ? _f : undefined;
111707
+ this._creator = data.creator;
111708
+ }
111709
+ /** The user who added the company. */
111710
+ get creator() {
111711
+ return new UserQuery(this._request).fetch(this._creator.id);
111712
+ }
111713
+ /** The organization of the customer. */
111714
+ get organization() {
111715
+ return new OrganizationQuery(this._request).fetch();
111716
+ }
111717
+ }
111718
+ /**
111719
+ * CompanyConnection model
111720
+ *
111721
+ * @param request - function to call the graphql client
111722
+ * @param fetch - function to trigger a refetch of this CompanyConnection model
111723
+ * @param data - CompanyConnection response data
111724
+ */
111725
+ class CompanyConnection extends Connection {
111726
+ constructor(request, fetch, data) {
111727
+ super(request, fetch, data.nodes.map(node => new Company(request, node)), new PageInfo(request, data.pageInfo));
111728
+ }
111729
+ }
111570
111730
  /**
111571
111731
  * ContactPayload model
111572
111732
  *
@@ -111642,7 +111802,7 @@ class CustomView extends Request {
111642
111802
  get organization() {
111643
111803
  return new OrganizationQuery(this._request).fetch();
111644
111804
  }
111645
- /** The user who owns the custom view. */
111805
+ /** [Deprecated] The user who owns the custom view. */
111646
111806
  get owner() {
111647
111807
  return new UserQuery(this._request).fetch(this._owner.id);
111648
111808
  }
@@ -117769,6 +117929,33 @@ class DeleteIntegrationTemplateMutation extends Request {
117769
117929
  });
117770
117930
  }
117771
117931
  }
117932
+ /**
117933
+ * A fetchable IntegrationUpdateSlack Mutation
117934
+ *
117935
+ * @param request - function to call the graphql client
117936
+ */
117937
+ class IntegrationUpdateSlackMutation extends Request {
117938
+ constructor(request) {
117939
+ super(request);
117940
+ }
117941
+ /**
117942
+ * Call the IntegrationUpdateSlack mutation and return a IntegrationPayload
117943
+ *
117944
+ * @param code - required code to pass to integrationUpdateSlack
117945
+ * @param redirectUri - required redirectUri to pass to integrationUpdateSlack
117946
+ * @returns parsed response from IntegrationUpdateSlackMutation
117947
+ */
117948
+ fetch(code, redirectUri) {
117949
+ return __awaiter(this, void 0, void 0, function* () {
117950
+ const response = yield this._request(IntegrationUpdateSlackDocument, {
117951
+ code,
117952
+ redirectUri,
117953
+ });
117954
+ const data = response.integrationUpdateSlack;
117955
+ return new IntegrationPayload(this._request, data);
117956
+ });
117957
+ }
117958
+ }
117772
117959
  /**
117773
117960
  * A fetchable IntegrationZendesk Mutation
117774
117961
  *
@@ -125033,6 +125220,16 @@ class LinearSdk extends Request {
125033
125220
  deleteIntegrationTemplate(id) {
125034
125221
  return new DeleteIntegrationTemplateMutation(this._request).fetch(id);
125035
125222
  }
125223
+ /**
125224
+ * Updates the organization's Slack integration.
125225
+ *
125226
+ * @param code - required code to pass to integrationUpdateSlack
125227
+ * @param redirectUri - required redirectUri to pass to integrationUpdateSlack
125228
+ * @returns IntegrationPayload
125229
+ */
125230
+ integrationUpdateSlack(code, redirectUri) {
125231
+ return new IntegrationUpdateSlackMutation(this._request).fetch(code, redirectUri);
125232
+ }
125036
125233
  /**
125037
125234
  * Integrates the organization with Zendesk.
125038
125235
  *
@@ -126962,6 +127159,8 @@ exports.CommentPayload = CommentPayload;
126962
127159
  exports.CommentQuery = CommentQuery;
126963
127160
  exports.Comment_ChildrenQuery = Comment_ChildrenQuery;
126964
127161
  exports.CommentsQuery = CommentsQuery;
127162
+ exports.Company = Company;
127163
+ exports.CompanyConnection = CompanyConnection;
126965
127164
  exports.Connection = Connection;
126966
127165
  exports.ContactPayload = ContactPayload;
126967
127166
  exports.CreateApiKeyMutation = CreateApiKeyMutation;
@@ -127124,6 +127323,7 @@ exports.IntegrationTemplateConnection = IntegrationTemplateConnection;
127124
127323
  exports.IntegrationTemplatePayload = IntegrationTemplatePayload;
127125
127324
  exports.IntegrationTemplateQuery = IntegrationTemplateQuery;
127126
127325
  exports.IntegrationTemplatesQuery = IntegrationTemplatesQuery;
127326
+ exports.IntegrationUpdateSlackMutation = IntegrationUpdateSlackMutation;
127127
127327
  exports.IntegrationZendeskMutation = IntegrationZendeskMutation;
127128
127328
  exports.IntegrationsQuery = IntegrationsQuery;
127129
127329
  exports.IntegrationsSettings = IntegrationsSettings;