@linear/sdk 18.1.0 → 19.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/_generated_documents.d.ts +6 -24
- package/dist/_generated_documents.d.ts.map +1 -1
- package/dist/_generated_sdk.d.ts +10 -30
- package/dist/_generated_sdk.d.ts.map +1 -1
- package/dist/client.d.ts +1 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/index-cjs.js +25 -105
- package/dist/index-cjs.js.map +1 -1
- package/dist/index-cjs.min.js +1 -1
- package/dist/index-cjs.min.js.br +0 -0
- package/dist/index-cjs.min.js.gz +0 -0
- package/dist/index-cjs.min.js.map +1 -1
- package/dist/index-es.js +26 -105
- package/dist/index-es.js.map +1 -1
- package/dist/index-es.min.js +1 -1
- package/dist/index-es.min.js.br +0 -0
- package/dist/index-es.min.js.gz +0 -0
- package/dist/index-es.min.js.map +1 -1
- package/dist/index-umd.js +26 -106
- package/dist/index-umd.js.map +1 -1
- package/dist/index-umd.min.js +1 -1
- package/dist/index-umd.min.js.br +0 -0
- package/dist/index-umd.min.js.gz +0 -0
- package/dist/index-umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import { LinearGraphQLClient } from "./graphql-client";
|
2
2
|
import { LinearClientOptions, LinearClientParsedOptions } from "./types";
|
3
|
-
import {
|
4
|
-
import { Node } from "./_generated_documents";
|
3
|
+
import { LinearSdk } from "./_generated_sdk";
|
5
4
|
/**
|
6
5
|
* Create a Linear API client
|
7
6
|
*
|
@@ -11,11 +10,5 @@ export declare class LinearClient extends LinearSdk {
|
|
11
10
|
options: LinearClientParsedOptions;
|
12
11
|
client: LinearGraphQLClient;
|
13
12
|
constructor(options: LinearClientOptions);
|
14
|
-
/**
|
15
|
-
* Helper to paginate over all pages of a given connection query.
|
16
|
-
* @param fn The query to paginate
|
17
|
-
* @param args The arguments to pass to the query
|
18
|
-
*/
|
19
|
-
paginate<T extends Node, U>(fn: (variables: U) => LinearFetch<Connection<T>>, args: U): Promise<T[]>;
|
20
13
|
}
|
21
14
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzE,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA0C7C;;;;GAIG;AACH,qBAAa,YAAa,SAAQ,SAAS;IAClC,OAAO,EAAE,yBAAyB,CAAC;IACnC,MAAM,EAAE,mBAAmB,CAAC;gBAEhB,OAAO,EAAE,mBAAmB;CAehD"}
|
package/dist/index-cjs.js
CHANGED
@@ -100897,44 +100897,6 @@ const OrganizationInvitesDocument = {
|
|
100897
100897
|
...PageInfoFragmentDoc.definitions,
|
100898
100898
|
],
|
100899
100899
|
};
|
100900
|
-
const OrganizationRegionDocument = {
|
100901
|
-
kind: "Document",
|
100902
|
-
definitions: [
|
100903
|
-
{
|
100904
|
-
kind: "OperationDefinition",
|
100905
|
-
operation: "query",
|
100906
|
-
name: { kind: "Name", value: "organizationRegion" },
|
100907
|
-
variableDefinitions: [
|
100908
|
-
{
|
100909
|
-
kind: "VariableDefinition",
|
100910
|
-
variable: { kind: "Variable", name: { kind: "Name", value: "id" } },
|
100911
|
-
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } },
|
100912
|
-
},
|
100913
|
-
],
|
100914
|
-
selectionSet: {
|
100915
|
-
kind: "SelectionSet",
|
100916
|
-
selections: [
|
100917
|
-
{
|
100918
|
-
kind: "Field",
|
100919
|
-
name: { kind: "Name", value: "organizationRegion" },
|
100920
|
-
arguments: [
|
100921
|
-
{
|
100922
|
-
kind: "Argument",
|
100923
|
-
name: { kind: "Name", value: "id" },
|
100924
|
-
value: { kind: "Variable", name: { kind: "Name", value: "id" } },
|
100925
|
-
},
|
100926
|
-
],
|
100927
|
-
selectionSet: {
|
100928
|
-
kind: "SelectionSet",
|
100929
|
-
selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "OrganizationRegionResponse" } }],
|
100930
|
-
},
|
100931
|
-
},
|
100932
|
-
],
|
100933
|
-
},
|
100934
|
-
},
|
100935
|
-
...OrganizationRegionResponseFragmentDoc.definitions,
|
100936
|
-
],
|
100937
|
-
};
|
100938
100900
|
const ProjectDocument = {
|
100939
100901
|
kind: "Document",
|
100940
100902
|
definitions: [
|
@@ -107863,7 +107825,7 @@ const AttachmentLinkSlackDocument = {
|
|
107863
107825
|
{
|
107864
107826
|
kind: "VariableDefinition",
|
107865
107827
|
variable: { kind: "Variable", name: { kind: "Name", value: "channel" } },
|
107866
|
-
type: { kind: "
|
107828
|
+
type: { kind: "NamedType", name: { kind: "Name", value: "String" } },
|
107867
107829
|
},
|
107868
107830
|
{
|
107869
107831
|
kind: "VariableDefinition",
|
@@ -107888,7 +107850,7 @@ const AttachmentLinkSlackDocument = {
|
|
107888
107850
|
{
|
107889
107851
|
kind: "VariableDefinition",
|
107890
107852
|
variable: { kind: "Variable", name: { kind: "Name", value: "latest" } },
|
107891
|
-
type: { kind: "
|
107853
|
+
type: { kind: "NamedType", name: { kind: "Name", value: "String" } },
|
107892
107854
|
},
|
107893
107855
|
{
|
107894
107856
|
kind: "VariableDefinition",
|
@@ -117177,7 +117139,6 @@ var _generated_documents = /*#__PURE__*/Object.freeze({
|
|
117177
117139
|
OrganizationExistsDocument: OrganizationExistsDocument,
|
117178
117140
|
OrganizationInviteDocument: OrganizationInviteDocument,
|
117179
117141
|
OrganizationInvitesDocument: OrganizationInvitesDocument,
|
117180
|
-
OrganizationRegionDocument: OrganizationRegionDocument,
|
117181
117142
|
ProjectDocument: ProjectDocument,
|
117182
117143
|
Project_DocumentsDocument: Project_DocumentsDocument,
|
117183
117144
|
Project_IssuesDocument: Project_IssuesDocument,
|
@@ -117461,6 +117422,23 @@ class Request {
|
|
117461
117422
|
constructor(request) {
|
117462
117423
|
this._request = request;
|
117463
117424
|
}
|
117425
|
+
/**
|
117426
|
+
* Helper to paginate over all pages of a given connection query.
|
117427
|
+
* @param fn The query to paginate
|
117428
|
+
* @param args The arguments to pass to the query
|
117429
|
+
*/
|
117430
|
+
paginate(fn, args) {
|
117431
|
+
return __awaiter(this, void 0, void 0, function* () {
|
117432
|
+
const boundFn = fn.bind(this);
|
117433
|
+
let connection = yield boundFn(args);
|
117434
|
+
const nodes = connection.nodes;
|
117435
|
+
while (connection.pageInfo.hasNextPage) {
|
117436
|
+
connection = yield boundFn(Object.assign(Object.assign({}, args), { after: connection.pageInfo.endCursor }));
|
117437
|
+
nodes.push(...connection.nodes);
|
117438
|
+
}
|
117439
|
+
return nodes;
|
117440
|
+
});
|
117441
|
+
}
|
117464
117442
|
}
|
117465
117443
|
/**
|
117466
117444
|
* Default connection variables required for pagination
|
@@ -125637,31 +125615,6 @@ class OrganizationInvitesQuery extends Request {
|
|
125637
125615
|
});
|
125638
125616
|
}
|
125639
125617
|
}
|
125640
|
-
/**
|
125641
|
-
* A fetchable OrganizationRegion Query
|
125642
|
-
*
|
125643
|
-
* @param request - function to call the graphql client
|
125644
|
-
*/
|
125645
|
-
class OrganizationRegionQuery extends Request {
|
125646
|
-
constructor(request) {
|
125647
|
-
super(request);
|
125648
|
-
}
|
125649
|
-
/**
|
125650
|
-
* Call the OrganizationRegion query and return a OrganizationRegionResponse
|
125651
|
-
*
|
125652
|
-
* @param id - required id to pass to organizationRegion
|
125653
|
-
* @returns parsed response from OrganizationRegionQuery
|
125654
|
-
*/
|
125655
|
-
fetch(id) {
|
125656
|
-
return __awaiter(this, void 0, void 0, function* () {
|
125657
|
-
const response = yield this._request(OrganizationRegionDocument, {
|
125658
|
-
id,
|
125659
|
-
});
|
125660
|
-
const data = response.organizationRegion;
|
125661
|
-
return new OrganizationRegionResponse(this._request, data);
|
125662
|
-
});
|
125663
|
-
}
|
125664
|
-
}
|
125665
125618
|
/**
|
125666
125619
|
* A fetchable Project Query
|
125667
125620
|
*
|
@@ -126877,18 +126830,14 @@ class AttachmentLinkSlackMutation extends Request {
|
|
126877
126830
|
/**
|
126878
126831
|
* Call the AttachmentLinkSlack mutation and return a AttachmentPayload
|
126879
126832
|
*
|
126880
|
-
* @param channel - required channel to pass to attachmentLinkSlack
|
126881
126833
|
* @param issueId - required issueId to pass to attachmentLinkSlack
|
126882
|
-
* @param latest - required latest to pass to attachmentLinkSlack
|
126883
126834
|
* @param url - required url to pass to attachmentLinkSlack
|
126884
|
-
* @param variables - variables without '
|
126835
|
+
* @param variables - variables without 'issueId', 'url' to pass into the AttachmentLinkSlackMutation
|
126885
126836
|
* @returns parsed response from AttachmentLinkSlackMutation
|
126886
126837
|
*/
|
126887
|
-
fetch(
|
126838
|
+
fetch(issueId, url, variables) {
|
126888
126839
|
return __awaiter(this, void 0, void 0, function* () {
|
126889
|
-
const response = yield this._request(AttachmentLinkSlackDocument, Object.assign({
|
126890
|
-
issueId,
|
126891
|
-
latest,
|
126840
|
+
const response = yield this._request(AttachmentLinkSlackDocument, Object.assign({ issueId,
|
126892
126841
|
url }, variables));
|
126893
126842
|
const data = response.attachmentLinkSlack;
|
126894
126843
|
return new AttachmentPayload(this._request, data);
|
@@ -134264,15 +134213,6 @@ class LinearSdk extends Request {
|
|
134264
134213
|
organizationInvites(variables) {
|
134265
134214
|
return new OrganizationInvitesQuery(this._request).fetch(variables);
|
134266
134215
|
}
|
134267
|
-
/**
|
134268
|
-
* Fetch the region for the organization.
|
134269
|
-
*
|
134270
|
-
* @param id - required id to pass to organizationRegion
|
134271
|
-
* @returns OrganizationRegionResponse
|
134272
|
-
*/
|
134273
|
-
organizationRegion(id) {
|
134274
|
-
return new OrganizationRegionQuery(this._request).fetch(id);
|
134275
|
-
}
|
134276
134216
|
/**
|
134277
134217
|
* One specific project.
|
134278
134218
|
*
|
@@ -134734,15 +134674,13 @@ class LinearSdk extends Request {
|
|
134734
134674
|
/**
|
134735
134675
|
* Link an existing Slack message to an issue.
|
134736
134676
|
*
|
134737
|
-
* @param channel - required channel to pass to attachmentLinkSlack
|
134738
134677
|
* @param issueId - required issueId to pass to attachmentLinkSlack
|
134739
|
-
* @param latest - required latest to pass to attachmentLinkSlack
|
134740
134678
|
* @param url - required url to pass to attachmentLinkSlack
|
134741
|
-
* @param variables - variables without '
|
134679
|
+
* @param variables - variables without 'issueId', 'url' to pass into the AttachmentLinkSlackMutation
|
134742
134680
|
* @returns AttachmentPayload
|
134743
134681
|
*/
|
134744
|
-
attachmentLinkSlack(
|
134745
|
-
return new AttachmentLinkSlackMutation(this._request).fetch(
|
134682
|
+
attachmentLinkSlack(issueId, url, variables) {
|
134683
|
+
return new AttachmentLinkSlackMutation(this._request).fetch(issueId, url, variables);
|
134746
134684
|
}
|
134747
134685
|
/**
|
134748
134686
|
* Link any url to an issue.
|
@@ -136598,23 +136536,6 @@ class LinearClient extends LinearSdk {
|
|
136598
136536
|
this.options = parsedOptions;
|
136599
136537
|
this.client = graphQLClient;
|
136600
136538
|
}
|
136601
|
-
/**
|
136602
|
-
* Helper to paginate over all pages of a given connection query.
|
136603
|
-
* @param fn The query to paginate
|
136604
|
-
* @param args The arguments to pass to the query
|
136605
|
-
*/
|
136606
|
-
paginate(fn, args) {
|
136607
|
-
return __awaiter(this, void 0, void 0, function* () {
|
136608
|
-
const boundFn = fn.bind(this);
|
136609
|
-
let connection = (yield boundFn(args));
|
136610
|
-
const nodes = connection.nodes;
|
136611
|
-
while (connection.pageInfo.hasNextPage) {
|
136612
|
-
connection = (yield boundFn(Object.assign(Object.assign({}, args), { after: connection.pageInfo.endCursor })));
|
136613
|
-
nodes.push(...connection.nodes);
|
136614
|
-
}
|
136615
|
-
return nodes;
|
136616
|
-
});
|
136617
|
-
}
|
136618
136539
|
}
|
136619
136540
|
|
136620
136541
|
const LINEAR_WEBHOOK_SIGNATURE_HEADER = "linear-signature";
|
@@ -137078,7 +136999,6 @@ exports.OrganizationInviteQuery = OrganizationInviteQuery;
|
|
137078
136999
|
exports.OrganizationInvitesQuery = OrganizationInvitesQuery;
|
137079
137000
|
exports.OrganizationPayload = OrganizationPayload;
|
137080
137001
|
exports.OrganizationQuery = OrganizationQuery;
|
137081
|
-
exports.OrganizationRegionQuery = OrganizationRegionQuery;
|
137082
137002
|
exports.OrganizationRegionResponse = OrganizationRegionResponse;
|
137083
137003
|
exports.OrganizationStartPlusTrialMutation = OrganizationStartPlusTrialMutation;
|
137084
137004
|
exports.OrganizationStartPlusTrialPayload = OrganizationStartPlusTrialPayload;
|