@gitkraken/provider-apis 0.29.7 → 0.29.8
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/CHANGELOG.md +4 -0
- package/dist/index.js +1 -1
- package/dist/index.providers.js +1 -1
- package/dist/providers/linear/linear.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1212,7 +1212,7 @@ OR comment ~ currentUser() OR summary ~ currentUser() OR description ~ currentUs
|
|
|
1212
1212
|
displayName
|
|
1213
1213
|
}
|
|
1214
1214
|
}
|
|
1215
|
-
`;return(await this.makeGraphQLRequest(t,e)).viewer}async getIssue(t,e={}){let r=await this.fetchIssue(t.number,e);return{data:await Br(r)}}async getLinearOrganization(t={}){let e=await this.fetchOrganization(t);return{data:{id:e.id,name:e.name,key:e.urlKey,url:`https://linear.app/${e.urlKey}`}}}async getTeamsForCurrentUser(t={}){return{data:(await this.fetchTeams(t)).nodes.map(Pn)}}async getIssuesForCurrentUser(t,e={}){let{cursor:r}=t,{category:n,cursor:i}=xr(r),o=await this.fetchViewer(e),a,u,l=new Je,p=async(d,c)=>{if(u||n>d)return;let g=await c(Math.max(bn-l.length,1),n===d?i:void 0);if(!g)return;let m=await hr(g.nodes.map(Br));l.push(...m),g.pageInfo.hasNextPage&&(a=d,u=g.pageInfo.endCursor)};return await p(1,async(d,c)=>{var m,I;return(I=(m=(await this.rawRequest(e,`
|
|
1215
|
+
`;return(await this.makeGraphQLRequest(t,e)).viewer}async getIssue(t,e={}){let r=await this.fetchIssue(t.number,e);return{data:await Br(r)}}async getLinearOrganization(t={}){let e=await this.fetchOrganization(t);return{data:{id:e.id,name:e.name,key:e.urlKey,url:`https://linear.app/${e.urlKey}`}}}async getTeamsForCurrentUser(t={}){return{data:(await this.fetchTeams(t)).nodes.map(Pn)}}async getCurrentUser(t={}){return{data:await this.fetchViewer(t)}}async getIssuesForCurrentUser(t,e={}){let{cursor:r}=t,{category:n,cursor:i}=xr(r),o=await this.fetchViewer(e),a,u,l=new Je,p=async(d,c)=>{if(u||n>d)return;let g=await c(Math.max(bn-l.length,1),n===d?i:void 0);if(!g)return;let m=await hr(g.nodes.map(Br));l.push(...m),g.pageInfo.hasNextPage&&(a=d,u=g.pageInfo.endCursor)};return await p(1,async(d,c)=>{var m,I;return(I=(m=(await this.rawRequest(e,`
|
|
1216
1216
|
query GetAssignedIssues($first: Int!, $after: String) {
|
|
1217
1217
|
viewer {
|
|
1218
1218
|
issues: assignedIssues(first: $first, after: $after) {
|
package/dist/index.providers.js
CHANGED
|
@@ -1212,7 +1212,7 @@ OR comment ~ currentUser() OR summary ~ currentUser() OR description ~ currentUs
|
|
|
1212
1212
|
displayName
|
|
1213
1213
|
}
|
|
1214
1214
|
}
|
|
1215
|
-
`;return(await this.makeGraphQLRequest(s,e)).viewer}async getIssue(s,e={}){let r=await this.fetchIssue(s.number,e);return{data:await er(r)}}async getLinearOrganization(s={}){let e=await this.fetchOrganization(s);return{data:{id:e.id,name:e.name,key:e.urlKey,url:`https://linear.app/${e.urlKey}`}}}async getTeamsForCurrentUser(s={}){return{data:(await this.fetchTeams(s)).nodes.map(Ls)}}async getIssuesForCurrentUser(s,e={}){let{cursor:r}=s,{category:n,cursor:o}=Xt(r),a=await this.fetchViewer(e),i,u,l=new _e,p=async(d,c)=>{if(u||n>d)return;let g=await c(Math.max(Ds-l.length,1),n===d?o:void 0);if(!g)return;let m=await Dt(g.nodes.map(er));l.push(...m),g.pageInfo.hasNextPage&&(i=d,u=g.pageInfo.endCursor)};return await p(1,async(d,c)=>{var m,I;return(I=(m=(await this.rawRequest(e,`
|
|
1215
|
+
`;return(await this.makeGraphQLRequest(s,e)).viewer}async getIssue(s,e={}){let r=await this.fetchIssue(s.number,e);return{data:await er(r)}}async getLinearOrganization(s={}){let e=await this.fetchOrganization(s);return{data:{id:e.id,name:e.name,key:e.urlKey,url:`https://linear.app/${e.urlKey}`}}}async getTeamsForCurrentUser(s={}){return{data:(await this.fetchTeams(s)).nodes.map(Ls)}}async getCurrentUser(s={}){return{data:await this.fetchViewer(s)}}async getIssuesForCurrentUser(s,e={}){let{cursor:r}=s,{category:n,cursor:o}=Xt(r),a=await this.fetchViewer(e),i,u,l=new _e,p=async(d,c)=>{if(u||n>d)return;let g=await c(Math.max(Ds-l.length,1),n===d?o:void 0);if(!g)return;let m=await Dt(g.nodes.map(er));l.push(...m),g.pageInfo.hasNextPage&&(i=d,u=g.pageInfo.endCursor)};return await p(1,async(d,c)=>{var m,I;return(I=(m=(await this.rawRequest(e,`
|
|
1216
1216
|
query GetAssignedIssues($first: Int!, $after: String) {
|
|
1217
1217
|
viewer {
|
|
1218
1218
|
issues: assignedIssues(first: $first, after: $after) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { User as LinearUser } from '@linear/sdk';
|
|
1
2
|
import { Options } from '../../types/exportedTypes/gitProvider';
|
|
2
3
|
import { GetIssueInput, Issue } from '../../types/exportedTypes/issueProvider';
|
|
3
4
|
import { Result } from '../../types/exportedTypes/types';
|
|
@@ -16,5 +17,6 @@ export declare class Linear extends Provider implements IssueProvider {
|
|
|
16
17
|
getIssue(input: GetIssueInput, options?: Options): Promise<Result<Issue>>;
|
|
17
18
|
getLinearOrganization(options?: Options): Promise<Result<LinearOrganization>>;
|
|
18
19
|
getTeamsForCurrentUser(options?: Options): Promise<Result<LinearTeam[]>>;
|
|
20
|
+
getCurrentUser(options?: Options): Promise<Result<LinearUser>>;
|
|
19
21
|
getIssuesForCurrentUser(input: CursorPageInput, options?: Options): Promise<PagedResult<Issue>>;
|
|
20
22
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitkraken/provider-apis",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.8",
|
|
4
4
|
"description": "An SDK around different third-party APIs that accepts and returns data in a common format.",
|
|
5
5
|
"author": "Axosoft, LLC dba GitKraken",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|