@gitkraken/provider-apis 0.48.0 → 0.49.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.
@@ -1,7 +1,7 @@
1
1
  import { Account, AddInlineCommentInput, CursorPageInput, DeleteCommentInput, EditCommentInput, EnterpriseOptions, GetMergeBaseInput, GetPullRequestDescriptionInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitComment, GitLabel, GitMergeStrategy, GitPullRequest, GitPullRequestReview, GitRepository, GitTreeItem, NumberedPageInput, PullRequestDescription, ResolveReviewThreadInput, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestDescriptionInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
2
2
  import { GitLabGetIssueInput, PullRequestAssociation } from '../../types/exportedTypes/gitlab';
3
3
  import { Issue, SetIssueInput } from '../../types/exportedTypes/issueProvider';
4
- import { Result } from '../../types/exportedTypes/types';
4
+ import { NumberedPageInfo, Result } from '../../types/exportedTypes/types';
5
5
  import { GitProvider } from '../gitProvider';
6
6
  import { IssueProvider } from '../issueProvider';
7
7
  import { EnterpriseProvider } from '../provider';
@@ -54,14 +54,29 @@ export declare class GitLab extends EnterpriseProvider implements GitProvider, I
54
54
  };
55
55
  data: GitRepository[];
56
56
  }>;
57
+ /**
58
+ * Lists the groups (namespaces) the current user is a member of.
59
+ *
60
+ * @param input.topLevelOnly When `true` (the default), only top-level groups are returned. Set to `false` to
61
+ * include subgroups as their own entries.
62
+ */
63
+ getGroupsForCurrentUser(input?: {
64
+ topLevelOnly?: boolean;
65
+ } & NumberedPageInput, options?: EnterpriseOptions): Promise<{
66
+ pageInfo: NumberedPageInfo;
67
+ data: {
68
+ id: string;
69
+ path: string;
70
+ fullPath: string;
71
+ name: string;
72
+ webUrl: string;
73
+ }[];
74
+ }>;
57
75
  private getRefs;
58
76
  getBranches(input: {
59
77
  repo: GetRepoInput;
60
78
  } & NumberedPageInput, options?: EnterpriseOptions): Promise<{
61
- pageInfo: {
62
- hasNextPage: boolean;
63
- nextPage: number | null;
64
- };
79
+ pageInfo: NumberedPageInfo;
65
80
  data: {
66
81
  name: string;
67
82
  commit: {
@@ -74,10 +89,7 @@ export declare class GitLab extends EnterpriseProvider implements GitProvider, I
74
89
  getTags(input: {
75
90
  repo: GetRepoInput;
76
91
  } & NumberedPageInput, options?: EnterpriseOptions): Promise<{
77
- pageInfo: {
78
- hasNextPage: boolean;
79
- nextPage: number | null;
80
- };
92
+ pageInfo: NumberedPageInfo;
81
93
  data: {
82
94
  name: string;
83
95
  commit: {
@@ -5,3 +5,15 @@ export interface GitLabGetIssueInput {
5
5
  name: string;
6
6
  number: string;
7
7
  }
8
+ export interface GitLabGroup {
9
+ id: string;
10
+ path: string;
11
+ /**
12
+ * The full path of the group, including any parent groups (e.g. `parent/subgroup`).
13
+ * This is what a consumer needs to replicate GitLab's subgroup-prefix matching when
14
+ * filtering repos by group.
15
+ */
16
+ fullPath: string;
17
+ name: string;
18
+ webUrl: string;
19
+ }
@@ -59,3 +59,10 @@ export interface RESTTreeItem {
59
59
  path: string;
60
60
  mode: string;
61
61
  }
62
+ export interface RESTGroup {
63
+ id: number;
64
+ name: string;
65
+ path: string;
66
+ full_path: string;
67
+ web_url: string;
68
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitkraken/provider-apis",
3
- "version": "0.48.0",
3
+ "version": "0.49.0",
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",