@gitbeaker/core 42.2.0 → 42.4.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/README.md +1 -0
- package/dist/index.d.mts +21 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.js +21 -5
- package/dist/index.mjs +21 -5
- package/dist/map.json +6 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1933,6 +1933,7 @@ import { Gitlab } from '@gitbeaker/core';
|
|
|
1933
1933
|
<td align="center" valign="top" width="0.33%"><a href="https://github.com/talyssonoc"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4325587?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Talysson de Oliveira Cassiano"/></td>
|
|
1934
1934
|
<td align="center" valign="top" width="0.33%"><a href="https://github.com/Sephyr0s"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/34128667?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Marco"/></td>
|
|
1935
1935
|
<td align="center" valign="top" width="0.33%"><a href="https://github.com/enduity"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/19674002?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Endrik Einberg"/></td>
|
|
1936
|
+
<td align="center" valign="top" width="0.33%"><a href="https://note.itswhat.me/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/38807139?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Bryan Lee"/></td>
|
|
1936
1937
|
</tr>
|
|
1937
1938
|
</p>
|
|
1938
1939
|
|
package/dist/index.d.mts
CHANGED
|
@@ -26,6 +26,16 @@ type AllOrNone<T extends Record<string, any>> = T | Partial<Record<keyof T, neve
|
|
|
26
26
|
type MappedOmit<T, K extends keyof T> = {
|
|
27
27
|
[P in keyof T as P extends K ? never : P]: T[P];
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* A special class to mark path segments that should not be URL-encoded.
|
|
31
|
+
* Used for paths that already contain special characters like '/' that should be preserved.
|
|
32
|
+
* For example, in API paths like 'repository/commits', the slash should not be encoded to '%2F'.
|
|
33
|
+
*/
|
|
34
|
+
declare class RawPathSegment {
|
|
35
|
+
readonly value: string;
|
|
36
|
+
constructor(value: string);
|
|
37
|
+
toString(): string;
|
|
38
|
+
}
|
|
29
39
|
|
|
30
40
|
interface IsForm {
|
|
31
41
|
isForm?: boolean;
|
|
@@ -1158,6 +1168,11 @@ declare class Projects<C extends boolean = false> extends BaseResource<C> {
|
|
|
1158
1168
|
sharedMinAccessLevel?: Exclude<AccessLevel, AccessLevel.ADMIN>;
|
|
1159
1169
|
sharedVisibleOnly?: boolean;
|
|
1160
1170
|
} & Sudo & ShowExpanded<E>): Promise<GitlabAPIResponse<SimpleGroupSchema[], C, E, void>>;
|
|
1171
|
+
allInvitedGroups<E extends boolean = false>(projectId: string | number, options?: {
|
|
1172
|
+
search?: string;
|
|
1173
|
+
sharedMinAccessLevel?: Exclude<AccessLevel, AccessLevel.ADMIN>;
|
|
1174
|
+
relation?: 'direct' | 'inherited';
|
|
1175
|
+
} & Sudo & ShowExpanded<E>): Promise<GitlabAPIResponse<SimpleGroupSchema[], C, E, void>>;
|
|
1161
1176
|
allSharableGroups<E extends boolean = false>(projectId: string | number, options?: {
|
|
1162
1177
|
search?: string;
|
|
1163
1178
|
} & Sudo & ShowExpanded<E>): Promise<GitlabAPIResponse<SimpleGroupSchema[], C, E, void>>;
|
|
@@ -2205,8 +2220,8 @@ interface DiscussionSchema extends Record<string, unknown> {
|
|
|
2205
2220
|
}
|
|
2206
2221
|
type DiscussionNotePositionOptions = Camelize<DiscussionNotePositionSchema>;
|
|
2207
2222
|
declare class ResourceDiscussions<C extends boolean = false> extends BaseResource<C> {
|
|
2208
|
-
protected resource2Type: string;
|
|
2209
|
-
constructor(resourceType: string, resource2Type: string, options: BaseResourceOptions<C>);
|
|
2223
|
+
protected resource2Type: string | RawPathSegment;
|
|
2224
|
+
constructor(resourceType: string, resource2Type: string | RawPathSegment, options: BaseResourceOptions<C>);
|
|
2210
2225
|
addNote<E extends boolean = false>(resourceId: string | number, resource2Id: string | number, discussionId: string | number, noteId: number, body: string, options?: {
|
|
2211
2226
|
createdAt?: string;
|
|
2212
2227
|
} & Sudo & ShowExpanded<E>): Promise<GitlabAPIResponse<DiscussionNoteSchema, C, E, void>>;
|
|
@@ -8599,6 +8614,10 @@ interface WebhookMergeRequestEventSchema extends BaseWebhookEventSchema {
|
|
|
8599
8614
|
previous: string | null;
|
|
8600
8615
|
current: string | null;
|
|
8601
8616
|
};
|
|
8617
|
+
assignees: {
|
|
8618
|
+
previous: WebhookUserSchema[] | null;
|
|
8619
|
+
current: WebhookUserSchema[] | null;
|
|
8620
|
+
};
|
|
8602
8621
|
reviewers: {
|
|
8603
8622
|
previous: WebhookUserSchema[] | null;
|
|
8604
8623
|
current: WebhookUserSchema[] | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,16 @@ type AllOrNone<T extends Record<string, any>> = T | Partial<Record<keyof T, neve
|
|
|
26
26
|
type MappedOmit<T, K extends keyof T> = {
|
|
27
27
|
[P in keyof T as P extends K ? never : P]: T[P];
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* A special class to mark path segments that should not be URL-encoded.
|
|
31
|
+
* Used for paths that already contain special characters like '/' that should be preserved.
|
|
32
|
+
* For example, in API paths like 'repository/commits', the slash should not be encoded to '%2F'.
|
|
33
|
+
*/
|
|
34
|
+
declare class RawPathSegment {
|
|
35
|
+
readonly value: string;
|
|
36
|
+
constructor(value: string);
|
|
37
|
+
toString(): string;
|
|
38
|
+
}
|
|
29
39
|
|
|
30
40
|
interface IsForm {
|
|
31
41
|
isForm?: boolean;
|
|
@@ -1158,6 +1168,11 @@ declare class Projects<C extends boolean = false> extends BaseResource<C> {
|
|
|
1158
1168
|
sharedMinAccessLevel?: Exclude<AccessLevel, AccessLevel.ADMIN>;
|
|
1159
1169
|
sharedVisibleOnly?: boolean;
|
|
1160
1170
|
} & Sudo & ShowExpanded<E>): Promise<GitlabAPIResponse<SimpleGroupSchema[], C, E, void>>;
|
|
1171
|
+
allInvitedGroups<E extends boolean = false>(projectId: string | number, options?: {
|
|
1172
|
+
search?: string;
|
|
1173
|
+
sharedMinAccessLevel?: Exclude<AccessLevel, AccessLevel.ADMIN>;
|
|
1174
|
+
relation?: 'direct' | 'inherited';
|
|
1175
|
+
} & Sudo & ShowExpanded<E>): Promise<GitlabAPIResponse<SimpleGroupSchema[], C, E, void>>;
|
|
1161
1176
|
allSharableGroups<E extends boolean = false>(projectId: string | number, options?: {
|
|
1162
1177
|
search?: string;
|
|
1163
1178
|
} & Sudo & ShowExpanded<E>): Promise<GitlabAPIResponse<SimpleGroupSchema[], C, E, void>>;
|
|
@@ -2205,8 +2220,8 @@ interface DiscussionSchema extends Record<string, unknown> {
|
|
|
2205
2220
|
}
|
|
2206
2221
|
type DiscussionNotePositionOptions = Camelize<DiscussionNotePositionSchema>;
|
|
2207
2222
|
declare class ResourceDiscussions<C extends boolean = false> extends BaseResource<C> {
|
|
2208
|
-
protected resource2Type: string;
|
|
2209
|
-
constructor(resourceType: string, resource2Type: string, options: BaseResourceOptions<C>);
|
|
2223
|
+
protected resource2Type: string | RawPathSegment;
|
|
2224
|
+
constructor(resourceType: string, resource2Type: string | RawPathSegment, options: BaseResourceOptions<C>);
|
|
2210
2225
|
addNote<E extends boolean = false>(resourceId: string | number, resource2Id: string | number, discussionId: string | number, noteId: number, body: string, options?: {
|
|
2211
2226
|
createdAt?: string;
|
|
2212
2227
|
} & Sudo & ShowExpanded<E>): Promise<GitlabAPIResponse<DiscussionNoteSchema, C, E, void>>;
|
|
@@ -8599,6 +8614,10 @@ interface WebhookMergeRequestEventSchema extends BaseWebhookEventSchema {
|
|
|
8599
8614
|
previous: string | null;
|
|
8600
8615
|
current: string | null;
|
|
8601
8616
|
};
|
|
8617
|
+
assignees: {
|
|
8618
|
+
previous: WebhookUserSchema[] | null;
|
|
8619
|
+
current: WebhookUserSchema[] | null;
|
|
8620
|
+
};
|
|
8602
8621
|
reviewers: {
|
|
8603
8622
|
previous: WebhookUserSchema[] | null;
|
|
8604
8623
|
current: WebhookUserSchema[] | null;
|
package/dist/index.js
CHANGED
|
@@ -18,11 +18,20 @@ function appendFormFromObject(object) {
|
|
|
18
18
|
});
|
|
19
19
|
return form;
|
|
20
20
|
}
|
|
21
|
+
var RawPathSegment = class {
|
|
22
|
+
value;
|
|
23
|
+
constructor(value) {
|
|
24
|
+
this.value = value;
|
|
25
|
+
}
|
|
26
|
+
toString() {
|
|
27
|
+
return this.value;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
21
30
|
function endpoint(strings, ...values) {
|
|
22
|
-
return values.reduce(
|
|
23
|
-
|
|
24
|
-
strings[
|
|
25
|
-
);
|
|
31
|
+
return values.reduce((result, value, index) => {
|
|
32
|
+
const encodedValue = value instanceof RawPathSegment ? value.value : encodeURIComponent(String(value));
|
|
33
|
+
return result + encodedValue + strings[index + 1];
|
|
34
|
+
}, strings[0]);
|
|
26
35
|
}
|
|
27
36
|
function parseLinkHeader(linkString) {
|
|
28
37
|
const output = {};
|
|
@@ -2634,7 +2643,7 @@ var Branches = class extends requesterUtils.BaseResource {
|
|
|
2634
2643
|
// src/resources/CommitDiscussions.ts
|
|
2635
2644
|
var CommitDiscussions = class extends ResourceDiscussions {
|
|
2636
2645
|
constructor(options) {
|
|
2637
|
-
super("projects", "repository/commits", options);
|
|
2646
|
+
super("projects", new RawPathSegment("repository/commits"), options);
|
|
2638
2647
|
}
|
|
2639
2648
|
};
|
|
2640
2649
|
var Commits = class extends requesterUtils.BaseResource {
|
|
@@ -5083,6 +5092,13 @@ var Projects = class extends requesterUtils.BaseResource {
|
|
|
5083
5092
|
options
|
|
5084
5093
|
);
|
|
5085
5094
|
}
|
|
5095
|
+
allInvitedGroups(projectId, options) {
|
|
5096
|
+
return RequestHelper.get()(
|
|
5097
|
+
this,
|
|
5098
|
+
endpoint`projects/${projectId}/invited_groups`,
|
|
5099
|
+
options
|
|
5100
|
+
);
|
|
5101
|
+
}
|
|
5086
5102
|
allSharableGroups(projectId, options) {
|
|
5087
5103
|
return RequestHelper.get()(
|
|
5088
5104
|
this,
|
package/dist/index.mjs
CHANGED
|
@@ -12,11 +12,20 @@ function appendFormFromObject(object) {
|
|
|
12
12
|
});
|
|
13
13
|
return form;
|
|
14
14
|
}
|
|
15
|
+
var RawPathSegment = class {
|
|
16
|
+
value;
|
|
17
|
+
constructor(value) {
|
|
18
|
+
this.value = value;
|
|
19
|
+
}
|
|
20
|
+
toString() {
|
|
21
|
+
return this.value;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
15
24
|
function endpoint(strings, ...values) {
|
|
16
|
-
return values.reduce(
|
|
17
|
-
|
|
18
|
-
strings[
|
|
19
|
-
);
|
|
25
|
+
return values.reduce((result, value, index) => {
|
|
26
|
+
const encodedValue = value instanceof RawPathSegment ? value.value : encodeURIComponent(String(value));
|
|
27
|
+
return result + encodedValue + strings[index + 1];
|
|
28
|
+
}, strings[0]);
|
|
20
29
|
}
|
|
21
30
|
function parseLinkHeader(linkString) {
|
|
22
31
|
const output = {};
|
|
@@ -2628,7 +2637,7 @@ var Branches = class extends BaseResource {
|
|
|
2628
2637
|
// src/resources/CommitDiscussions.ts
|
|
2629
2638
|
var CommitDiscussions = class extends ResourceDiscussions {
|
|
2630
2639
|
constructor(options) {
|
|
2631
|
-
super("projects", "repository/commits", options);
|
|
2640
|
+
super("projects", new RawPathSegment("repository/commits"), options);
|
|
2632
2641
|
}
|
|
2633
2642
|
};
|
|
2634
2643
|
var Commits = class extends BaseResource {
|
|
@@ -5077,6 +5086,13 @@ var Projects = class extends BaseResource {
|
|
|
5077
5086
|
options
|
|
5078
5087
|
);
|
|
5079
5088
|
}
|
|
5089
|
+
allInvitedGroups(projectId, options) {
|
|
5090
|
+
return RequestHelper.get()(
|
|
5091
|
+
this,
|
|
5092
|
+
endpoint`projects/${projectId}/invited_groups`,
|
|
5093
|
+
options
|
|
5094
|
+
);
|
|
5095
|
+
}
|
|
5080
5096
|
allSharableGroups(projectId, options) {
|
|
5081
5097
|
return RequestHelper.get()(
|
|
5082
5098
|
this,
|
package/dist/map.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitbeaker/core",
|
|
3
|
-
"version": "42.
|
|
3
|
+
"version": "42.4.0",
|
|
4
4
|
"description": "Core API implementation of the GitLab API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"lint:fix": "yarn lint --fix"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@gitbeaker/requester-utils": "^42.
|
|
55
|
+
"@gitbeaker/requester-utils": "^42.4.0",
|
|
56
56
|
"qs": "^6.12.2",
|
|
57
57
|
"xcase": "^2.0.1"
|
|
58
58
|
},
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"tsx": "^4.16.2",
|
|
64
64
|
"typescript": "^5.5.3"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "d0cd34e0644d8c1a0cf03ac1236ff4b225988e4b"
|
|
67
67
|
}
|