@gitbeaker/core 40.0.2 → 40.1.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 +257 -183
- package/dist/index.d.ts +257 -183
- package/dist/index.js +138 -152
- package/dist/index.mjs +138 -153
- package/dist/map.json +51 -0
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -6,12 +6,9 @@ import QS, { parse } from 'qs';
|
|
|
6
6
|
function appendFormFromObject(object) {
|
|
7
7
|
const form = new FormData();
|
|
8
8
|
Object.entries(object).forEach(([k, v]) => {
|
|
9
|
-
if (!v)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
form.append(k, v[0], v[1]);
|
|
13
|
-
else
|
|
14
|
-
form.append(k, v);
|
|
9
|
+
if (!v) return;
|
|
10
|
+
if (Array.isArray(v)) form.append(k, v[0], v[1]);
|
|
11
|
+
else form.append(k, v);
|
|
15
12
|
});
|
|
16
13
|
return form;
|
|
17
14
|
}
|
|
@@ -34,7 +31,7 @@ function parseLinkHeader(linkString) {
|
|
|
34
31
|
function reformatObjectOptions(obj, prefixKey, decamelizeValues = false) {
|
|
35
32
|
const formatted = decamelizeValues ? decamelizeKeys(obj) : obj;
|
|
36
33
|
return QS.stringify({ [prefixKey]: formatted }, { encode: false }).split("&").reduce((acc, cur) => {
|
|
37
|
-
const [key, val] = cur.split(
|
|
34
|
+
const [key, val] = cur.split(/=(.*)/);
|
|
38
35
|
acc[key] = val;
|
|
39
36
|
return acc;
|
|
40
37
|
}, {});
|
|
@@ -52,14 +49,12 @@ function getStream(response, showExpanded) {
|
|
|
52
49
|
function getSingle(camelize, response, showExpanded) {
|
|
53
50
|
const { status, headers } = response;
|
|
54
51
|
let { body } = response;
|
|
55
|
-
if (camelize)
|
|
56
|
-
body = camelizeKeys(body);
|
|
52
|
+
if (camelize) body = camelizeKeys(body);
|
|
57
53
|
return packageResponse({ body, status, headers }, showExpanded);
|
|
58
54
|
}
|
|
59
55
|
async function getManyMore(camelize, getFn, endpoint2, response, requestOptions, acc) {
|
|
60
56
|
const { sudo, showExpanded, maxPages, pagination, page, perPage, idAfter, orderBy, sort } = requestOptions;
|
|
61
|
-
if (camelize)
|
|
62
|
-
response.body = camelizeKeys(response?.body);
|
|
57
|
+
if (camelize) response.body = camelizeKeys(response?.body);
|
|
63
58
|
const newAcc = [...acc || [], ...response.body];
|
|
64
59
|
const withinBounds = maxPages && perPage ? newAcc.length / +perPage < maxPages : true;
|
|
65
60
|
const { next = "" } = parseLinkHeader(response.headers.link);
|
|
@@ -78,8 +73,7 @@ async function getManyMore(camelize, getFn, endpoint2, response, requestOptions,
|
|
|
78
73
|
});
|
|
79
74
|
return getManyMore(camelize, getFn, endpoint2, nextResponse, newOpts, newAcc);
|
|
80
75
|
}
|
|
81
|
-
if (!showExpanded)
|
|
82
|
-
return newAcc;
|
|
76
|
+
if (!showExpanded) return newAcc;
|
|
83
77
|
const paginationInfo = pagination === "keyset" ? {
|
|
84
78
|
idAfter: idAfter ? +idAfter : null,
|
|
85
79
|
perPage: perPage ? +perPage : null,
|
|
@@ -109,8 +103,7 @@ function get() {
|
|
|
109
103
|
signal
|
|
110
104
|
});
|
|
111
105
|
const camelizeResponseBody = service.camelize || false;
|
|
112
|
-
if (asStream)
|
|
113
|
-
return getStream(response, showExpanded);
|
|
106
|
+
if (asStream) return getStream(response, showExpanded);
|
|
114
107
|
if (!Array.isArray(response.body))
|
|
115
108
|
return getSingle(
|
|
116
109
|
camelizeResponseBody,
|
|
@@ -141,8 +134,7 @@ function post() {
|
|
|
141
134
|
sudo,
|
|
142
135
|
signal: service.queryTimeout ? AbortSignal.timeout(service.queryTimeout) : void 0
|
|
143
136
|
});
|
|
144
|
-
if (service.camelize)
|
|
145
|
-
response.body = camelizeKeys(response.body);
|
|
137
|
+
if (service.camelize) response.body = camelizeKeys(response.body);
|
|
146
138
|
return packageResponse(response, showExpanded);
|
|
147
139
|
};
|
|
148
140
|
}
|
|
@@ -155,8 +147,7 @@ function put() {
|
|
|
155
147
|
sudo,
|
|
156
148
|
signal: service.queryTimeout ? AbortSignal.timeout(service.queryTimeout) : void 0
|
|
157
149
|
});
|
|
158
|
-
if (service.camelize)
|
|
159
|
-
response.body = camelizeKeys(response.body);
|
|
150
|
+
if (service.camelize) response.body = camelizeKeys(response.body);
|
|
160
151
|
return packageResponse(response, showExpanded);
|
|
161
152
|
};
|
|
162
153
|
}
|
|
@@ -169,8 +160,7 @@ function patch() {
|
|
|
169
160
|
sudo,
|
|
170
161
|
signal: service.queryTimeout ? AbortSignal.timeout(service.queryTimeout) : void 0
|
|
171
162
|
});
|
|
172
|
-
if (service.camelize)
|
|
173
|
-
response.body = camelizeKeys(response.body);
|
|
163
|
+
if (service.camelize) response.body = camelizeKeys(response.body);
|
|
174
164
|
return packageResponse(response, showExpanded);
|
|
175
165
|
};
|
|
176
166
|
}
|
|
@@ -310,10 +300,8 @@ var ApplicationAppearance = class extends BaseResource {
|
|
|
310
300
|
...options,
|
|
311
301
|
isForm: true
|
|
312
302
|
};
|
|
313
|
-
if (logo)
|
|
314
|
-
|
|
315
|
-
if (pwaIcon)
|
|
316
|
-
opts.pwaIcon = [pwaIcon.content, pwaIcon.filename];
|
|
303
|
+
if (logo) opts.logo = [logo.content, logo.filename];
|
|
304
|
+
if (pwaIcon) opts.pwaIcon = [pwaIcon.content, pwaIcon.filename];
|
|
317
305
|
return RequestHelper.put()(this, "application/appearence", opts);
|
|
318
306
|
}
|
|
319
307
|
return RequestHelper.put()(
|
|
@@ -411,10 +399,8 @@ function url({
|
|
|
411
399
|
groupId
|
|
412
400
|
} = {}) {
|
|
413
401
|
let prefix = "";
|
|
414
|
-
if (projectId)
|
|
415
|
-
|
|
416
|
-
else if (groupId)
|
|
417
|
-
prefix = endpoint`groups/${groupId}/`;
|
|
402
|
+
if (projectId) prefix = endpoint`projects/${projectId}/`;
|
|
403
|
+
else if (groupId) prefix = endpoint`groups/${groupId}/`;
|
|
418
404
|
return `${prefix}audit_events`;
|
|
419
405
|
}
|
|
420
406
|
var AuditEvents = class extends BaseResource {
|
|
@@ -677,10 +663,8 @@ var DashboardAnnotations = class extends BaseResource {
|
|
|
677
663
|
...options
|
|
678
664
|
} = {}) {
|
|
679
665
|
let url12;
|
|
680
|
-
if (environmentId)
|
|
681
|
-
|
|
682
|
-
else if (clusterId)
|
|
683
|
-
url12 = endpoint`clusters/${clusterId}/metrics_dashboard/annotations`;
|
|
666
|
+
if (environmentId) url12 = endpoint`environments/${environmentId}/metrics_dashboard/annotations`;
|
|
667
|
+
else if (clusterId) url12 = endpoint`clusters/${clusterId}/metrics_dashboard/annotations`;
|
|
684
668
|
else
|
|
685
669
|
throw new Error(
|
|
686
670
|
"Missing required argument. Please supply a environmentId or a cluserId in the options parameter."
|
|
@@ -697,10 +681,8 @@ function url3({
|
|
|
697
681
|
projectId,
|
|
698
682
|
groupId
|
|
699
683
|
} = {}) {
|
|
700
|
-
if (projectId)
|
|
701
|
-
|
|
702
|
-
if (groupId)
|
|
703
|
-
return endpoint`/groups/${groupId}/-/packages/debian`;
|
|
684
|
+
if (projectId) return endpoint`/projects/${projectId}/packages/debian`;
|
|
685
|
+
if (groupId) return endpoint`/groups/${groupId}/-/packages/debian`;
|
|
704
686
|
throw new Error(
|
|
705
687
|
"Missing required argument. Please supply a projectId or a groupId in the options parameter"
|
|
706
688
|
);
|
|
@@ -849,12 +831,9 @@ var DeployTokens = class extends BaseResource {
|
|
|
849
831
|
...options
|
|
850
832
|
} = {}) {
|
|
851
833
|
let url12;
|
|
852
|
-
if (projectId)
|
|
853
|
-
|
|
854
|
-
else
|
|
855
|
-
url12 = endpoint`groups/${groupId}/deploy_tokens`;
|
|
856
|
-
else
|
|
857
|
-
url12 = "deploy_tokens";
|
|
834
|
+
if (projectId) url12 = endpoint`projects/${projectId}/deploy_tokens`;
|
|
835
|
+
else if (groupId) url12 = endpoint`groups/${groupId}/deploy_tokens`;
|
|
836
|
+
else url12 = "deploy_tokens";
|
|
858
837
|
return RequestHelper.get()(this, url12, options);
|
|
859
838
|
}
|
|
860
839
|
create(name, scopes, {
|
|
@@ -863,10 +842,8 @@ var DeployTokens = class extends BaseResource {
|
|
|
863
842
|
...options
|
|
864
843
|
} = {}) {
|
|
865
844
|
let url12;
|
|
866
|
-
if (projectId)
|
|
867
|
-
|
|
868
|
-
else if (groupId)
|
|
869
|
-
url12 = endpoint`groups/${groupId}/deploy_tokens`;
|
|
845
|
+
if (projectId) url12 = endpoint`projects/${projectId}/deploy_tokens`;
|
|
846
|
+
else if (groupId) url12 = endpoint`groups/${groupId}/deploy_tokens`;
|
|
870
847
|
else {
|
|
871
848
|
throw new Error(
|
|
872
849
|
"Missing required argument. Please supply a projectId or a groupId in the options parameter."
|
|
@@ -884,10 +861,8 @@ var DeployTokens = class extends BaseResource {
|
|
|
884
861
|
...options
|
|
885
862
|
} = {}) {
|
|
886
863
|
let url12;
|
|
887
|
-
if (projectId)
|
|
888
|
-
|
|
889
|
-
else if (groupId)
|
|
890
|
-
url12 = endpoint`groups/${groupId}/deploy_tokens/${tokenId}`;
|
|
864
|
+
if (projectId) url12 = endpoint`projects/${projectId}/deploy_tokens/${tokenId}`;
|
|
865
|
+
else if (groupId) url12 = endpoint`groups/${groupId}/deploy_tokens/${tokenId}`;
|
|
891
866
|
else {
|
|
892
867
|
throw new Error(
|
|
893
868
|
"Missing required argument. Please supply a projectId or a groupId in the options parameter."
|
|
@@ -901,10 +876,8 @@ var DeployTokens = class extends BaseResource {
|
|
|
901
876
|
...options
|
|
902
877
|
} = {}) {
|
|
903
878
|
let url12;
|
|
904
|
-
if (projectId)
|
|
905
|
-
|
|
906
|
-
else if (groupId)
|
|
907
|
-
url12 = endpoint`groups/${groupId}/deploy_tokens/${tokenId}`;
|
|
879
|
+
if (projectId) url12 = endpoint`projects/${projectId}/deploy_tokens/${tokenId}`;
|
|
880
|
+
else if (groupId) url12 = endpoint`groups/${groupId}/deploy_tokens/${tokenId}`;
|
|
908
881
|
else {
|
|
909
882
|
throw new Error(
|
|
910
883
|
"Missing required argument. Please supply a projectId or a groupId in the options parameter."
|
|
@@ -991,8 +964,7 @@ function url4(resourceId, resourceType2, resourceId2, awardId) {
|
|
|
991
964
|
const [rId, rId2] = [resourceId, resourceId2].map(encodeURIComponent);
|
|
992
965
|
const output = [rId, resourceType2, rId2];
|
|
993
966
|
output.push("award_emoji");
|
|
994
|
-
if (awardId)
|
|
995
|
-
output.push(awardId);
|
|
967
|
+
if (awardId) output.push(awardId);
|
|
996
968
|
return output.join("/");
|
|
997
969
|
}
|
|
998
970
|
var ResourceAwardEmojis = class extends BaseResource {
|
|
@@ -1039,8 +1011,7 @@ function url5(resourceId, resourceType2, resourceId2, noteId, awardId) {
|
|
|
1039
1011
|
output.push("notes");
|
|
1040
1012
|
output.push(noteId);
|
|
1041
1013
|
output.push("award_emoji");
|
|
1042
|
-
if (awardId)
|
|
1043
|
-
output.push(awardId);
|
|
1014
|
+
if (awardId) output.push(awardId);
|
|
1044
1015
|
return output.join("/");
|
|
1045
1016
|
}
|
|
1046
1017
|
var ResourceNoteAwardEmojis = class extends BaseResource {
|
|
@@ -1366,8 +1337,7 @@ var ResourceMembers = class extends BaseResource {
|
|
|
1366
1337
|
...options
|
|
1367
1338
|
} = {}) {
|
|
1368
1339
|
let url12 = endpoint`${resourceId}/members`;
|
|
1369
|
-
if (includeInherited)
|
|
1370
|
-
url12 += "/all";
|
|
1340
|
+
if (includeInherited) url12 += "/all";
|
|
1371
1341
|
return RequestHelper.get()(this, url12, options);
|
|
1372
1342
|
}
|
|
1373
1343
|
edit(resourceId, userId, accessLevel, options) {
|
|
@@ -1379,8 +1349,7 @@ var ResourceMembers = class extends BaseResource {
|
|
|
1379
1349
|
show(resourceId, userId, { includeInherited, ...options } = {}) {
|
|
1380
1350
|
const [rId, uId] = [resourceId, userId].map(encodeURIComponent);
|
|
1381
1351
|
const url12 = [rId, "members"];
|
|
1382
|
-
if (includeInherited)
|
|
1383
|
-
url12.push("all");
|
|
1352
|
+
if (includeInherited) url12.push("all");
|
|
1384
1353
|
url12.push(uId);
|
|
1385
1354
|
return RequestHelper.get()(this, url12.join("/"), options);
|
|
1386
1355
|
}
|
|
@@ -1838,12 +1807,9 @@ var Events = class extends BaseResource {
|
|
|
1838
1807
|
...options
|
|
1839
1808
|
} = {}) {
|
|
1840
1809
|
let url12;
|
|
1841
|
-
if (projectId)
|
|
1842
|
-
|
|
1843
|
-
else
|
|
1844
|
-
url12 = endpoint`users/${userId}/events`;
|
|
1845
|
-
else
|
|
1846
|
-
url12 = "events";
|
|
1810
|
+
if (projectId) url12 = endpoint`projects/${projectId}/events`;
|
|
1811
|
+
else if (userId) url12 = endpoint`users/${userId}/events`;
|
|
1812
|
+
else url12 = "events";
|
|
1847
1813
|
return RequestHelper.get()(this, url12, options);
|
|
1848
1814
|
}
|
|
1849
1815
|
};
|
|
@@ -1991,10 +1957,8 @@ var Keys = class extends BaseResource {
|
|
|
1991
1957
|
...options
|
|
1992
1958
|
} = {}) {
|
|
1993
1959
|
let url12;
|
|
1994
|
-
if (keyId)
|
|
1995
|
-
|
|
1996
|
-
else if (fingerprint)
|
|
1997
|
-
url12 = `keys?fingerprint=${fingerprint}`;
|
|
1960
|
+
if (keyId) url12 = `keys/${keyId}`;
|
|
1961
|
+
else if (fingerprint) url12 = `keys?fingerprint=${fingerprint}`;
|
|
1998
1962
|
else {
|
|
1999
1963
|
throw new Error(
|
|
2000
1964
|
"Missing required argument. Please supply a fingerprint or a keyId in the options parameter"
|
|
@@ -2057,10 +2021,8 @@ var Maven = class extends BaseResource {
|
|
|
2057
2021
|
...options
|
|
2058
2022
|
}) {
|
|
2059
2023
|
let url12 = endpoint`packages/maven/${path}/${filename}`;
|
|
2060
|
-
if (projectId)
|
|
2061
|
-
|
|
2062
|
-
else if (groupId)
|
|
2063
|
-
url12 = endpoint`groups/${groupId}/-/${url12}`;
|
|
2024
|
+
if (projectId) url12 = endpoint`projects/${projectId}/${url12}`;
|
|
2025
|
+
else if (groupId) url12 = endpoint`groups/${groupId}/-/${url12}`;
|
|
2064
2026
|
return RequestHelper.get()(this, url12, options);
|
|
2065
2027
|
}
|
|
2066
2028
|
uploadPackageFile(projectId, path, packageFile, options) {
|
|
@@ -2184,10 +2146,8 @@ function url7({
|
|
|
2184
2146
|
groupId
|
|
2185
2147
|
} = {}) {
|
|
2186
2148
|
let prefix = "";
|
|
2187
|
-
if (projectId)
|
|
2188
|
-
|
|
2189
|
-
if (groupId)
|
|
2190
|
-
prefix = endpoint`groups/${groupId}/`;
|
|
2149
|
+
if (projectId) prefix = endpoint`projects/${projectId}/`;
|
|
2150
|
+
if (groupId) prefix = endpoint`groups/${groupId}/`;
|
|
2191
2151
|
return `${prefix}notification_settings`;
|
|
2192
2152
|
}
|
|
2193
2153
|
var NotificationSettings = class extends BaseResource {
|
|
@@ -2212,10 +2172,8 @@ function url8({
|
|
|
2212
2172
|
projectId,
|
|
2213
2173
|
groupId
|
|
2214
2174
|
} = {}) {
|
|
2215
|
-
if (projectId)
|
|
2216
|
-
|
|
2217
|
-
if (groupId)
|
|
2218
|
-
return endpoint`/groups/${groupId}/-/packages/nuget`;
|
|
2175
|
+
if (projectId) return endpoint`/projects/${projectId}/packages/nuget`;
|
|
2176
|
+
if (groupId) return endpoint`/groups/${groupId}/-/packages/nuget`;
|
|
2219
2177
|
throw new Error(
|
|
2220
2178
|
"Missing required argument. Please supply a projectId or a groupId in the options parameter"
|
|
2221
2179
|
);
|
|
@@ -2414,12 +2372,9 @@ var Search = class extends BaseResource {
|
|
|
2414
2372
|
all(scope, search, options) {
|
|
2415
2373
|
const { projectId, groupId, ...opts } = options || {};
|
|
2416
2374
|
let url12;
|
|
2417
|
-
if (projectId)
|
|
2418
|
-
|
|
2419
|
-
else
|
|
2420
|
-
url12 = endpoint`groups/${groupId}/`;
|
|
2421
|
-
else
|
|
2422
|
-
url12 = "";
|
|
2375
|
+
if (projectId) url12 = endpoint`projects/${projectId}/`;
|
|
2376
|
+
else if (groupId) url12 = endpoint`groups/${groupId}/`;
|
|
2377
|
+
else url12 = "";
|
|
2423
2378
|
return RequestHelper.get()(this, `${url12}search`, {
|
|
2424
2379
|
scope,
|
|
2425
2380
|
search,
|
|
@@ -2578,8 +2533,7 @@ var TodoLists = class extends BaseResource {
|
|
|
2578
2533
|
...options
|
|
2579
2534
|
} = {}) {
|
|
2580
2535
|
let prefix = "todos";
|
|
2581
|
-
if (todoId)
|
|
2582
|
-
prefix += `/${todoId}`;
|
|
2536
|
+
if (todoId) prefix += `/${todoId}`;
|
|
2583
2537
|
return RequestHelper.post()(
|
|
2584
2538
|
this,
|
|
2585
2539
|
`${prefix}/mark_as_done`,
|
|
@@ -2802,10 +2756,8 @@ var ContainerRegistry = class extends BaseResource {
|
|
|
2802
2756
|
...options
|
|
2803
2757
|
} = {}) {
|
|
2804
2758
|
let url12;
|
|
2805
|
-
if (groupId)
|
|
2806
|
-
|
|
2807
|
-
else if (projectId)
|
|
2808
|
-
url12 = endpoint`projects/${projectId}/registry/repositories`;
|
|
2759
|
+
if (groupId) url12 = endpoint`groups/${groupId}/registry/repositories`;
|
|
2760
|
+
else if (projectId) url12 = endpoint`projects/${projectId}/registry/repositories`;
|
|
2809
2761
|
else
|
|
2810
2762
|
throw new Error(
|
|
2811
2763
|
"Missing required argument. Please supply a groupId or a projectId in the options parameter."
|
|
@@ -3433,12 +3385,9 @@ var Issues = class extends BaseResource {
|
|
|
3433
3385
|
...options
|
|
3434
3386
|
} = {}) {
|
|
3435
3387
|
let url12;
|
|
3436
|
-
if (projectId)
|
|
3437
|
-
|
|
3438
|
-
else
|
|
3439
|
-
url12 = endpoint`groups/${groupId}/issues`;
|
|
3440
|
-
else
|
|
3441
|
-
url12 = "issues";
|
|
3388
|
+
if (projectId) url12 = endpoint`projects/${projectId}/issues`;
|
|
3389
|
+
else if (groupId) url12 = endpoint`groups/${groupId}/issues`;
|
|
3390
|
+
else url12 = "issues";
|
|
3442
3391
|
return RequestHelper.get()(this, url12, options);
|
|
3443
3392
|
}
|
|
3444
3393
|
allMetricImages(projectId, issueIId, options) {
|
|
@@ -3612,19 +3561,15 @@ var IssuesStatistics = class extends BaseResource {
|
|
|
3612
3561
|
...options
|
|
3613
3562
|
} = {}) {
|
|
3614
3563
|
let url12;
|
|
3615
|
-
if (projectId)
|
|
3616
|
-
|
|
3617
|
-
else
|
|
3618
|
-
url12 = endpoint`groups/${groupId}/issues_statistics`;
|
|
3619
|
-
else
|
|
3620
|
-
url12 = "issues_statistics";
|
|
3564
|
+
if (projectId) url12 = endpoint`projects/${projectId}/issues_statistics`;
|
|
3565
|
+
else if (groupId) url12 = endpoint`groups/${groupId}/issues_statistics`;
|
|
3566
|
+
else url12 = "issues_statistics";
|
|
3621
3567
|
return RequestHelper.get()(this, url12, options);
|
|
3622
3568
|
}
|
|
3623
3569
|
};
|
|
3624
3570
|
function generateDownloadPathForJob(projectId, jobId, artifactPath) {
|
|
3625
3571
|
let url12 = endpoint`projects/${projectId}/jobs/${jobId}/artifacts`;
|
|
3626
|
-
if (artifactPath)
|
|
3627
|
-
url12 += `/${artifactPath}`;
|
|
3572
|
+
if (artifactPath) url12 += `/${artifactPath}`;
|
|
3628
3573
|
return url12;
|
|
3629
3574
|
}
|
|
3630
3575
|
function generateDownloadPath(projectId, ref, artifactPath) {
|
|
@@ -3644,10 +3589,8 @@ var JobArtifacts = class extends BaseResource {
|
|
|
3644
3589
|
...options
|
|
3645
3590
|
} = {}) {
|
|
3646
3591
|
let url12;
|
|
3647
|
-
if (jobId)
|
|
3648
|
-
|
|
3649
|
-
else if (options?.job && ref)
|
|
3650
|
-
url12 = generateDownloadPath(projectId, ref, artifactPath);
|
|
3592
|
+
if (jobId) url12 = generateDownloadPathForJob(projectId, jobId, artifactPath);
|
|
3593
|
+
else if (options?.job && ref) url12 = generateDownloadPath(projectId, ref, artifactPath);
|
|
3651
3594
|
else
|
|
3652
3595
|
throw new Error(
|
|
3653
3596
|
"Missing one of the required parameters. See typing documentation for available arguments."
|
|
@@ -3722,13 +3665,11 @@ var Jobs = class extends BaseResource {
|
|
|
3722
3665
|
);
|
|
3723
3666
|
}
|
|
3724
3667
|
showConnectedJob(options) {
|
|
3725
|
-
if (!this.headers["job-token"])
|
|
3726
|
-
throw new Error('Missing required header "job-token"');
|
|
3668
|
+
if (!this.headers["job-token"]) throw new Error('Missing required header "job-token"');
|
|
3727
3669
|
return RequestHelper.get()(this, "job", options);
|
|
3728
3670
|
}
|
|
3729
3671
|
showConnectedJobK8Agents(options) {
|
|
3730
|
-
if (!this.headers["job-token"])
|
|
3731
|
-
throw new Error('Missing required header "job-token"');
|
|
3672
|
+
if (!this.headers["job-token"]) throw new Error('Missing required header "job-token"');
|
|
3732
3673
|
return RequestHelper.get()(this, "job/allowed_agents", options);
|
|
3733
3674
|
}
|
|
3734
3675
|
showLog(projectId, jobId, options) {
|
|
@@ -3739,6 +3680,43 @@ var Jobs = class extends BaseResource {
|
|
|
3739
3680
|
);
|
|
3740
3681
|
}
|
|
3741
3682
|
};
|
|
3683
|
+
var JobTokenScopes = class extends BaseResource {
|
|
3684
|
+
show(projectId, options) {
|
|
3685
|
+
return RequestHelper.get()(
|
|
3686
|
+
this,
|
|
3687
|
+
endpoint`projects/${projectId}/job_token_scope`,
|
|
3688
|
+
options
|
|
3689
|
+
);
|
|
3690
|
+
}
|
|
3691
|
+
edit(projectId, enabled, options) {
|
|
3692
|
+
return RequestHelper.patch()(
|
|
3693
|
+
this,
|
|
3694
|
+
endpoint`projects/${projectId}/job_token_scope`,
|
|
3695
|
+
{ ...options, enabled }
|
|
3696
|
+
);
|
|
3697
|
+
}
|
|
3698
|
+
showInboundAllowList(projectId, options) {
|
|
3699
|
+
return RequestHelper.get()(
|
|
3700
|
+
this,
|
|
3701
|
+
endpoint`projects/${projectId}/job_token_scope/allowlist`,
|
|
3702
|
+
options
|
|
3703
|
+
);
|
|
3704
|
+
}
|
|
3705
|
+
addToInboundAllowList(projectId, targetProjectId, options) {
|
|
3706
|
+
return RequestHelper.post()(
|
|
3707
|
+
this,
|
|
3708
|
+
endpoint`projects/${projectId}/job_token_scope/allowlist/${targetProjectId}`,
|
|
3709
|
+
options
|
|
3710
|
+
);
|
|
3711
|
+
}
|
|
3712
|
+
removeFromInboundAllowList(projectId, targetProjectId, options) {
|
|
3713
|
+
return RequestHelper.del()(
|
|
3714
|
+
this,
|
|
3715
|
+
endpoint`projects/${projectId}/job_token_scope/allowlist/${targetProjectId}`,
|
|
3716
|
+
options
|
|
3717
|
+
);
|
|
3718
|
+
}
|
|
3719
|
+
};
|
|
3742
3720
|
var MergeRequestApprovals = class extends BaseResource {
|
|
3743
3721
|
allApprovalRules(projectId, { mergerequestIId, ...options } = {}) {
|
|
3744
3722
|
let url12;
|
|
@@ -4225,10 +4203,8 @@ var Packages = class extends BaseResource {
|
|
|
4225
4203
|
...options
|
|
4226
4204
|
} = {}) {
|
|
4227
4205
|
let url12;
|
|
4228
|
-
if (projectId)
|
|
4229
|
-
|
|
4230
|
-
else if (groupId)
|
|
4231
|
-
url12 = endpoint`groups/${groupId}/packages`;
|
|
4206
|
+
if (projectId) url12 = endpoint`projects/${projectId}/packages`;
|
|
4207
|
+
else if (groupId) url12 = endpoint`groups/${groupId}/packages`;
|
|
4232
4208
|
else {
|
|
4233
4209
|
throw new Error(
|
|
4234
4210
|
"Missing required argument. Please supply a projectId or a groupId in the options parameter."
|
|
@@ -5041,12 +5017,9 @@ var Projects = class extends BaseResource {
|
|
|
5041
5017
|
...options
|
|
5042
5018
|
} = {}) {
|
|
5043
5019
|
let uri;
|
|
5044
|
-
if (userId && starredOnly)
|
|
5045
|
-
|
|
5046
|
-
else
|
|
5047
|
-
uri = endpoint`users/${userId}/projects`;
|
|
5048
|
-
else
|
|
5049
|
-
uri = "projects";
|
|
5020
|
+
if (userId && starredOnly) uri = endpoint`users/${userId}/starred_projects`;
|
|
5021
|
+
else if (userId) uri = endpoint`users/${userId}/projects`;
|
|
5022
|
+
else uri = "projects";
|
|
5050
5023
|
return RequestHelper.get()(this, uri, options);
|
|
5051
5024
|
}
|
|
5052
5025
|
allTransferLocations(projectId, options) {
|
|
@@ -5588,14 +5561,10 @@ var Runners = class extends BaseResource {
|
|
|
5588
5561
|
...options
|
|
5589
5562
|
} = {}) {
|
|
5590
5563
|
let url12;
|
|
5591
|
-
if (projectId)
|
|
5592
|
-
|
|
5593
|
-
else if (
|
|
5594
|
-
|
|
5595
|
-
else if (owned)
|
|
5596
|
-
url12 = "runners";
|
|
5597
|
-
else
|
|
5598
|
-
url12 = "runners/all";
|
|
5564
|
+
if (projectId) url12 = endpoint`projects/${projectId}/runners`;
|
|
5565
|
+
else if (groupId) url12 = endpoint`groups/${groupId}/runners`;
|
|
5566
|
+
else if (owned) url12 = "runners";
|
|
5567
|
+
else url12 = "runners/all";
|
|
5599
5568
|
return RequestHelper.get()(this, url12, options);
|
|
5600
5569
|
}
|
|
5601
5570
|
allJobs(runnerId, options) {
|
|
@@ -5630,8 +5599,7 @@ var Runners = class extends BaseResource {
|
|
|
5630
5599
|
...options
|
|
5631
5600
|
}) {
|
|
5632
5601
|
let url12;
|
|
5633
|
-
if (runnerId)
|
|
5634
|
-
url12 = `runners/${runnerId}`;
|
|
5602
|
+
if (runnerId) url12 = `runners/${runnerId}`;
|
|
5635
5603
|
else if (token) {
|
|
5636
5604
|
url12 = "runners";
|
|
5637
5605
|
} else
|
|
@@ -5649,10 +5617,8 @@ var Runners = class extends BaseResource {
|
|
|
5649
5617
|
...options
|
|
5650
5618
|
} = {}) {
|
|
5651
5619
|
let url12;
|
|
5652
|
-
if (runnerId)
|
|
5653
|
-
|
|
5654
|
-
else if (token)
|
|
5655
|
-
url12 = "runners/reset_registration_token";
|
|
5620
|
+
if (runnerId) url12 = endpoint`runners/${runnerId}/reset_registration_token`;
|
|
5621
|
+
else if (token) url12 = "runners/reset_registration_token";
|
|
5656
5622
|
else {
|
|
5657
5623
|
throw new Error("Missing either runnerId or token parameters");
|
|
5658
5624
|
}
|
|
@@ -5812,7 +5778,7 @@ var EpicIssues = class extends BaseResource {
|
|
|
5812
5778
|
// src/resources/EpicLabelEvents.ts
|
|
5813
5779
|
var EpicLabelEvents = class extends ResourceLabelEvents {
|
|
5814
5780
|
constructor(options) {
|
|
5815
|
-
super("groups", "
|
|
5781
|
+
super("groups", "epics", options);
|
|
5816
5782
|
}
|
|
5817
5783
|
};
|
|
5818
5784
|
var EpicLinks = class extends BaseResource {
|
|
@@ -6298,7 +6264,11 @@ var GroupServiceAccounts = class extends BaseResource {
|
|
|
6298
6264
|
options
|
|
6299
6265
|
);
|
|
6300
6266
|
}
|
|
6267
|
+
// @deprecated In favor of `createPersonalAccessToken`
|
|
6301
6268
|
addPersonalAccessToken(groupId, serviceAccountId, options) {
|
|
6269
|
+
return this.createPersonalAccessToken(groupId, serviceAccountId, options);
|
|
6270
|
+
}
|
|
6271
|
+
createPersonalAccessToken(groupId, serviceAccountId, options) {
|
|
6302
6272
|
return RequestHelper.post()(
|
|
6303
6273
|
this,
|
|
6304
6274
|
endpoint`groups/${groupId}/service_accounts/${serviceAccountId}`,
|
|
@@ -6616,7 +6586,11 @@ var Users = class extends BaseResource {
|
|
|
6616
6586
|
return RequestHelper.post()(this, endpoint`users/${userId}/activate`, options);
|
|
6617
6587
|
}
|
|
6618
6588
|
all(options) {
|
|
6619
|
-
return RequestHelper.get()(
|
|
6589
|
+
return RequestHelper.get()(
|
|
6590
|
+
this,
|
|
6591
|
+
"users",
|
|
6592
|
+
options
|
|
6593
|
+
);
|
|
6620
6594
|
}
|
|
6621
6595
|
allActivities(options) {
|
|
6622
6596
|
return RequestHelper.get()(this, "user/activities", options);
|
|
@@ -6625,10 +6599,18 @@ var Users = class extends BaseResource {
|
|
|
6625
6599
|
return RequestHelper.get()(this, endpoint`users/${userId}/events`, options);
|
|
6626
6600
|
}
|
|
6627
6601
|
allFollowers(userId, options) {
|
|
6628
|
-
return RequestHelper.get()(
|
|
6602
|
+
return RequestHelper.get()(
|
|
6603
|
+
this,
|
|
6604
|
+
endpoint`users/${userId}/followers`,
|
|
6605
|
+
options
|
|
6606
|
+
);
|
|
6629
6607
|
}
|
|
6630
6608
|
allFollowing(userId, options) {
|
|
6631
|
-
return RequestHelper.get()(
|
|
6609
|
+
return RequestHelper.get()(
|
|
6610
|
+
this,
|
|
6611
|
+
endpoint`users/${userId}/following`,
|
|
6612
|
+
options
|
|
6613
|
+
);
|
|
6632
6614
|
}
|
|
6633
6615
|
allMemberships(userId, options) {
|
|
6634
6616
|
return RequestHelper.get()(
|
|
@@ -6734,7 +6716,11 @@ var Users = class extends BaseResource {
|
|
|
6734
6716
|
);
|
|
6735
6717
|
}
|
|
6736
6718
|
showCurrentUser(options) {
|
|
6737
|
-
return RequestHelper.get()(
|
|
6719
|
+
return RequestHelper.get()(
|
|
6720
|
+
this,
|
|
6721
|
+
"user",
|
|
6722
|
+
options
|
|
6723
|
+
);
|
|
6738
6724
|
}
|
|
6739
6725
|
showCurrentUserPreferences(options) {
|
|
6740
6726
|
return RequestHelper.get()(this, "user/preferences", options);
|
|
@@ -6744,10 +6730,8 @@ var Users = class extends BaseResource {
|
|
|
6744
6730
|
...options
|
|
6745
6731
|
} = {}) {
|
|
6746
6732
|
let url12;
|
|
6747
|
-
if (iDOrUsername)
|
|
6748
|
-
|
|
6749
|
-
else
|
|
6750
|
-
url12 = "user/status";
|
|
6733
|
+
if (iDOrUsername) url12 = `users/${iDOrUsername}/status`;
|
|
6734
|
+
else url12 = "user/status";
|
|
6751
6735
|
return RequestHelper.get()(this, url12, options);
|
|
6752
6736
|
}
|
|
6753
6737
|
remove(userId, options) {
|
|
@@ -6851,6 +6835,7 @@ var resources = {
|
|
|
6851
6835
|
IssueWeightEvents,
|
|
6852
6836
|
JobArtifacts,
|
|
6853
6837
|
Jobs,
|
|
6838
|
+
JobTokenScopes,
|
|
6854
6839
|
MergeRequestApprovals,
|
|
6855
6840
|
MergeRequestAwardEmojis,
|
|
6856
6841
|
MergeRequestContextCommits,
|
|
@@ -6977,4 +6962,4 @@ var AccessLevel = /* @__PURE__ */ ((AccessLevel2) => {
|
|
|
6977
6962
|
return AccessLevel2;
|
|
6978
6963
|
})(AccessLevel || {});
|
|
6979
6964
|
|
|
6980
|
-
export { AccessLevel, Agents, AlertManagement, ApplicationAppearance, ApplicationPlanLimits, ApplicationSettings, ApplicationStatistics, Applications, AuditEvents, Avatar, Branches, BroadcastMessages, CodeSuggestions, CommitDiscussions, Commits, Composer, Conan, ContainerRegistry, DashboardAnnotations, Debian, DependencyProxy, DeployKeys, DeployTokens, Deployments, DockerfileTemplates, Environments, EpicAwardEmojis, EpicDiscussions, EpicIssues, EpicLabelEvents, EpicLinks, EpicNotes, Epics, ErrorTrackingClientKeys, ErrorTrackingSettings, Events, Experiments, ExternalStatusChecks, FeatureFlagUserLists, FeatureFlags, FreezePeriods, GeoNodes, GeoSites, GitLabCIYMLTemplates, GitignoreTemplates, Gitlab, GitlabPages, GoProxy, GroupAccessRequests, GroupAccessTokens, GroupActivityAnalytics, GroupBadges, GroupCustomAttributes, GroupDORA4Metrics, GroupEpicBoards, GroupHooks, GroupImportExports, GroupInvitations, GroupIssueBoards, GroupIterations, GroupLDAPLinks, GroupLabels, GroupMemberRoles, GroupMembers, GroupMilestones, GroupProtectedEnvironments, GroupPushRules, GroupRelationExports, GroupReleases, GroupRepositoryStorageMoves, GroupSAMLIdentities, GroupSAMLLinks, GroupSCIMIdentities, GroupServiceAccounts, GroupVariables, GroupWikis, Groups, Helm, Import, InstanceLevelCICDVariables, Integrations, IssueAwardEmojis, IssueDiscussions, IssueIterationEvents, IssueLabelEvents, IssueLinks, IssueMilestoneEvents, IssueNoteAwardEmojis, IssueNotes, IssueStateEvents, IssueWeightEvents, Issues, IssuesStatistics, JobArtifacts, Jobs, Keys, License, LicenseTemplates, LinkedEpics, Lint, Markdown, Maven, MergeRequestApprovals, MergeRequestAwardEmojis, MergeRequestContextCommits, MergeRequestDiscussions, MergeRequestDraftNotes, MergeRequestLabelEvents, MergeRequestMilestoneEvents, MergeRequestNoteAwardEmojis, MergeRequestNotes, MergeRequests, MergeTrains, Metadata, Migrations, NPM, Namespaces, NotificationSettings, NuGet, PackageRegistry, Packages, PagesDomains, PersonalAccessTokens, PipelineScheduleVariables, PipelineSchedules, PipelineTriggerTokens, Pipelines, ProductAnalytics, ProjectAccessRequests, ProjectAccessTokens, ProjectAliases, ProjectBadges, ProjectCustomAttributes, ProjectDORA4Metrics, ProjectHooks, ProjectImportExports, ProjectInvitations, ProjectIssueBoards, ProjectIterations, ProjectLabels, ProjectMembers, ProjectMilestones, ProjectProtectedEnvironments, ProjectPushRules, ProjectRelationsExport, ProjectReleases, ProjectRemoteMirrors, ProjectRepositoryStorageMoves, ProjectSnippetAwardEmojis, ProjectSnippetDiscussions, ProjectSnippetNotes, ProjectSnippets, ProjectStatistics, ProjectTemplates, ProjectVariables, ProjectVulnerabilities, ProjectWikis, Projects, ProtectedBranches, ProtectedTags, PyPI, ReleaseLinks, Repositories, RepositoryFiles, RepositorySubmodules, ResourceGroups, RubyGems, Runners, Search, SearchAdmin, SecureFiles, ServiceAccounts, ServiceData, SidekiqMetrics, SidekiqQueues, SnippetRepositoryStorageMoves, Snippets, Suggestions, SystemHooks, Tags, TodoLists, Topics, UserCustomAttributes, UserEmails, UserGPGKeys, UserImpersonationTokens, UserSSHKeys, UserStarredMetricsDashboard, Users };
|
|
6965
|
+
export { AccessLevel, Agents, AlertManagement, ApplicationAppearance, ApplicationPlanLimits, ApplicationSettings, ApplicationStatistics, Applications, AuditEvents, Avatar, Branches, BroadcastMessages, CodeSuggestions, CommitDiscussions, Commits, Composer, Conan, ContainerRegistry, DashboardAnnotations, Debian, DependencyProxy, DeployKeys, DeployTokens, Deployments, DockerfileTemplates, Environments, EpicAwardEmojis, EpicDiscussions, EpicIssues, EpicLabelEvents, EpicLinks, EpicNotes, Epics, ErrorTrackingClientKeys, ErrorTrackingSettings, Events, Experiments, ExternalStatusChecks, FeatureFlagUserLists, FeatureFlags, FreezePeriods, GeoNodes, GeoSites, GitLabCIYMLTemplates, GitignoreTemplates, Gitlab, GitlabPages, GoProxy, GroupAccessRequests, GroupAccessTokens, GroupActivityAnalytics, GroupBadges, GroupCustomAttributes, GroupDORA4Metrics, GroupEpicBoards, GroupHooks, GroupImportExports, GroupInvitations, GroupIssueBoards, GroupIterations, GroupLDAPLinks, GroupLabels, GroupMemberRoles, GroupMembers, GroupMilestones, GroupProtectedEnvironments, GroupPushRules, GroupRelationExports, GroupReleases, GroupRepositoryStorageMoves, GroupSAMLIdentities, GroupSAMLLinks, GroupSCIMIdentities, GroupServiceAccounts, GroupVariables, GroupWikis, Groups, Helm, Import, InstanceLevelCICDVariables, Integrations, IssueAwardEmojis, IssueDiscussions, IssueIterationEvents, IssueLabelEvents, IssueLinks, IssueMilestoneEvents, IssueNoteAwardEmojis, IssueNotes, IssueStateEvents, IssueWeightEvents, Issues, IssuesStatistics, JobArtifacts, JobTokenScopes, Jobs, Keys, License, LicenseTemplates, LinkedEpics, Lint, Markdown, Maven, MergeRequestApprovals, MergeRequestAwardEmojis, MergeRequestContextCommits, MergeRequestDiscussions, MergeRequestDraftNotes, MergeRequestLabelEvents, MergeRequestMilestoneEvents, MergeRequestNoteAwardEmojis, MergeRequestNotes, MergeRequests, MergeTrains, Metadata, Migrations, NPM, Namespaces, NotificationSettings, NuGet, PackageRegistry, Packages, PagesDomains, PersonalAccessTokens, PipelineScheduleVariables, PipelineSchedules, PipelineTriggerTokens, Pipelines, ProductAnalytics, ProjectAccessRequests, ProjectAccessTokens, ProjectAliases, ProjectBadges, ProjectCustomAttributes, ProjectDORA4Metrics, ProjectHooks, ProjectImportExports, ProjectInvitations, ProjectIssueBoards, ProjectIterations, ProjectLabels, ProjectMembers, ProjectMilestones, ProjectProtectedEnvironments, ProjectPushRules, ProjectRelationsExport, ProjectReleases, ProjectRemoteMirrors, ProjectRepositoryStorageMoves, ProjectSnippetAwardEmojis, ProjectSnippetDiscussions, ProjectSnippetNotes, ProjectSnippets, ProjectStatistics, ProjectTemplates, ProjectVariables, ProjectVulnerabilities, ProjectWikis, Projects, ProtectedBranches, ProtectedTags, PyPI, ReleaseLinks, Repositories, RepositoryFiles, RepositorySubmodules, ResourceGroups, RubyGems, Runners, Search, SearchAdmin, SecureFiles, ServiceAccounts, ServiceData, SidekiqMetrics, SidekiqQueues, SnippetRepositoryStorageMoves, Snippets, Suggestions, SystemHooks, Tags, TodoLists, Topics, UserCustomAttributes, UserEmails, UserGPGKeys, UserImpersonationTokens, UserSSHKeys, UserStarredMetricsDashboard, Users };
|
package/dist/map.json
CHANGED
|
@@ -2914,6 +2914,50 @@
|
|
|
2914
2914
|
]
|
|
2915
2915
|
}
|
|
2916
2916
|
],
|
|
2917
|
+
"JobTokenScopes": [
|
|
2918
|
+
{
|
|
2919
|
+
"name": "constructor",
|
|
2920
|
+
"args": [
|
|
2921
|
+
"0",
|
|
2922
|
+
"1",
|
|
2923
|
+
"2",
|
|
2924
|
+
"3"
|
|
2925
|
+
]
|
|
2926
|
+
},
|
|
2927
|
+
{
|
|
2928
|
+
"name": "show",
|
|
2929
|
+
"args": [
|
|
2930
|
+
"projectId"
|
|
2931
|
+
]
|
|
2932
|
+
},
|
|
2933
|
+
{
|
|
2934
|
+
"name": "edit",
|
|
2935
|
+
"args": [
|
|
2936
|
+
"projectId",
|
|
2937
|
+
"enabled"
|
|
2938
|
+
]
|
|
2939
|
+
},
|
|
2940
|
+
{
|
|
2941
|
+
"name": "showInboundAllowList",
|
|
2942
|
+
"args": [
|
|
2943
|
+
"projectId"
|
|
2944
|
+
]
|
|
2945
|
+
},
|
|
2946
|
+
{
|
|
2947
|
+
"name": "addToInboundAllowList",
|
|
2948
|
+
"args": [
|
|
2949
|
+
"projectId",
|
|
2950
|
+
"targetProjectId"
|
|
2951
|
+
]
|
|
2952
|
+
},
|
|
2953
|
+
{
|
|
2954
|
+
"name": "removeFromInboundAllowList",
|
|
2955
|
+
"args": [
|
|
2956
|
+
"projectId",
|
|
2957
|
+
"targetProjectId"
|
|
2958
|
+
]
|
|
2959
|
+
}
|
|
2960
|
+
],
|
|
2917
2961
|
"MergeRequestApprovals": [
|
|
2918
2962
|
{
|
|
2919
2963
|
"name": "constructor",
|
|
@@ -5894,6 +5938,13 @@
|
|
|
5894
5938
|
"serviceAccountId"
|
|
5895
5939
|
]
|
|
5896
5940
|
},
|
|
5941
|
+
{
|
|
5942
|
+
"name": "createPersonalAccessToken",
|
|
5943
|
+
"args": [
|
|
5944
|
+
"groupId",
|
|
5945
|
+
"serviceAccountId"
|
|
5946
|
+
]
|
|
5947
|
+
},
|
|
5897
5948
|
{
|
|
5898
5949
|
"name": "rotatePersonalAccessToken",
|
|
5899
5950
|
"args": [
|