@gitbeaker/core 39.5.1 → 39.6.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/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +6 -13
- package/dist/index.mjs +6 -13
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -17,7 +17,7 @@ type Only3<T, U, V> = Required<T> & Never<U> & Never<V>;
|
|
|
17
17
|
type OnlyOrNone<T, U> = Partial<T> & Never<U>;
|
|
18
18
|
type OnlyOrNone3<T, U, V> = Partial<T> & Never<U> & Never<V>;
|
|
19
19
|
type Either<T, U> = Only<T, U> | Only<U, T>;
|
|
20
|
-
type Either3<T, U, V> = Only3<T, U, V> | Only3<T, U
|
|
20
|
+
type Either3<T, U, V> = Only3<T, U, V> | Only3<V, T, U> | Only3<U, V, T>;
|
|
21
21
|
type EitherOrNone<T, U> = OnlyOrNone<T, U> | OnlyOrNone<U, T>;
|
|
22
22
|
type EitherOrNone3<T, U, V> = OnlyOrNone3<T, U, V> | OnlyOrNone3<U, T, V> | OnlyOrNone3<V, T, U>;
|
|
23
23
|
type AllOrNone<T extends Record<string, any>> = T | Partial<Record<keyof T, never>>;
|
|
@@ -2451,7 +2451,7 @@ interface MergeRequestSchema extends CondensedMergeRequestSchema {
|
|
|
2451
2451
|
task_completion_status: TaskCompletionStatusSchema;
|
|
2452
2452
|
has_conflicts: boolean;
|
|
2453
2453
|
blocking_discussions_resolved: boolean;
|
|
2454
|
-
approvals_before_merge:
|
|
2454
|
+
approvals_before_merge: number | null;
|
|
2455
2455
|
}
|
|
2456
2456
|
interface ExpandedMergeRequestSchema extends MergeRequestSchema {
|
|
2457
2457
|
subscribed: boolean;
|
|
@@ -4181,7 +4181,7 @@ declare class SidekiqQueues<C extends boolean = false> extends BaseResource<C> {
|
|
|
4181
4181
|
}
|
|
4182
4182
|
|
|
4183
4183
|
interface SnippetRepositoryStorageMoveSchema extends RepositoryStorageMoveSchema {
|
|
4184
|
-
snippet: Pick<SnippetSchema, 'id' | 'title' | 'description' | 'visibility' | 'updated_at' | 'created_at' | '
|
|
4184
|
+
snippet: Pick<SnippetSchema, 'id' | 'title' | 'description' | 'visibility' | 'updated_at' | 'created_at' | 'web_url' | 'raw_url' | 'ssh_url_to_repo' | 'http_url_to_repo'>;
|
|
4185
4185
|
}
|
|
4186
4186
|
interface SnippetRepositoryStorageMoves<C extends boolean = false> extends ResourceRepositoryStorageMoves<C> {
|
|
4187
4187
|
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(options?: {
|
|
@@ -5073,7 +5073,7 @@ declare class IssueWeightEvents<C extends boolean = false> extends ResourceState
|
|
|
5073
5073
|
}
|
|
5074
5074
|
|
|
5075
5075
|
declare class JobArtifacts<C extends boolean = false> extends BaseResource<C> {
|
|
5076
|
-
downloadArchive<E extends boolean = false>(projectId: string | number, { jobId,
|
|
5076
|
+
downloadArchive<E extends boolean = false>(projectId: string | number, { jobId, artifactPath, ref, ...options }?: ({
|
|
5077
5077
|
jobId: number;
|
|
5078
5078
|
artifactPath?: undefined;
|
|
5079
5079
|
job?: undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ type Only3<T, U, V> = Required<T> & Never<U> & Never<V>;
|
|
|
17
17
|
type OnlyOrNone<T, U> = Partial<T> & Never<U>;
|
|
18
18
|
type OnlyOrNone3<T, U, V> = Partial<T> & Never<U> & Never<V>;
|
|
19
19
|
type Either<T, U> = Only<T, U> | Only<U, T>;
|
|
20
|
-
type Either3<T, U, V> = Only3<T, U, V> | Only3<T, U
|
|
20
|
+
type Either3<T, U, V> = Only3<T, U, V> | Only3<V, T, U> | Only3<U, V, T>;
|
|
21
21
|
type EitherOrNone<T, U> = OnlyOrNone<T, U> | OnlyOrNone<U, T>;
|
|
22
22
|
type EitherOrNone3<T, U, V> = OnlyOrNone3<T, U, V> | OnlyOrNone3<U, T, V> | OnlyOrNone3<V, T, U>;
|
|
23
23
|
type AllOrNone<T extends Record<string, any>> = T | Partial<Record<keyof T, never>>;
|
|
@@ -2451,7 +2451,7 @@ interface MergeRequestSchema extends CondensedMergeRequestSchema {
|
|
|
2451
2451
|
task_completion_status: TaskCompletionStatusSchema;
|
|
2452
2452
|
has_conflicts: boolean;
|
|
2453
2453
|
blocking_discussions_resolved: boolean;
|
|
2454
|
-
approvals_before_merge:
|
|
2454
|
+
approvals_before_merge: number | null;
|
|
2455
2455
|
}
|
|
2456
2456
|
interface ExpandedMergeRequestSchema extends MergeRequestSchema {
|
|
2457
2457
|
subscribed: boolean;
|
|
@@ -4181,7 +4181,7 @@ declare class SidekiqQueues<C extends boolean = false> extends BaseResource<C> {
|
|
|
4181
4181
|
}
|
|
4182
4182
|
|
|
4183
4183
|
interface SnippetRepositoryStorageMoveSchema extends RepositoryStorageMoveSchema {
|
|
4184
|
-
snippet: Pick<SnippetSchema, 'id' | 'title' | 'description' | 'visibility' | 'updated_at' | 'created_at' | '
|
|
4184
|
+
snippet: Pick<SnippetSchema, 'id' | 'title' | 'description' | 'visibility' | 'updated_at' | 'created_at' | 'web_url' | 'raw_url' | 'ssh_url_to_repo' | 'http_url_to_repo'>;
|
|
4185
4185
|
}
|
|
4186
4186
|
interface SnippetRepositoryStorageMoves<C extends boolean = false> extends ResourceRepositoryStorageMoves<C> {
|
|
4187
4187
|
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(options?: {
|
|
@@ -5073,7 +5073,7 @@ declare class IssueWeightEvents<C extends boolean = false> extends ResourceState
|
|
|
5073
5073
|
}
|
|
5074
5074
|
|
|
5075
5075
|
declare class JobArtifacts<C extends boolean = false> extends BaseResource<C> {
|
|
5076
|
-
downloadArchive<E extends boolean = false>(projectId: string | number, { jobId,
|
|
5076
|
+
downloadArchive<E extends boolean = false>(projectId: string | number, { jobId, artifactPath, ref, ...options }?: ({
|
|
5077
5077
|
jobId: number;
|
|
5078
5078
|
artifactPath?: undefined;
|
|
5079
5079
|
job?: undefined;
|
package/dist/index.js
CHANGED
|
@@ -3555,39 +3555,32 @@ function generateDownloadPathForJob(projectId, jobId, artifactPath) {
|
|
|
3555
3555
|
url12 += `/${artifactPath}`;
|
|
3556
3556
|
return url12;
|
|
3557
3557
|
}
|
|
3558
|
-
function generateDownloadPath(projectId, ref,
|
|
3558
|
+
function generateDownloadPath(projectId, ref, artifactPath) {
|
|
3559
3559
|
let url12 = endpoint`projects/${projectId}/jobs/artifacts/${ref}`;
|
|
3560
3560
|
if (artifactPath) {
|
|
3561
|
-
url12 += endpoint`/raw/${artifactPath}
|
|
3561
|
+
url12 += endpoint`/raw/${artifactPath}`;
|
|
3562
3562
|
} else {
|
|
3563
|
-
url12 += endpoint`/download
|
|
3563
|
+
url12 += endpoint`/download`;
|
|
3564
3564
|
}
|
|
3565
3565
|
return url12;
|
|
3566
3566
|
}
|
|
3567
3567
|
var JobArtifacts = class extends requesterUtils.BaseResource {
|
|
3568
3568
|
downloadArchive(projectId, {
|
|
3569
3569
|
jobId,
|
|
3570
|
-
jobToken,
|
|
3571
3570
|
artifactPath,
|
|
3572
3571
|
ref,
|
|
3573
|
-
job,
|
|
3574
3572
|
...options
|
|
3575
3573
|
} = {}) {
|
|
3576
3574
|
let url12;
|
|
3577
3575
|
if (jobId)
|
|
3578
3576
|
url12 = generateDownloadPathForJob(projectId, jobId, artifactPath);
|
|
3579
|
-
else if (job && ref)
|
|
3580
|
-
url12 = generateDownloadPath(projectId, ref,
|
|
3577
|
+
else if (options?.job && ref)
|
|
3578
|
+
url12 = generateDownloadPath(projectId, ref, artifactPath);
|
|
3581
3579
|
else
|
|
3582
3580
|
throw new Error(
|
|
3583
3581
|
"Missing one of the required parameters. See typing documentation for available arguments."
|
|
3584
3582
|
);
|
|
3585
|
-
return RequestHelper.get()(this, url12,
|
|
3586
|
-
searchParams: {
|
|
3587
|
-
jobToken
|
|
3588
|
-
},
|
|
3589
|
-
...options
|
|
3590
|
-
});
|
|
3583
|
+
return RequestHelper.get()(this, url12, options);
|
|
3591
3584
|
}
|
|
3592
3585
|
keep(projectId, jobId, options) {
|
|
3593
3586
|
return RequestHelper.post()(
|
package/dist/index.mjs
CHANGED
|
@@ -3549,39 +3549,32 @@ function generateDownloadPathForJob(projectId, jobId, artifactPath) {
|
|
|
3549
3549
|
url12 += `/${artifactPath}`;
|
|
3550
3550
|
return url12;
|
|
3551
3551
|
}
|
|
3552
|
-
function generateDownloadPath(projectId, ref,
|
|
3552
|
+
function generateDownloadPath(projectId, ref, artifactPath) {
|
|
3553
3553
|
let url12 = endpoint`projects/${projectId}/jobs/artifacts/${ref}`;
|
|
3554
3554
|
if (artifactPath) {
|
|
3555
|
-
url12 += endpoint`/raw/${artifactPath}
|
|
3555
|
+
url12 += endpoint`/raw/${artifactPath}`;
|
|
3556
3556
|
} else {
|
|
3557
|
-
url12 += endpoint`/download
|
|
3557
|
+
url12 += endpoint`/download`;
|
|
3558
3558
|
}
|
|
3559
3559
|
return url12;
|
|
3560
3560
|
}
|
|
3561
3561
|
var JobArtifacts = class extends BaseResource {
|
|
3562
3562
|
downloadArchive(projectId, {
|
|
3563
3563
|
jobId,
|
|
3564
|
-
jobToken,
|
|
3565
3564
|
artifactPath,
|
|
3566
3565
|
ref,
|
|
3567
|
-
job,
|
|
3568
3566
|
...options
|
|
3569
3567
|
} = {}) {
|
|
3570
3568
|
let url12;
|
|
3571
3569
|
if (jobId)
|
|
3572
3570
|
url12 = generateDownloadPathForJob(projectId, jobId, artifactPath);
|
|
3573
|
-
else if (job && ref)
|
|
3574
|
-
url12 = generateDownloadPath(projectId, ref,
|
|
3571
|
+
else if (options?.job && ref)
|
|
3572
|
+
url12 = generateDownloadPath(projectId, ref, artifactPath);
|
|
3575
3573
|
else
|
|
3576
3574
|
throw new Error(
|
|
3577
3575
|
"Missing one of the required parameters. See typing documentation for available arguments."
|
|
3578
3576
|
);
|
|
3579
|
-
return RequestHelper.get()(this, url12,
|
|
3580
|
-
searchParams: {
|
|
3581
|
-
jobToken
|
|
3582
|
-
},
|
|
3583
|
-
...options
|
|
3584
|
-
});
|
|
3577
|
+
return RequestHelper.get()(this, url12, options);
|
|
3585
3578
|
}
|
|
3586
3579
|
keep(projectId, jobId, options) {
|
|
3587
3580
|
return RequestHelper.post()(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitbeaker/core",
|
|
3
|
-
"version": "39.
|
|
3
|
+
"version": "39.6.0",
|
|
4
4
|
"description": "Core API implementation of the GitLab API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -55,16 +55,16 @@
|
|
|
55
55
|
"release": "auto shipit"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@gitbeaker/requester-utils": "^39.
|
|
58
|
+
"@gitbeaker/requester-utils": "^39.6.0",
|
|
59
59
|
"qs": "^6.11.2",
|
|
60
60
|
"xcase": "^2.0.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@types/node": "^20.
|
|
63
|
+
"@types/node": "^20.4.0",
|
|
64
64
|
"get-param-names": "github:jdalrymple/get-param-names#1-improve-functionality",
|
|
65
65
|
"tsup": "^7.1.0",
|
|
66
66
|
"tsx": "^3.12.7",
|
|
67
|
-
"typescript": "^5.1.
|
|
67
|
+
"typescript": "^5.1.6"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "873a58b5c2b3849006484928990a01eb6dd457d3"
|
|
70
70
|
}
|