@gitkraken/provider-apis 0.25.6 → 0.25.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.
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { Account, CreateCommitInput, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitMilestone, GitPullRequest, GitPullRequestReviewComment, GitPullRequestReviewState, GitRepository, Organization, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
2
+ import { Account, CreateCommitInput, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitMilestone, GitPullRequest, GitPullRequestReviewComment, GitPullRequestReviewState, GitRepository, NumberedPageInput, Organization, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
3
3
  import { FetchIssuesData, FetchPullRequestsData, GitHubIssueCloseReason } from '../../types/exportedTypes/github';
4
4
  import { Issue, SetIssueInput } from '../../types/exportedTypes/issueProvider';
5
5
  import { GitProvider } from '../gitProvider';
@@ -91,6 +91,33 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider, I
91
91
  data: GitRepository[];
92
92
  errors: GetRepoErrorData[];
93
93
  }>;
94
+ private fetchMultipleRESTPages;
95
+ /**
96
+ * Returns repos where the user has read, write, or admin permissions. Note: If a user belongs to an org, they are
97
+ * NOT automatically granted permissions for every repo. This means that you might notice some repos missing if you
98
+ * use this function. To fetch all repos that belong to an org, regardless of user permissions, use `getReposForOrg`
99
+ * instead.
100
+ */
101
+ getReposForCurrentUser(input: {
102
+ affiliations?: ('owner' | 'collaborator' | 'organization_member')[];
103
+ simultaneousPagesToFetch?: number;
104
+ } & NumberedPageInput, options?: EnterpriseOptions): Promise<{
105
+ data: GitRepository[];
106
+ pageInfo: {
107
+ hasNextPage: boolean;
108
+ nextPage: number | null;
109
+ };
110
+ }>;
111
+ getReposForOrg(input: {
112
+ orgName: string;
113
+ simultaneousPagesToFetch?: number;
114
+ } & NumberedPageInput, options?: EnterpriseOptions): Promise<{
115
+ data: GitRepository[];
116
+ pageInfo: {
117
+ hasNextPage: boolean;
118
+ nextPage: number | null;
119
+ };
120
+ }>;
94
121
  getReposForUsernames(input: {
95
122
  usernames: string[];
96
123
  } & CursorPageInput, options?: EnterpriseOptions): Promise<{
@@ -0,0 +1,19 @@
1
+ import { AzureDevOps } from './azureDevops/azureDevOps';
2
+ import { Bitbucket } from './bitbucket/bitbucket';
3
+ import { BitbucketServer } from './bitbucketServer/bitbucketServer';
4
+ import { GitHub } from './github/github';
5
+ import { GitLab } from './gitlab/gitlab';
6
+ import { Jira } from './jira/jira';
7
+ import { JiraServer } from './jira/jiraServer';
8
+ import { Trello } from './trello/trello';
9
+ import type { Config } from '../types/exportedTypes/types';
10
+ export declare const makeProviderAPIs: (config?: Partial<Config>) => {
11
+ azureDevOps: AzureDevOps;
12
+ bitbucket: Bitbucket;
13
+ bitbucketServer: BitbucketServer;
14
+ github: GitHub;
15
+ gitlab: GitLab;
16
+ jira: Jira;
17
+ jiraServer: JiraServer;
18
+ trello: Trello;
19
+ };
@@ -25,6 +25,25 @@ export interface GraphQLRepository {
25
25
  } | null;
26
26
  viewerPermission: GraphQLViewerPermission;
27
27
  }
28
+ export type RESTRepository = {
29
+ id: number;
30
+ node_id: string;
31
+ name: string;
32
+ owner: {
33
+ login: string;
34
+ };
35
+ html_url: string;
36
+ clone_url: string;
37
+ ssh_url: string;
38
+ default_branch: string;
39
+ permissions: {
40
+ admin: boolean;
41
+ maintain: boolean;
42
+ push: boolean;
43
+ triage: boolean;
44
+ pull: boolean;
45
+ };
46
+ };
28
47
  export declare enum GitHubPullRequestReviewState {
29
48
  Approved = "APPROVED",
30
49
  ChangesRequested = "CHANGES_REQUESTED",
@@ -86,6 +86,7 @@ export type JiraIssue = {
86
86
  expand: string;
87
87
  fields: {
88
88
  components?: JiraComponentStub[];
89
+ description: string;
89
90
  fixVersions: JiraFixVersion[];
90
91
  project: {
91
92
  avatarUrls: AvatarUrls;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitkraken/provider-apis",
3
- "version": "0.25.6",
3
+ "version": "0.25.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",
@@ -9,6 +9,12 @@
9
9
  },
10
10
  "main": "dist/index.js",
11
11
  "types": "dist/index.d.ts",
12
+ "exports": {
13
+ ".": "./dist/index.js",
14
+ "./entity-identifiers": "./dist/index.entity-identifiers.js",
15
+ "./provider-utils": "./dist/index.provider-utils.js",
16
+ "./providers": "./dist/index.providers.js"
17
+ },
12
18
  "files": [
13
19
  "dist"
14
20
  ],