@gitbeaker/core 38.7.0 → 38.9.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.ts +109 -77
- package/dist/index.js +38 -63
- package/dist/index.mjs +38 -63
- package/dist/map.json +182 -190
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -95,10 +95,12 @@ async function getManyMore(camelize, getFn, endpoint2, response, requestOptions,
|
|
|
95
95
|
function get() {
|
|
96
96
|
return async (service, endpoint2, options) => {
|
|
97
97
|
const { asStream, sudo, showExpanded, maxPages, ...searchParams } = options || {};
|
|
98
|
+
const signal = service.queryTimeout ? AbortSignal.timeout(service.queryTimeout) : void 0;
|
|
98
99
|
const response = await service.requester.get(endpoint2, {
|
|
99
100
|
searchParams,
|
|
100
101
|
sudo,
|
|
101
|
-
asStream
|
|
102
|
+
asStream,
|
|
103
|
+
signal
|
|
102
104
|
});
|
|
103
105
|
const camelizeResponseBody = service.camelize || false;
|
|
104
106
|
if (asStream)
|
|
@@ -117,7 +119,7 @@ function get() {
|
|
|
117
119
|
};
|
|
118
120
|
return getManyMore(
|
|
119
121
|
camelizeResponseBody,
|
|
120
|
-
(
|
|
122
|
+
(ep, op) => service.requester.get(ep, { ...op, signal }),
|
|
121
123
|
endpoint2,
|
|
122
124
|
response,
|
|
123
125
|
reqOpts
|
|
@@ -130,7 +132,8 @@ function post() {
|
|
|
130
132
|
const response = await service.requester.post(endpoint2, {
|
|
131
133
|
searchParams,
|
|
132
134
|
body,
|
|
133
|
-
sudo
|
|
135
|
+
sudo,
|
|
136
|
+
signal: service.queryTimeout ? AbortSignal.timeout(service.queryTimeout) : void 0
|
|
134
137
|
});
|
|
135
138
|
if (service.camelize)
|
|
136
139
|
response.body = camelizeKeys(response.body);
|
|
@@ -143,7 +146,8 @@ function put() {
|
|
|
143
146
|
const response = await service.requester.put(endpoint2, {
|
|
144
147
|
body,
|
|
145
148
|
searchParams,
|
|
146
|
-
sudo
|
|
149
|
+
sudo,
|
|
150
|
+
signal: service.queryTimeout ? AbortSignal.timeout(service.queryTimeout) : void 0
|
|
147
151
|
});
|
|
148
152
|
if (service.camelize)
|
|
149
153
|
response.body = camelizeKeys(response.body);
|
|
@@ -156,7 +160,8 @@ function patch() {
|
|
|
156
160
|
const response = await service.requester.patch(endpoint2, {
|
|
157
161
|
body,
|
|
158
162
|
searchParams,
|
|
159
|
-
sudo
|
|
163
|
+
sudo,
|
|
164
|
+
signal: service.queryTimeout ? AbortSignal.timeout(service.queryTimeout) : void 0
|
|
160
165
|
});
|
|
161
166
|
if (service.camelize)
|
|
162
167
|
response.body = camelizeKeys(response.body);
|
|
@@ -168,7 +173,8 @@ function del() {
|
|
|
168
173
|
const response = await service.requester.delete(endpoint2, {
|
|
169
174
|
body: options,
|
|
170
175
|
searchParams,
|
|
171
|
-
sudo
|
|
176
|
+
sudo,
|
|
177
|
+
signal: service.queryTimeout ? AbortSignal.timeout(service.queryTimeout) : void 0
|
|
172
178
|
});
|
|
173
179
|
return packageResponse(response, showExpanded);
|
|
174
180
|
};
|
|
@@ -1983,20 +1989,12 @@ var LicenseTemplates = class extends ResourceTemplates {
|
|
|
1983
1989
|
};
|
|
1984
1990
|
var Lint = class extends BaseResource {
|
|
1985
1991
|
check(projectId, options) {
|
|
1986
|
-
return RequestHelper.get()(
|
|
1987
|
-
this,
|
|
1988
|
-
endpoint`projects/${projectId}/ci/lint`,
|
|
1989
|
-
options
|
|
1990
|
-
);
|
|
1992
|
+
return RequestHelper.get()(this, endpoint`projects/${projectId}/ci/lint`, options);
|
|
1991
1993
|
}
|
|
1992
|
-
lint(content, {
|
|
1993
|
-
projectId
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
const prefix = projectId ? endpoint`projects/${projectId}/` : "";
|
|
1997
|
-
return RequestHelper.post()(this, `${prefix}ci/lint`, {
|
|
1998
|
-
content,
|
|
1999
|
-
...options
|
|
1994
|
+
lint(projectId, content, options) {
|
|
1995
|
+
return RequestHelper.post()(this, endpoint`projects/${projectId}/ci/lint`, {
|
|
1996
|
+
...options,
|
|
1997
|
+
content
|
|
2000
1998
|
});
|
|
2001
1999
|
}
|
|
2002
2000
|
};
|
|
@@ -3013,24 +3011,13 @@ var ExternalStatusChecks = class extends BaseResource {
|
|
|
3013
3011
|
options
|
|
3014
3012
|
);
|
|
3015
3013
|
}
|
|
3016
|
-
set(projectId, mergerequestIId, sha,
|
|
3017
|
-
return RequestHelper.post()(
|
|
3018
|
-
this,
|
|
3019
|
-
endpoint`projects/${projectId}/merge_requests/${mergerequestIId}/status_check_responses`,
|
|
3020
|
-
{
|
|
3021
|
-
sha,
|
|
3022
|
-
externalCheckStatusId,
|
|
3023
|
-
...options
|
|
3024
|
-
}
|
|
3025
|
-
);
|
|
3026
|
-
}
|
|
3027
|
-
show(projectId, mergerequestIId, sha, externalCheckStatusId, options) {
|
|
3014
|
+
set(projectId, mergerequestIId, sha, externalStatusCheckId, options) {
|
|
3028
3015
|
return RequestHelper.post()(
|
|
3029
3016
|
this,
|
|
3030
3017
|
endpoint`projects/${projectId}/merge_requests/${mergerequestIId}/status_check_responses`,
|
|
3031
3018
|
{
|
|
3032
3019
|
sha,
|
|
3033
|
-
|
|
3020
|
+
externalStatusCheckId,
|
|
3034
3021
|
...options
|
|
3035
3022
|
}
|
|
3036
3023
|
);
|
|
@@ -4932,11 +4919,7 @@ var Projects = class extends BaseResource {
|
|
|
4932
4919
|
return RequestHelper.put()(this, url12, { ...options, avatar });
|
|
4933
4920
|
}
|
|
4934
4921
|
fork(projectId, options) {
|
|
4935
|
-
return RequestHelper.post()(
|
|
4936
|
-
this,
|
|
4937
|
-
endpoint`projects/${projectId}/fork`,
|
|
4938
|
-
options
|
|
4939
|
-
);
|
|
4922
|
+
return RequestHelper.post()(this, endpoint`projects/${projectId}/fork`, options);
|
|
4940
4923
|
}
|
|
4941
4924
|
housekeeping(projectId, options) {
|
|
4942
4925
|
return RequestHelper.post()(this, endpoint`projects/${projectId}/housekeeping`, options);
|
|
@@ -4977,11 +4960,7 @@ var Projects = class extends BaseResource {
|
|
|
4977
4960
|
});
|
|
4978
4961
|
}
|
|
4979
4962
|
show(projectId, options) {
|
|
4980
|
-
return RequestHelper.get()(
|
|
4981
|
-
this,
|
|
4982
|
-
endpoint`projects/${projectId}`,
|
|
4983
|
-
options
|
|
4984
|
-
);
|
|
4963
|
+
return RequestHelper.get()(this, endpoint`projects/${projectId}`, options);
|
|
4985
4964
|
}
|
|
4986
4965
|
showLanguages(projectId, options) {
|
|
4987
4966
|
return RequestHelper.get()(
|
|
@@ -4998,21 +4977,13 @@ var Projects = class extends BaseResource {
|
|
|
4998
4977
|
);
|
|
4999
4978
|
}
|
|
5000
4979
|
star(projectId, options) {
|
|
5001
|
-
return RequestHelper.post()(
|
|
5002
|
-
this,
|
|
5003
|
-
endpoint`projects/${projectId}/star`,
|
|
5004
|
-
options
|
|
5005
|
-
);
|
|
4980
|
+
return RequestHelper.post()(this, endpoint`projects/${projectId}/star`, options);
|
|
5006
4981
|
}
|
|
5007
4982
|
transfer(projectId, namespaceId, options) {
|
|
5008
|
-
return RequestHelper.put()(
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
...options,
|
|
5013
|
-
namespace: namespaceId
|
|
5014
|
-
}
|
|
5015
|
-
);
|
|
4983
|
+
return RequestHelper.put()(this, endpoint`projects/${projectId}/transfer`, {
|
|
4984
|
+
...options,
|
|
4985
|
+
namespace: namespaceId
|
|
4986
|
+
});
|
|
5016
4987
|
}
|
|
5017
4988
|
unarchive(projectId, options) {
|
|
5018
4989
|
return RequestHelper.post()(
|
|
@@ -5846,7 +5817,7 @@ var GroupAccessRequests = class extends ResourceAccessRequests {
|
|
|
5846
5817
|
// src/resources/GroupAccessTokens.ts
|
|
5847
5818
|
var GroupAccessTokens = class extends ResourceAccessTokens {
|
|
5848
5819
|
constructor(options) {
|
|
5849
|
-
super("
|
|
5820
|
+
super("groups", options);
|
|
5850
5821
|
}
|
|
5851
5822
|
};
|
|
5852
5823
|
var GroupActivityAnalytics = class extends BaseResource {
|
|
@@ -6139,10 +6110,18 @@ var Groups = class extends BaseResource {
|
|
|
6139
6110
|
);
|
|
6140
6111
|
}
|
|
6141
6112
|
allProjects(groupId, options) {
|
|
6142
|
-
return RequestHelper.get()(
|
|
6113
|
+
return RequestHelper.get()(
|
|
6114
|
+
this,
|
|
6115
|
+
endpoint`groups/${groupId}/projects`,
|
|
6116
|
+
options
|
|
6117
|
+
);
|
|
6143
6118
|
}
|
|
6144
6119
|
allSharedProjects(groupId, options) {
|
|
6145
|
-
return RequestHelper.get()(
|
|
6120
|
+
return RequestHelper.get()(
|
|
6121
|
+
this,
|
|
6122
|
+
endpoint`groups/${groupId}/projects/shared`,
|
|
6123
|
+
options
|
|
6124
|
+
);
|
|
6146
6125
|
}
|
|
6147
6126
|
allSubgroups(groupId, options) {
|
|
6148
6127
|
return RequestHelper.get()(this, endpoint`groups/${groupId}/subgroups`, options);
|
|
@@ -6439,11 +6418,7 @@ var Users = class extends BaseResource {
|
|
|
6439
6418
|
);
|
|
6440
6419
|
}
|
|
6441
6420
|
allProjects(userId, options) {
|
|
6442
|
-
return RequestHelper.get()(
|
|
6443
|
-
this,
|
|
6444
|
-
endpoint`users/${userId}/projects`,
|
|
6445
|
-
options
|
|
6446
|
-
);
|
|
6421
|
+
return RequestHelper.get()(this, endpoint`users/${userId}/projects`, options);
|
|
6447
6422
|
}
|
|
6448
6423
|
// Convenience method - Functionality already present in the all method in the Projects wrapper
|
|
6449
6424
|
allStarredProjects(userId, options) {
|