@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-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":"5.0.0"};
12
+ const env = {"npm_package_name":"@linear/sdk","npm_package_version":"6.0.0"};
13
13
  try {
14
14
  if (process) {
15
15
  process.env = Object.assign({}, process.env);
@@ -2938,6 +2938,73 @@
2938
2938
  },
2939
2939
  ],
2940
2940
  };
2941
+ const CompanyFragmentDoc = {
2942
+ kind: "Document",
2943
+ definitions: [
2944
+ {
2945
+ kind: "FragmentDefinition",
2946
+ name: { kind: "Name", value: "Company" },
2947
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Company" } },
2948
+ selectionSet: {
2949
+ kind: "SelectionSet",
2950
+ selections: [
2951
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
2952
+ { kind: "Field", name: { kind: "Name", value: "externalId" } },
2953
+ { kind: "Field", name: { kind: "Name", value: "logoUrl" } },
2954
+ { kind: "Field", name: { kind: "Name", value: "name" } },
2955
+ { kind: "Field", name: { kind: "Name", value: "websiteUrl" } },
2956
+ { kind: "Field", name: { kind: "Name", value: "companyProperties" } },
2957
+ { kind: "Field", name: { kind: "Name", value: "updatedAt" } },
2958
+ { kind: "Field", name: { kind: "Name", value: "archivedAt" } },
2959
+ { kind: "Field", name: { kind: "Name", value: "createdAt" } },
2960
+ { kind: "Field", name: { kind: "Name", value: "id" } },
2961
+ {
2962
+ kind: "Field",
2963
+ name: { kind: "Name", value: "creator" },
2964
+ selectionSet: {
2965
+ kind: "SelectionSet",
2966
+ selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
2967
+ },
2968
+ },
2969
+ ],
2970
+ },
2971
+ },
2972
+ ],
2973
+ };
2974
+ const CompanyConnectionFragmentDoc = {
2975
+ kind: "Document",
2976
+ definitions: [
2977
+ {
2978
+ kind: "FragmentDefinition",
2979
+ name: { kind: "Name", value: "CompanyConnection" },
2980
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CompanyConnection" } },
2981
+ selectionSet: {
2982
+ kind: "SelectionSet",
2983
+ selections: [
2984
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
2985
+ {
2986
+ kind: "Field",
2987
+ name: { kind: "Name", value: "nodes" },
2988
+ selectionSet: {
2989
+ kind: "SelectionSet",
2990
+ selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "Company" } }],
2991
+ },
2992
+ },
2993
+ {
2994
+ kind: "Field",
2995
+ name: { kind: "Name", value: "pageInfo" },
2996
+ selectionSet: {
2997
+ kind: "SelectionSet",
2998
+ selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PageInfo" } }],
2999
+ },
3000
+ },
3001
+ ],
3002
+ },
3003
+ },
3004
+ ...CompanyFragmentDoc.definitions,
3005
+ ...PageInfoFragmentDoc.definitions,
3006
+ ],
3007
+ };
2941
3008
  const ContactPayloadFragmentDoc = {
2942
3009
  kind: "Document",
2943
3010
  definitions: [
@@ -3033,6 +3100,7 @@
3033
3100
  selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
3034
3101
  },
3035
3102
  },
3103
+ { kind: "Field", name: { kind: "Name", value: "shared" } },
3036
3104
  {
3037
3105
  kind: "Field",
3038
3106
  name: { kind: "Name", value: "owner" },
@@ -3041,7 +3109,6 @@
3041
3109
  selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }],
3042
3110
  },
3043
3111
  },
3044
- { kind: "Field", name: { kind: "Name", value: "shared" } },
3045
3112
  ],
3046
3113
  },
3047
3114
  },
@@ -11050,6 +11117,54 @@
11050
11117
  ...ArchivePayloadFragmentDoc.definitions,
11051
11118
  ],
11052
11119
  };
11120
+ const IntegrationUpdateSlackDocument = {
11121
+ kind: "Document",
11122
+ definitions: [
11123
+ {
11124
+ kind: "OperationDefinition",
11125
+ operation: "mutation",
11126
+ name: { kind: "Name", value: "integrationUpdateSlack" },
11127
+ variableDefinitions: [
11128
+ {
11129
+ kind: "VariableDefinition",
11130
+ variable: { kind: "Variable", name: { kind: "Name", value: "code" } },
11131
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
11132
+ },
11133
+ {
11134
+ kind: "VariableDefinition",
11135
+ variable: { kind: "Variable", name: { kind: "Name", value: "redirectUri" } },
11136
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
11137
+ },
11138
+ ],
11139
+ selectionSet: {
11140
+ kind: "SelectionSet",
11141
+ selections: [
11142
+ {
11143
+ kind: "Field",
11144
+ name: { kind: "Name", value: "integrationUpdateSlack" },
11145
+ arguments: [
11146
+ {
11147
+ kind: "Argument",
11148
+ name: { kind: "Name", value: "code" },
11149
+ value: { kind: "Variable", name: { kind: "Name", value: "code" } },
11150
+ },
11151
+ {
11152
+ kind: "Argument",
11153
+ name: { kind: "Name", value: "redirectUri" },
11154
+ value: { kind: "Variable", name: { kind: "Name", value: "redirectUri" } },
11155
+ },
11156
+ ],
11157
+ selectionSet: {
11158
+ kind: "SelectionSet",
11159
+ selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "IntegrationPayload" } }],
11160
+ },
11161
+ },
11162
+ ],
11163
+ },
11164
+ },
11165
+ ...IntegrationPayloadFragmentDoc.definitions,
11166
+ ],
11167
+ };
11053
11168
  const IntegrationZendeskDocument = {
11054
11169
  kind: "Document",
11055
11170
  definitions: [
@@ -28596,6 +28711,8 @@
28596
28711
  CommentFragmentDoc: CommentFragmentDoc,
28597
28712
  CommentConnectionFragmentDoc: CommentConnectionFragmentDoc,
28598
28713
  CommentPayloadFragmentDoc: CommentPayloadFragmentDoc,
28714
+ CompanyFragmentDoc: CompanyFragmentDoc,
28715
+ CompanyConnectionFragmentDoc: CompanyConnectionFragmentDoc,
28599
28716
  ContactPayloadFragmentDoc: ContactPayloadFragmentDoc,
28600
28717
  CreateCsvExportReportPayloadFragmentDoc: CreateCsvExportReportPayloadFragmentDoc,
28601
28718
  CreateOrJoinOrganizationResponseFragmentDoc: CreateOrJoinOrganizationResponseFragmentDoc,
@@ -28813,6 +28930,7 @@
28813
28930
  IntegrationSlackProjectPostDocument: IntegrationSlackProjectPostDocument,
28814
28931
  CreateIntegrationTemplateDocument: CreateIntegrationTemplateDocument,
28815
28932
  DeleteIntegrationTemplateDocument: DeleteIntegrationTemplateDocument,
28933
+ IntegrationUpdateSlackDocument: IntegrationUpdateSlackDocument,
28816
28934
  IntegrationZendeskDocument: IntegrationZendeskDocument,
28817
28935
  CreateIntegrationsSettingsDocument: CreateIntegrationsSettingsDocument,
28818
28936
  UpdateIntegrationsSettingsDocument: UpdateIntegrationsSettingsDocument,
@@ -29541,6 +29659,48 @@
29541
29659
  return new CommentQuery(this._request).fetch(this._comment.id);
29542
29660
  }
29543
29661
  }
29662
+ /**
29663
+ * A company related to issue's origin.
29664
+ *
29665
+ * @param request - function to call the graphql client
29666
+ * @param data - L.CompanyFragment response data
29667
+ */
29668
+ class Company extends Request {
29669
+ constructor(request, data) {
29670
+ var _a, _b, _c, _d, _e, _f;
29671
+ super(request);
29672
+ this.archivedAt = (_a = parseDate(data.archivedAt)) !== null && _a !== void 0 ? _a : undefined;
29673
+ this.companyProperties = (_b = parseJson(data.companyProperties)) !== null && _b !== void 0 ? _b : {};
29674
+ this.createdAt = (_c = parseDate(data.createdAt)) !== null && _c !== void 0 ? _c : new Date();
29675
+ this.externalId = data.externalId;
29676
+ this.id = data.id;
29677
+ this.logoUrl = (_d = data.logoUrl) !== null && _d !== void 0 ? _d : undefined;
29678
+ this.name = data.name;
29679
+ this.updatedAt = (_e = parseDate(data.updatedAt)) !== null && _e !== void 0 ? _e : new Date();
29680
+ this.websiteUrl = (_f = data.websiteUrl) !== null && _f !== void 0 ? _f : undefined;
29681
+ this._creator = data.creator;
29682
+ }
29683
+ /** The user who added the company. */
29684
+ get creator() {
29685
+ return new UserQuery(this._request).fetch(this._creator.id);
29686
+ }
29687
+ /** The organization of the customer. */
29688
+ get organization() {
29689
+ return new OrganizationQuery(this._request).fetch();
29690
+ }
29691
+ }
29692
+ /**
29693
+ * CompanyConnection model
29694
+ *
29695
+ * @param request - function to call the graphql client
29696
+ * @param fetch - function to trigger a refetch of this CompanyConnection model
29697
+ * @param data - CompanyConnection response data
29698
+ */
29699
+ class CompanyConnection extends Connection {
29700
+ constructor(request, fetch, data) {
29701
+ super(request, fetch, data.nodes.map(node => new Company(request, node)), new PageInfo(request, data.pageInfo));
29702
+ }
29703
+ }
29544
29704
  /**
29545
29705
  * ContactPayload model
29546
29706
  *
@@ -29616,7 +29776,7 @@
29616
29776
  get organization() {
29617
29777
  return new OrganizationQuery(this._request).fetch();
29618
29778
  }
29619
- /** The user who owns the custom view. */
29779
+ /** [Deprecated] The user who owns the custom view. */
29620
29780
  get owner() {
29621
29781
  return new UserQuery(this._request).fetch(this._owner.id);
29622
29782
  }
@@ -35743,6 +35903,33 @@
35743
35903
  });
35744
35904
  }
35745
35905
  }
35906
+ /**
35907
+ * A fetchable IntegrationUpdateSlack Mutation
35908
+ *
35909
+ * @param request - function to call the graphql client
35910
+ */
35911
+ class IntegrationUpdateSlackMutation extends Request {
35912
+ constructor(request) {
35913
+ super(request);
35914
+ }
35915
+ /**
35916
+ * Call the IntegrationUpdateSlack mutation and return a IntegrationPayload
35917
+ *
35918
+ * @param code - required code to pass to integrationUpdateSlack
35919
+ * @param redirectUri - required redirectUri to pass to integrationUpdateSlack
35920
+ * @returns parsed response from IntegrationUpdateSlackMutation
35921
+ */
35922
+ fetch(code, redirectUri) {
35923
+ return __awaiter(this, void 0, void 0, function* () {
35924
+ const response = yield this._request(IntegrationUpdateSlackDocument, {
35925
+ code,
35926
+ redirectUri,
35927
+ });
35928
+ const data = response.integrationUpdateSlack;
35929
+ return new IntegrationPayload(this._request, data);
35930
+ });
35931
+ }
35932
+ }
35746
35933
  /**
35747
35934
  * A fetchable IntegrationZendesk Mutation
35748
35935
  *
@@ -43007,6 +43194,16 @@
43007
43194
  deleteIntegrationTemplate(id) {
43008
43195
  return new DeleteIntegrationTemplateMutation(this._request).fetch(id);
43009
43196
  }
43197
+ /**
43198
+ * Updates the organization's Slack integration.
43199
+ *
43200
+ * @param code - required code to pass to integrationUpdateSlack
43201
+ * @param redirectUri - required redirectUri to pass to integrationUpdateSlack
43202
+ * @returns IntegrationPayload
43203
+ */
43204
+ integrationUpdateSlack(code, redirectUri) {
43205
+ return new IntegrationUpdateSlackMutation(this._request).fetch(code, redirectUri);
43206
+ }
43010
43207
  /**
43011
43208
  * Integrates the organization with Zendesk.
43012
43209
  *
@@ -44936,6 +45133,8 @@
44936
45133
  exports.CommentQuery = CommentQuery;
44937
45134
  exports.Comment_ChildrenQuery = Comment_ChildrenQuery;
44938
45135
  exports.CommentsQuery = CommentsQuery;
45136
+ exports.Company = Company;
45137
+ exports.CompanyConnection = CompanyConnection;
44939
45138
  exports.Connection = Connection;
44940
45139
  exports.ContactPayload = ContactPayload;
44941
45140
  exports.CreateApiKeyMutation = CreateApiKeyMutation;
@@ -45098,6 +45297,7 @@
45098
45297
  exports.IntegrationTemplatePayload = IntegrationTemplatePayload;
45099
45298
  exports.IntegrationTemplateQuery = IntegrationTemplateQuery;
45100
45299
  exports.IntegrationTemplatesQuery = IntegrationTemplatesQuery;
45300
+ exports.IntegrationUpdateSlackMutation = IntegrationUpdateSlackMutation;
45101
45301
  exports.IntegrationZendeskMutation = IntegrationZendeskMutation;
45102
45302
  exports.IntegrationsQuery = IntegrationsQuery;
45103
45303
  exports.IntegrationsSettings = IntegrationsSettings;