| TodoLists |
🦊
diff --git a/packages/core/package.json b/packages/core/package.json
index 1417af54f..2a524ec9a 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -4,7 +4,7 @@
"description": "Core API implementation of the GitLab API",
"license": "MIT",
"engines": {
- "node": ">=18.20.0"
+ "node": ">=v24.16.0"
},
"repository": {
"type": "git",
diff --git a/packages/core/src/constants.ts b/packages/core/src/constants.ts
index dacacc74e..02bd4f3cc 100644
--- a/packages/core/src/constants.ts
+++ b/packages/core/src/constants.ts
@@ -2,7 +2,9 @@ export enum AccessLevel {
NO_ACCESS = 0,
MINIMAL_ACCESS = 5,
GUEST = 10,
+ PLANNER = 15,
REPORTER = 20,
+ SECURITY_MANAGER = 25,
DEVELOPER = 30,
MAINTAINER = 40,
OWNER = 50,
diff --git a/packages/core/src/resources/AICatalog.ts b/packages/core/src/resources/AICatalog.ts
new file mode 100644
index 000000000..620ba7b3f
--- /dev/null
+++ b/packages/core/src/resources/AICatalog.ts
@@ -0,0 +1,22 @@
+import { BaseResource } from '@gitbeaker/requester-utils';
+
+import type { GitlabAPIResponse, ShowExpanded, Sudo } from '../infrastructure';
+
+import { RequestHelper } from '../infrastructure';
+
+export class AICatalog extends BaseResource {
+ seedExternalAgents(
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.post<{ message: string }>()(
+ this,
+ 'admin/ai_catalog/seed_external_agents',
+ {
+ sudo,
+ showExpanded,
+ },
+ );
+ }
+}
diff --git a/packages/core/src/resources/ApplicationAppearance.ts b/packages/core/src/resources/ApplicationAppearance.ts
index 34d9b203b..220476b61 100644
--- a/packages/core/src/resources/ApplicationAppearance.ts
+++ b/packages/core/src/resources/ApplicationAppearance.ts
@@ -19,6 +19,7 @@ export interface ApplicationAppearanceSchema extends Record {
logo: string;
header_logo: string;
favicon: string;
+ member_guidelines: string;
new_project_guidelines: string;
profile_image_guidelines: string;
header_message: string;
@@ -26,6 +27,7 @@ export interface ApplicationAppearanceSchema extends Record {
message_background_color: string;
message_font_color: string;
email_header_and_footer_enabled: boolean;
+ site_name: string;
}
export class ApplicationAppearance extends BaseResource {
diff --git a/packages/core/src/resources/ApplicationSettings.ts b/packages/core/src/resources/ApplicationSettings.ts
index 29adbd460..db02e6bfa 100644
--- a/packages/core/src/resources/ApplicationSettings.ts
+++ b/packages/core/src/resources/ApplicationSettings.ts
@@ -10,6 +10,12 @@ import type {
import { RequestHelper } from '../infrastructure';
export interface ApplicationSettingsSchema extends Record {
+ // Core settings
+ id?: number;
+ created_at?: string;
+ updated_at?: string;
+
+ // Authentication & security
admin_mode?: boolean;
admin_notification_email?: string;
abuse_notification_email?: string;
@@ -17,25 +23,69 @@ export interface ApplicationSettingsSchema extends Record {
after_sign_up_text?: string;
akismet_api_key?: string;
akismet_enabled?: boolean;
+ allow_account_deletion?: boolean;
allow_group_owners_to_manage_ldap?: boolean;
allow_local_requests_from_hooks_and_services?: boolean;
allow_local_requests_from_system_hooks?: boolean;
allow_local_requests_from_web_hooks_and_services?: boolean;
+ allow_project_creation_for_guest_and_below?: boolean;
allow_runner_registration_token?: boolean;
- archive_builds_in_human_readable?: string;
+ authorized_keys_enabled?: boolean;
+
+ // Asset proxy settings
asset_proxy_enabled?: boolean;
asset_proxy_secret_key?: string;
asset_proxy_url?: string;
asset_proxy_whitelist?: string | string[];
asset_proxy_allowlist?: string | string[];
- authorized_keys_enabled?: boolean;
+
+ // Archive and timeout settings
+ archive_builds_in_human_readable?: string;
+ authn_data_retention_cleanup_enabled?: boolean;
+
+ // Auto DevOps
auto_devops_domain?: string;
auto_devops_enabled?: boolean;
automatic_purchased_storage_allocation?: boolean;
+
+ // Rate limiting and API limits
+ autocomplete_users?: number;
+ autocomplete_users_unauthenticated?: number;
+
+ // Import/Export settings
bulk_import_enabled?: boolean;
+ bulk_import_max_download_file_size?: number;
+ bulk_import_concurrent_pipeline_batch_limit?: number;
+
+ // User management
+ allow_bypass_placeholder_confirmation?: boolean;
+ allow_s3_compatible_storage_for_offline_transfer?: boolean;
can_create_group?: boolean;
check_namespace_plan?: boolean;
+
+ // CI/CD settings
+ ci_delete_pipelines_in_seconds_limit_human_readable?: string;
+ ci_job_live_trace_enabled?: boolean;
+ git_push_pipeline_limit?: number;
+ ci_max_total_yaml_size_bytes?: number;
+ ci_max_includes?: number;
+ ci_partitions_in_seconds_limit?: number;
+
+ // Import job limits
+ concurrent_github_import_jobs_limit?: number;
+ concurrent_bitbucket_import_jobs_limit?: number;
+ concurrent_bitbucket_server_import_jobs_limit?: number;
+ concurrent_relation_batch_export_limit?: number;
+
+ // Email settings
commit_email_hostname?: string;
+ email_additional_text?: string;
+ email_author_in_body?: boolean;
+ email_confirmation_setting?: string;
+ email_restrictions_enabled?: boolean;
+ email_restrictions?: string;
+
+ // Container registry
container_expiration_policies_enable_historic_entries?: boolean;
container_registry_cleanup_tags_service_max_list_size?: number;
container_registry_delete_tags_service_timeout?: number;
@@ -43,11 +93,26 @@ export interface ApplicationSettingsSchema extends Record {
container_registry_expiration_policies_worker_capacity?: number;
container_registry_token_expire_delay?: number;
package_registry_cleanup_policies_worker_capacity?: number;
+
+ // HTTP settings
+ custom_http_clone_url_root?: string;
+
+ // User deactivation
deactivate_dormant_users?: boolean;
deactivate_dormant_users_period?: number;
+
+ // Archive decompression
+ decompress_archive_file_timeout?: number;
+
+ // Default settings
default_artifacts_expire_in?: string;
default_branch_name?: string;
default_branch_protection?: number;
+ default_branch_protection_defaults?: {
+ allowed_to_push?: Array<{ access_level?: number }>;
+ allow_force_push?: boolean;
+ allowed_to_merge?: Array<{ access_level?: number }>;
+ };
default_ci_config_path?: string;
default_group_visibility?: string;
default_preferred_language?: string;
@@ -56,51 +121,91 @@ export interface ApplicationSettingsSchema extends Record {
default_projects_limit?: number;
default_snippet_visibility?: string;
default_syntax_highlighting_theme?: number;
- delayed_project_deletion?: boolean;
- delayed_group_deletion?: boolean;
+ default_dark_syntax_highlighting_theme?: number;
+ default_project_deletion_protection?: boolean;
+
+ // User deletion settings
+ delete_unconfirmed_users?: boolean;
deletion_adjourned_period?: number;
+
+ // Content size limits
+ description_and_note_max_size?: number;
+
+ // Diagrams.net integration
+ diagramsnet_enabled?: boolean;
+ diagramsnet_url?: string;
+
+ // Diff limits
diff_max_patch_bytes?: number;
diff_max_files?: number;
diff_max_lines?: number;
+ diff_max_versions?: number;
+ diff_max_commits?: number;
+
+ // OAuth and access control
disable_admin_oauth_scopes?: boolean;
disable_feed_token?: boolean;
- disable_personal_access_token?: boolean;
+ disable_personal_access_tokens?: boolean;
disabled_oauth_sign_in_sources?: string[];
+ disable_password_authentication_for_users_with_sso_identities?: boolean;
+
+ // DNS and domain settings
dns_rebinding_protection_enabled?: boolean;
domain_denylist_enabled?: boolean;
domain_denylist?: string[];
domain_allowlist?: string[];
+ downstream_pipeline_trigger_limit_per_project_user_sha?: number;
+
+ // Key restrictions
dsa_key_restriction?: number;
ecdsa_key_restriction?: number;
ecdsa_sk_key_restriction?: number;
ed25519_key_restriction?: number;
ed25519_sk_key_restriction?: number;
+
+ // AWS EKS integration
eks_access_key_id?: string;
eks_account_id?: string;
eks_integration_enabled?: boolean;
eks_secret_access_key?: string;
+
+ // Elasticsearch settings
elasticsearch_aws_access_key?: string;
elasticsearch_aws_region?: string;
elasticsearch_aws_secret_access_key?: string;
elasticsearch_aws?: boolean;
+ elasticsearch_client_adapter?: string;
elasticsearch_indexed_field_length_limit?: number;
elasticsearch_indexed_file_size_limit_kb?: number;
elasticsearch_indexing?: boolean;
+ elasticsearch_requeue_workers?: boolean;
elasticsearch_limit_indexing?: boolean;
elasticsearch_max_bulk_concurrency?: number;
+ elasticsearch_max_code_indexing_concurrency?: number;
+ elasticsearch_worker_number_of_shards?: number;
elasticsearch_max_bulk_size_mb?: number;
elasticsearch_namespace_ids?: number[];
elasticsearch_project_ids?: number[];
elasticsearch_search?: boolean;
- elasticsearch_url?: string;
+ elasticsearch_url?: string | string[];
elasticsearch_username?: string;
elasticsearch_password?: string;
- email_additional_text?: string;
- email_author_in_body?: boolean;
- email_confirmation_setting?: string;
+ elasticsearch_prefix?: string;
+ elasticsearch_retry_on_failure?: number;
+ elasticsearch_shards?: number | Record;
+ elasticsearch_replicas?: number | Record;
+ elasticsearch_index_settings?: Array<{
+ alias_name?: string;
+ number_of_shards?: number;
+ number_of_replicas?: number;
+ }>;
+
+ // Protocol and access settings
enabled_git_access_protocol?: string;
enforce_namespace_storage_limit?: boolean;
enforce_terms?: boolean;
+
+ // External authorization
external_auth_client_cert?: string;
external_auth_client_key_pass?: string;
external_auth_client_key?: string;
@@ -108,162 +213,508 @@ export interface ApplicationSettingsSchema extends Record {
external_authorization_service_enabled?: boolean;
external_authorization_service_timeout?: number;
external_authorization_service_url?: string;
+
+ // Pipeline validation
external_pipeline_validation_service_url?: string;
external_pipeline_validation_service_token?: string;
external_pipeline_validation_service_timeout?: number;
+
+ // Static objects storage
+ static_objects_external_storage_url?: string;
+ static_objects_external_storage_auth_token?: string;
+
+ // Security settings
+ failed_login_attempts_unlock_period_in_minutes?: number;
file_template_project_id?: number;
first_day_of_week?: number;
+ floc_enabled?: boolean;
+
+ // IP allowlists
+ globally_allowed_ips?: string;
geo_node_allowed_ips?: string;
geo_status_timeout?: number;
+
+ // Two-factor authentication for Git
git_two_factor_session_expiry?: number;
+
+ // Gitaly timeouts
gitaly_timeout_default?: number;
gitaly_timeout_fast?: number;
gitaly_timeout_medium?: number;
+
+ // Instance identification
gitlab_dedicated_instance?: boolean;
+ gitlab_environment_toolkit_instance?: boolean;
+ gitlab_shell_operation_limit?: number;
+
+ // Grafana integration
grafana_enabled?: boolean;
grafana_url?: string;
gravatar_enabled?: boolean;
group_owners_can_manage_default_branch_protection?: boolean;
+
+ // Storage settings
hashed_storage_enabled?: boolean;
+
+ // Help page settings
help_page_hide_commercial_content?: boolean;
help_page_support_url?: string;
+ help_page_documentation_base_url?: string;
help_page_text?: string;
- help_text?: string;
hide_third_party_offers?: boolean;
home_page_url?: string;
+
+ // Git housekeeping
+ housekeeping_bitmaps_enabled?: boolean;
housekeeping_enabled?: boolean;
+ housekeeping_full_repack_period?: number;
+ housekeeping_gc_period?: number;
+ housekeeping_incremental_repack_period?: number;
housekeeping_optimize_repository_period?: number;
html_emails_enabled?: boolean;
+
+ // Import sources
import_sources?: string[];
- in_product_marketing_emails_enabled?: boolean;
+
+ // CAPTCHA settings
invisible_captcha_enabled?: boolean;
+
+ // Rate limits
issues_create_limit?: number;
+
+ // Jira integration
+ jira_connect_application_key?: string;
+ jira_connect_public_key_storage_enabled?: boolean;
+ jira_connect_proxy_url?: string;
+ jira_connect_additional_audience_url?: string;
+
+ // Artifact settings
keep_latest_artifact?: boolean;
+
+ // Kroki integration
+ kroki_enabled?: boolean;
+ kroki_url?: string;
+ kroki_formats?: Record;
+ kroki_diagram_proxy_enabled?: boolean;
+
+ // Markdown settings
local_markdown_version?: number;
+
+ // SAML membership locking
+ lock_memberships_to_saml?: boolean;
+
+ // Mailgun integration
mailgun_signing_key?: string;
mailgun_events_enabled?: boolean;
+
+ // Maintenance mode
maintenance_mode_message?: string;
maintenance_mode?: boolean;
+
+ // Size limits
max_artifacts_size?: number;
max_attachment_size?: number;
+ max_decompressed_archive_size?: number;
max_export_size?: number;
+ max_github_response_size_limit?: number;
+ max_github_response_json_value_count?: number;
+ max_http_decompressed_size?: number;
+ max_http_response_json_depth?: number;
+ max_http_response_json_structural_chars?: number;
+ max_http_response_xml_structural_chars?: number;
+ max_http_response_csv_structural_chars?: number;
+ max_http_response_size_limit?: number;
max_import_size?: number;
+ max_import_remote_file_size?: number;
+ max_login_attempts?: number;
max_pages_size?: number;
max_personal_access_token_lifetime?: number;
max_ssh_key_lifetime?: number;
max_terraform_state_size_bytes?: number;
+
+ // Performance metrics
metrics_method_call_threshold?: number;
+
+ // Repository download limits
max_number_of_repository_downloads?: number;
max_number_of_repository_downloads_within_time_period?: number;
+
+ // YAML limits
+ max_yaml_depth?: number;
+ max_yaml_size_bytes?: number;
+
+ // Git rate limiting
git_rate_limit_users_allowlist?: string[];
git_rate_limit_users_alertlist?: number[];
auto_ban_user_on_excessive_projects_download?: boolean;
+
+ // Repository mirroring
mirror_available?: boolean;
mirror_capacity_threshold?: number;
mirror_max_capacity?: number;
mirror_max_delay?: number;
+
+ // Package forwarding
maven_package_requests_forwarding?: boolean;
npm_package_requests_forwarding?: boolean;
pypi_package_requests_forwarding?: boolean;
+
+ // Local request allowlists
outbound_local_requests_whitelist?: string[];
+
+ // Package registry settings
+ package_registry_allow_anyone_to_pull_option?: boolean;
+ package_metadata_purl_types?: number[];
+
+ // Pages settings
pages_domain_verification_enabled?: boolean;
+ pages_unique_domain_default_enabled?: boolean;
+
+ // Password authentication
password_authentication_enabled_for_git?: boolean;
password_authentication_enabled_for_web?: boolean;
+
+ // Password requirements
+ minimum_password_length?: number;
password_number_required?: boolean;
password_symbol_required?: boolean;
password_uppercase_required?: boolean;
password_lowercase_required?: boolean;
+
+ // Performance bar
+ performance_bar_allowed_group_id?: string;
performance_bar_allowed_group_path?: string;
+ performance_bar_enabled?: boolean;
+
+ // Access tokens
personal_access_token_prefix?: string;
+
+ // Pipeline limits
pipeline_limit_per_project_user_sha?: number;
+ pipeline_limit_per_user?: number;
+
+ // Gitpod integration
+ gitpod_enabled?: boolean;
+ gitpod_url?: string;
+
+ // Token settings
+ inactive_resource_access_tokens_delete_after_days?: number;
+
+ // PlantUML integration
plantuml_enabled?: boolean;
plantuml_url?: string;
+ plantuml_diagram_proxy_enabled?: boolean;
+
+ // Polling settings
polling_interval_multiplier?: number;
+
+ // Project settings
project_export_enabled?: boolean;
+ project_jobs_api_rate_limit?: number;
projects_api_rate_limit_unauthenticated?: number;
+
+ // Runner API rate limits
+ runner_jobs_request_api_limit?: number;
+ runner_jobs_patch_trace_api_limit?: number;
+ runner_jobs_endpoints_api_limit?: number;
+
+ // User API rate limits
+ users_api_limit_following?: number;
+ users_api_limit_followers?: number;
+ users_api_limit_status?: number;
+ users_api_limit_keys?: number;
+ users_api_limit_key?: number;
+ users_api_limit_gpg_keys?: number;
+ users_api_limit_gpg_key?: number;
+
+ // Virtual registries
+ virtual_registries_endpoints_api_limit?: number;
+
+ // Secrets limits
+ project_secrets_limit?: number;
+ group_secrets_limit?: number;
+
+ // Prometheus settings
prometheus_metrics_enabled?: boolean;
protected_ci_variables?: boolean;
+
+ // Approval settings
+ disable_overriding_approvers_per_merge_request?: boolean;
+ prevent_merge_requests_author_approval?: boolean;
+ prevent_merge_requests_committers_approval?: boolean;
+
+ // Event limits
push_event_activities_limit?: number;
push_event_hooks_limit?: number;
+
+ // Rate limiting response
rate_limiting_response_text?: string;
+
+ // Raw blob limits
raw_blob_request_limit?: number;
+ raw_blob_request_limit_unauthenticated?: number;
+
+ // Search rate limits
search_rate_limit?: number;
search_rate_limit_unauthenticated?: number;
+
+ // reCAPTCHA settings
recaptcha_enabled?: boolean;
+ login_recaptcha_protection_enabled?: boolean;
recaptcha_private_key?: string;
recaptcha_site_key?: string;
+
+ // Receptive cluster agents
+ receptive_cluster_agents_enabled?: boolean;
+
+ // Repository settings
receive_max_input_size?: number;
+ relation_export_batch_size?: number;
+ remember_me_enabled?: boolean;
repository_checks_enabled?: boolean;
repository_size_limit?: number;
repository_storages_weighted?: Record;
- repository_storages?: string[];
+
+ // User signup and approval
require_admin_approval_after_user_signup?: boolean;
+ require_email_verification_on_account_locked?: boolean;
+ require_personal_access_token_expiry?: boolean;
require_two_factor_authentication?: boolean;
+
+ // Resource limits
+ resource_usage_limits?: Record;
restricted_visibility_levels?: string[];
rsa_key_restriction?: number;
+
+ // Session settings
session_expire_delay?: number;
+ session_expire_from_init?: boolean;
+
+ // Security policies
+ security_policy_global_group_approvers_enabled?: boolean;
+ security_approval_policies_limit?: number;
+ scan_execution_policies_action_limit?: number;
+ scan_execution_policies_schedule_limit?: number;
+
+ // Security settings
+ security_txt_content?: string;
+ security_mr_report_cache_lifetime_minutes?: number;
+ security_scan_stale_after_days?: number;
+
+ // Service access tokens
+ service_access_tokens_expiration_enforced?: boolean;
+
+ // Shared runners
shared_runners_enabled?: boolean;
shared_runners_minutes?: number;
shared_runners_text?: string;
+
+ // Runner token expiration
+ runner_token_expiration_interval?: number;
+ group_runner_token_expiration_interval?: number;
+ project_runner_token_expiration_interval?: number;
+
+ // Sidekiq settings
sidekiq_job_limiter_mode?: string;
sidekiq_job_limiter_compression_threshold_bytes?: number;
sidekiq_job_limiter_limit_bytes?: number;
- sign_in_text?: string;
+
+ // Sign-in settings
+ signin_enabled?: string;
+ sign_in_restrictions?: Record;
signup_enabled?: boolean;
+ silent_admin_exports_enabled?: boolean;
+ silent_mode_enabled?: boolean;
+
+ // Slack integration
slack_app_enabled?: boolean;
slack_app_id?: string;
slack_app_secret?: string;
slack_app_signing_secret?: string;
slack_app_verification_token?: string;
+
+ // Content size limits
snippet_size_limit?: number;
+
+ // Snowplow analytics
snowplow_app_id?: string;
snowplow_collector_hostname?: string;
+ snowplow_database_collector_hostname?: string;
snowplow_cookie_domain?: string;
snowplow_enabled?: boolean;
+
+ // Sourcegraph integration
sourcegraph_enabled?: boolean;
sourcegraph_public_only?: boolean;
sourcegraph_url?: string;
+
+ // Spam checking
spam_check_endpoint_enabled?: boolean;
spam_check_endpoint_url?: string;
spam_check_api_key?: string;
+
+ // Pipeline suggestions
suggest_pipeline_enabled?: boolean;
+
+ // External redirect warning
+ enable_artifact_external_redirect_warning_page?: boolean;
+
+ // Terminal settings
terminal_max_session_time?: number;
terms?: string;
+
+ // Throttling settings - Authenticated API
throttle_authenticated_api_enabled?: boolean;
throttle_authenticated_api_period_in_seconds?: number;
throttle_authenticated_api_requests_per_period?: number;
+
+ // Throttling settings - Authenticated Git HTTP
+ throttle_authenticated_git_http_enabled?: boolean;
+ throttle_authenticated_git_http_period_in_seconds?: number;
+ throttle_authenticated_git_http_requests_per_period?: number;
+
+ // Throttling settings - Authenticated Packages API
throttle_authenticated_packages_api_enabled?: boolean;
throttle_authenticated_packages_api_period_in_seconds?: number;
throttle_authenticated_packages_api_requests_per_period?: number;
+
+ // Throttling settings - Authenticated Web
throttle_authenticated_web_enabled?: boolean;
throttle_authenticated_web_period_in_seconds?: number;
throttle_authenticated_web_requests_per_period?: number;
+
+ // Throttling settings - Unauthenticated (deprecated)
+ throttle_unauthenticated_enabled?: boolean;
+ throttle_unauthenticated_period_in_seconds?: number;
+ throttle_unauthenticated_requests_per_period?: number;
+
+ // Throttling settings - Unauthenticated API
throttle_unauthenticated_api_enabled?: boolean;
throttle_unauthenticated_api_period_in_seconds?: number;
throttle_unauthenticated_api_requests_per_period?: number;
+
+ // Throttling settings - Unauthenticated Git HTTP
+ throttle_unauthenticated_git_http_enabled?: boolean;
+ throttle_unauthenticated_git_http_period_in_seconds?: number;
+ throttle_unauthenticated_git_http_requests_per_period?: number;
+
+ // Throttling settings - Unauthenticated Packages API
throttle_unauthenticated_packages_api_enabled?: boolean;
throttle_unauthenticated_packages_api_period_in_seconds?: number;
throttle_unauthenticated_packages_api_requests_per_period?: number;
+
+ // Throttling settings - Unauthenticated Web
throttle_unauthenticated_web_enabled?: boolean;
throttle_unauthenticated_web_period_in_seconds?: number;
throttle_unauthenticated_web_requests_per_period?: number;
+
+ // Time tracking
time_tracking_limit_to_hours?: boolean;
+
+ // Group creation
+ top_level_group_creation_enabled?: boolean;
+
+ // Two-factor authentication
two_factor_grace_period?: number;
+
+ // User deletion settings
+ unconfirmed_users_delete_after_days?: number;
+ updating_name_disabled_for_users?: boolean;
+
+ // IP limiting
unique_ips_limit_enabled?: boolean;
unique_ips_limit_per_user?: number;
unique_ips_limit_time_window?: number;
+
+ // Runner version updates
+ update_runner_versions_enabled?: boolean;
+
+ // Usage data
usage_ping_enabled?: boolean;
+ gitlab_product_usage_data_enabled?: boolean;
+ gitlab_product_usage_data_source?: string;
+ use_clickhouse_for_analytics?: boolean;
+ include_optional_metrics_in_service_ping?: boolean;
+
+ // User settings
user_deactivation_emails_enabled?: boolean;
user_default_external?: boolean;
user_default_internal_regex?: string;
user_defaults_to_private_profile?: boolean;
user_oauth_applications?: boolean;
user_show_add_ssh_key_message?: boolean;
+
+ // Valid runner registrars
+ valid_runner_registrars?: string[];
+
+ // Version checking
version_check_enabled?: boolean;
+
+ // VS Code integration
+ vscode_extension_marketplace?: Record;
+
+ // What's new feature
whats_new_variant?: string;
+
+ // Wiki settings
wiki_page_max_content_bytes?: number;
- jira_connect_application_key?: string;
- jira_connect_proxy_url?: string;
+
+ // Dormant project settings
+ delete_inactive_projects?: boolean;
+ inactive_projects_delete_after_months?: number;
+ inactive_projects_min_size_mb?: number;
+ inactive_projects_send_warning_email_after_months?: number;
+
+ // AsciiDoc settings
+ asciidoc_max_includes?: number;
+
+ // GitLab Duo features
+ duo_custom_agents_enabled?: boolean;
+ duo_custom_flows_enabled?: boolean;
+ duo_features_enabled?: boolean;
+ lock_duo_custom_agents_enabled?: boolean;
+ lock_duo_custom_flows_enabled?: boolean;
+ lock_duo_features_enabled?: boolean;
+
+ // NuGet settings
+ nuget_skip_metadata_url_validation?: boolean;
+
+ // Helm settings
+ helm_max_packages_count?: number;
+
+ // Admin two-factor authentication
+ require_admin_two_factor_authentication?: boolean;
+
+ // Secret push protection
+ secret_push_protection_available?: boolean;
+
+ // Member invitations
+ disable_invite_members?: boolean;
+
+ // PIPL compliance
+ enforce_pipl_compliance?: boolean;
+
+ // Additional notification settings
+ notify_on_unknown_sign_in?: boolean;
+
+ // Iframe rendering
+ iframe_rendering_enabled?: boolean;
+ iframe_rendering_allowlist?: string[];
+
+ // Usage billing settings
+ usage_billing?: Record;
+
+ // Model prompt cache
+ model_prompt_cache_enabled?: boolean;
+ lock_model_prompt_cache_enabled?: boolean;
+
+ // Security scan dependencies
+ dependency_scanning_sbom_scan_api_download_limit?: number;
+ dependency_scanning_sbom_scan_api_upload_limit?: number;
+
+ // Integration allowlists
+ allow_all_integrations?: boolean;
+ allowed_integrations?: string[];
}
export class ApplicationSettings extends BaseResource {
diff --git a/packages/core/src/resources/ApplicationStatistics.ts b/packages/core/src/resources/ApplicationStatistics.ts
index 098126c5b..052543eea 100644
--- a/packages/core/src/resources/ApplicationStatistics.ts
+++ b/packages/core/src/resources/ApplicationStatistics.ts
@@ -5,17 +5,17 @@ import type { GitlabAPIResponse, ShowExpanded, Sudo } from '../infrastructure';
import { RequestHelper } from '../infrastructure';
export interface ApplicationStatisticSchema extends Record {
- forks: string;
- issues: string;
- merge_requests: string;
- notes: string;
- snippets: string;
- ssh_keys: string;
- milestones: string;
- users: string;
- groups: string;
- projects: string;
- active_users: string;
+ forks: number;
+ issues: number;
+ merge_requests: number;
+ notes: number;
+ snippets: number;
+ ssh_keys: number;
+ milestones: number;
+ users: number;
+ groups: number;
+ projects: number;
+ active_users: number;
}
export class ApplicationStatistics extends BaseResource {
diff --git a/packages/core/src/resources/Applications.ts b/packages/core/src/resources/Applications.ts
index ec813ae8e..882709e4f 100644
--- a/packages/core/src/resources/Applications.ts
+++ b/packages/core/src/resources/Applications.ts
@@ -14,9 +14,10 @@ export interface ApplicationSchema extends Record {
id: number;
application_id: string;
application_name: string;
- secret: string;
+ secret?: string;
callback_url: string;
confidential: boolean;
+ scopes: string[];
}
export class Applications extends BaseResource {
@@ -64,4 +65,20 @@ export class Applications extends BaseResource {
showExpanded,
});
}
+
+ renewSecret(
+ applicationId: number,
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.post()(
+ this,
+ `applications/${applicationId}/renew-secret`,
+ {
+ sudo,
+ showExpanded,
+ },
+ );
+ }
}
diff --git a/packages/core/src/resources/Attestations.ts b/packages/core/src/resources/Attestations.ts
new file mode 100644
index 000000000..f8e97fb59
--- /dev/null
+++ b/packages/core/src/resources/Attestations.ts
@@ -0,0 +1,74 @@
+import { BaseResource } from '@gitbeaker/requester-utils';
+
+import type {
+ GitlabAPIResponse,
+ PaginationRequestOptions,
+ PaginationTypes,
+ ShowExpanded,
+ Sudo,
+} from '../infrastructure';
+
+import { RequestHelper, endpoint } from '../infrastructure';
+
+export interface AttestationSchema extends Record {
+ id: number;
+ iid: number;
+ created_at: string;
+ updated_at: string;
+ expire_at: string;
+ project_id: number;
+ build_id: number;
+ status: string;
+ predicate_kind: string;
+ predicate_type: string;
+ subject_digest: string;
+ download_url: string;
+}
+
+export interface SigstoreBundleSchema extends Record {
+ mediaType: string;
+ verificationMaterial: {
+ certificate: {
+ rawBytes: string;
+ };
+ tlogEntries: unknown[];
+ };
+}
+
+export class Attestations extends BaseResource {
+ all(
+ projectId: string | number,
+ subjectDigest: string,
+ options?: PaginationRequestOptions & ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded, maxPages, ...searchParams } = options || {};
+
+ return RequestHelper.get()(
+ this,
+ endpoint`projects/${projectId}/attestations/${subjectDigest}`,
+ {
+ sudo,
+ showExpanded,
+ maxPages,
+ searchParams,
+ },
+ );
+ }
+
+ download(
+ projectId: string | number,
+ attestationIid: number,
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.get()(
+ this,
+ endpoint`projects/${projectId}/attestations/${attestationIid}/download`,
+ {
+ sudo,
+ showExpanded,
+ },
+ );
+ }
+}
diff --git a/packages/core/src/resources/AuditEvents.ts b/packages/core/src/resources/AuditEvents.ts
index 1627de059..d6f9f5c5b 100644
--- a/packages/core/src/resources/AuditEvents.ts
+++ b/packages/core/src/resources/AuditEvents.ts
@@ -17,25 +17,49 @@ export interface AuditEventSchema extends Record {
entity_id: number;
entity_type: string;
details: {
+ // Change-related fields
change?: string;
from?: string;
to?: string;
+ add?: string;
+ remove?: string;
+
+ // Message fields
custom_message?: string;
- author_name: string;
- author_email: string;
- target_id: string;
- target_type: string;
- target_details: string;
- ip_address: string;
- entity_path: string;
+
+ // Author information
+ author_name?: string;
+ author_email?: string;
+ author_class?: string;
+
+ // Target information
+ target_id?: string | number;
+ target_type?: string;
+ target_details?: string;
+
+ // Network and location
+ ip_address?: string | null;
+ entity_path?: string;
+
+ // Additional dynamic fields that can appear in details
+ [key: string]: unknown;
};
created_at: string;
+
+ // Optional top-level fields that may appear in responses
+ ip_address?: string;
+ author_name?: string;
+ entity_path?: string;
+ target_details?: string;
+ target_type?: string;
+ target_id?: number;
+ event_type?: string;
}
export interface AllAuditEventOptions {
createdAfter?: string;
createdBefore?: string;
- entityType?: string;
+ entityType?: 'User' | 'Group' | 'Project' | 'Gitlab::Audit::InstanceScope' | string;
entityId?: number;
}
diff --git a/packages/core/src/resources/Avatar.ts b/packages/core/src/resources/Avatar.ts
index 756527723..cd2255515 100644
--- a/packages/core/src/resources/Avatar.ts
+++ b/packages/core/src/resources/Avatar.ts
@@ -11,14 +11,14 @@ export interface AvatarSchema extends Record {
export class Avatar extends BaseResource {
show(
email: string,
- options?: ShowExpanded & Sudo,
+ options?: { size?: number } & ShowExpanded & Sudo,
): Promise> {
- const { sudo, showExpanded } = options || {};
+ const { sudo, showExpanded, ...searchParams } = options || {};
return RequestHelper.get()(this, 'avatar', {
sudo,
showExpanded,
- searchParams: { email },
+ searchParams: { email, ...searchParams },
});
}
}
diff --git a/packages/core/src/resources/Branches.ts b/packages/core/src/resources/Branches.ts
index fdf97c889..0711b158b 100644
--- a/packages/core/src/resources/Branches.ts
+++ b/packages/core/src/resources/Branches.ts
@@ -2,7 +2,6 @@ import { BaseResource } from '@gitbeaker/requester-utils';
import type {
GitlabAPIResponse,
- MappedOmit,
PaginationRequestOptions,
PaginationTypes,
ShowExpanded,
@@ -21,7 +20,10 @@ export interface BranchSchema extends Record {
developers_can_merge: boolean;
can_push: boolean;
web_url: string;
- commit: MappedOmit;
+ commit: {
+ trailers?: Record;
+ extended_trailers?: Record;
+ } & CommitSchema;
}
export class Branches extends BaseResource {
diff --git a/packages/core/src/resources/BroadcastMessages.ts b/packages/core/src/resources/BroadcastMessages.ts
index 3304ebb33..b1050ef0c 100644
--- a/packages/core/src/resources/BroadcastMessages.ts
+++ b/packages/core/src/resources/BroadcastMessages.ts
@@ -10,23 +10,33 @@ import type {
} from '../infrastructure';
import { AccessLevel } from '../constants';
-import { RequestHelper } from '../infrastructure';
+import { RequestHelper, endpoint } from '../infrastructure';
export interface BroadcastMessageSchema extends Record {
message: string;
starts_at: string;
ends_at: string;
- color: string;
font: string;
id: number;
active: boolean;
- target_path: string;
- target_access_levels: Exclude<
+ target_path?: string;
+ target_access_levels?: Exclude<
AccessLevel,
AccessLevel.MINIMAL_ACCESS | AccessLevel.NO_ACCESS | AccessLevel.ADMIN
>[];
- broadcast_type: string;
- dismissible: boolean;
+ broadcast_type?: string;
+ dismissable?: boolean;
+ theme?:
+ | 'indigo'
+ | 'light-indigo'
+ | 'blue'
+ | 'light-blue'
+ | 'green'
+ | 'light-green'
+ | 'red'
+ | 'light-red'
+ | 'dark'
+ | 'light';
}
type BroadcastMessageOptions = Partial>;
@@ -46,14 +56,15 @@ export class BroadcastMessages extends BaseResource(
- options?: BroadcastMessageOptions & ShowExpanded & Sudo,
+ message: string,
+ options?: Omit & ShowExpanded & Sudo,
): Promise> {
const { sudo, showExpanded, ...body } = options || {};
return RequestHelper.post()(this, 'broadcast_messages', {
sudo,
showExpanded,
- body,
+ body: { message, ...body },
});
}
@@ -65,7 +76,7 @@ export class BroadcastMessages extends BaseResource()(
this,
- `broadcast_messages/${broadcastMessageId}`,
+ endpoint`broadcast_messages/${broadcastMessageId}`,
{
sudo,
showExpanded,
@@ -80,7 +91,7 @@ export class BroadcastMessages extends BaseResource> {
const { sudo, showExpanded } = options || {};
- return RequestHelper.del()(this, `broadcast_messages/${broadcastMessageId}`, {
+ return RequestHelper.del()(this, endpoint`broadcast_messages/${broadcastMessageId}`, {
sudo,
showExpanded,
});
@@ -94,7 +105,7 @@ export class BroadcastMessages extends BaseResource()(
this,
- `broadcast_messages/${broadcastMessageId}`,
+ endpoint`broadcast_messages/${broadcastMessageId}`,
{ sudo, showExpanded },
);
}
diff --git a/packages/core/src/resources/BulkImports.ts b/packages/core/src/resources/BulkImports.ts
new file mode 100644
index 000000000..e36e85ccd
--- /dev/null
+++ b/packages/core/src/resources/BulkImports.ts
@@ -0,0 +1,200 @@
+import { BaseResource } from '@gitbeaker/requester-utils';
+
+import type {
+ GitlabAPIResponse,
+ PaginationRequestOptions,
+ PaginationRequestSearchParams,
+ PaginationType,
+ PaginationTypes,
+ ShowExpanded,
+ Sudo,
+ Camelize,
+} from '../infrastructure';
+
+import { RequestHelper, endpoint, getPrefixedUrl } from '../infrastructure';
+
+export interface BulkImportConfigurationSchema extends Record {
+ url: string;
+ access_token: string;
+}
+
+export interface BulkImportEntitySchema extends Record {
+ source_type: 'group_entity' | 'project_entity';
+ source_full_path: string;
+ destination_slug: string;
+ destination_namespace: string;
+ destination_name?: string;
+ migrate_memberships?: boolean;
+ migrate_projects?: boolean;
+}
+
+export interface BulkImportFailureSchema extends Record {
+ relation: string;
+ step: string;
+ exception_message: string;
+ exception_class: string;
+ correlation_id_value: string;
+ created_at: string;
+ pipeline_class: string;
+ pipeline_step: string;
+ source_url?: string;
+ source_title?: string;
+}
+
+export interface BulkImportStatsSchema extends Record {
+ [key: string]: {
+ source: number;
+ fetched: number;
+ imported: number;
+ };
+}
+
+export interface BulkImportSchema extends Record {
+ id: number;
+ status: 'created' | 'started' | 'finished' | 'failed' | 'canceled';
+ source_type: string;
+ source_url?: string;
+ created_at: string;
+ updated_at: string;
+ has_failures: boolean;
+}
+
+export interface BulkImportEntityFullSchema extends Record {
+ id: number;
+ bulk_import_id: number;
+ status: 'created' | 'started' | 'finished' | 'failed';
+ entity_type: 'group' | 'project';
+ source_full_path: string;
+ destination_full_path: string;
+ destination_name: string;
+ destination_slug: string;
+ destination_namespace: string;
+ parent_id?: number | null;
+ namespace_id?: number | null;
+ project_id?: number | null;
+ created_at: string;
+ updated_at: string;
+ failures: BulkImportFailureSchema[];
+ migrate_projects: boolean;
+ migrate_memberships: boolean;
+ has_failures: boolean;
+ stats: BulkImportStatsSchema;
+}
+
+export type BulkImportStatus = 'created' | 'started' | 'finished' | 'failed';
+
+export class BulkImports extends BaseResource {
+ create(
+ configuration: Camelize,
+ entities: Camelize[],
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.post()(this, 'bulk_imports', {
+ sudo,
+ showExpanded,
+ body: {
+ configuration,
+ entities,
+ },
+ });
+ }
+
+ all(
+ options?: { status?: BulkImportStatus } & PaginationRequestOptions & ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded, maxPages, ...searchParams } = options || {};
+
+ return RequestHelper.get()(this, 'bulk_imports', {
+ sudo,
+ showExpanded,
+ maxPages,
+ searchParams: searchParams as PaginationRequestSearchParams & PaginationType ,
+ });
+ }
+
+ allEntities(
+ options?: {
+ status?: BulkImportStatus;
+ bulkImportId?: string | number;
+ } & PaginationRequestOptions &
+ ShowExpanded &
+ Sudo,
+ ): Promise> {
+ const { sudo, showExpanded, maxPages, bulkImportId, ...searchParams } = options || {};
+
+ const url = getPrefixedUrl('entities', {
+ bulk_imports: bulkImportId || true,
+ });
+
+ return RequestHelper.get()(this, url, {
+ sudo,
+ showExpanded,
+ maxPages,
+ searchParams: searchParams as PaginationRequestSearchParams & PaginationType ,
+ });
+ }
+
+ show(
+ bulkImportId: number,
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.get()(this, endpoint`bulk_imports/${bulkImportId}`, {
+ sudo,
+ showExpanded,
+ });
+ }
+
+ showEntity(
+ bulkImportId: number,
+ entityId: number,
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.get()(
+ this,
+ endpoint`bulk_imports/${bulkImportId}/entities/${entityId}`,
+ {
+ sudo,
+ showExpanded,
+ },
+ );
+ }
+
+ showEntityFailures(
+ bulkImportId: number,
+ entityId: number,
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.get()(
+ this,
+ endpoint`bulk_imports/${bulkImportId}/entities/${entityId}/failures`,
+ {
+ sudo,
+ showExpanded,
+ },
+ );
+ }
+
+ cancel(
+ bulkImportId: number,
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.post()(
+ this,
+ endpoint`bulk_imports/${bulkImportId}/cancel`,
+ {
+ sudo,
+ showExpanded,
+ },
+ );
+ }
+}
diff --git a/packages/core/src/resources/Agents.ts b/packages/core/src/resources/ClusterAgents.ts
similarity index 62%
rename from packages/core/src/resources/Agents.ts
rename to packages/core/src/resources/ClusterAgents.ts
index e32652918..fcd3635d2 100644
--- a/packages/core/src/resources/Agents.ts
+++ b/packages/core/src/resources/ClusterAgents.ts
@@ -16,15 +16,26 @@ export interface ClusterAgentSchema extends Record {
export interface ClusterAgentTokenSchema extends Record {
id: number;
name: string;
- description: string;
+ description: string | null;
agent_id: number;
status: string;
token?: string;
created_at: string;
- created_by_user_id: number;
+ created_by_user_id: string;
+ last_used_at?: string | null;
+}
+
+export interface ClusterAgentUrlConfigurationSchema extends Record {
+ id: number;
+ agent_id: number;
+ url: string;
+ public_key?: string;
+ client_cert?: string;
+ ca_cert?: string;
+ tls_host?: string;
}
-export class Agents extends BaseResource {
+export class ClusterAgents extends BaseResource {
all(
projectId: string | number,
options?: ShowExpanded & Sudo,
@@ -41,6 +52,56 @@ export class Agents extends BaseResource {
);
}
+ show(
+ projectId: string | number,
+ agentId: number,
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.get()(
+ this,
+ endpoint`projects/${projectId}/cluster_agents/${agentId}`,
+ {
+ sudo,
+ showExpanded,
+ },
+ );
+ }
+
+ register(
+ projectId: string | number,
+ name: string,
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.post()(
+ this,
+ endpoint`projects/${projectId}/cluster_agents`,
+ {
+ sudo,
+ showExpanded,
+ body: {
+ name,
+ },
+ },
+ );
+ }
+
+ unregister(
+ projectId: string | number,
+ agentId: number,
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.del()(this, endpoint`projects/${projectId}/cluster_agents/${agentId}`, {
+ sudo,
+ showExpanded,
+ });
+ }
+
allTokens(
projectId: string | number,
agentId: number,
@@ -58,6 +119,24 @@ export class Agents extends BaseResource {
);
}
+ showToken(
+ projectId: string | number,
+ agentId: number,
+ tokenId: number,
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.get()(
+ this,
+ endpoint`projects/${projectId}/cluster_agents/${agentId}/tokens/${tokenId}`,
+ {
+ sudo,
+ showExpanded,
+ },
+ );
+ }
+
createToken(
projectId: string | number,
agentId: number,
@@ -77,16 +156,17 @@ export class Agents extends BaseResource {
);
}
- show(
+ removeToken(
projectId: string | number,
agentId: number,
+ tokenId: number,
options?: ShowExpanded & Sudo,
- ): Promise> {
+ ): Promise> {
const { sudo, showExpanded } = options || {};
- return RequestHelper.get()(
+ return RequestHelper.del()(
this,
- endpoint`projects/${projectId}/cluster_agents/${agentId}`,
+ endpoint`projects/${projectId}/cluster_agents/${agentId}/tokens/${tokenId}`,
{
sudo,
showExpanded,
@@ -94,17 +174,16 @@ export class Agents extends BaseResource {
);
}
- showToken(
+ allUrlConfigurations(
projectId: string | number,
agentId: number,
- tokenId: number,
options?: ShowExpanded & Sudo,
- ): Promise> {
+ ): Promise> {
const { sudo, showExpanded } = options || {};
- return RequestHelper.get()(
+ return RequestHelper.get()(
this,
- endpoint`projects/${projectId}/cluster_agents/${agentId}/tokens/${tokenId}`,
+ endpoint`projects/${projectId}/cluster_agents/${agentId}/url_configurations`,
{
sudo,
showExpanded,
@@ -112,54 +191,64 @@ export class Agents extends BaseResource {
);
}
- register(
+ showUrlConfiguration(
projectId: string | number,
- name: string,
+ agentId: number,
+ urlConfigId: number,
options?: ShowExpanded & Sudo,
- ): Promise> {
+ ): Promise> {
const { sudo, showExpanded } = options || {};
- return RequestHelper.post()(
+ return RequestHelper.get()(
this,
- endpoint`projects/${projectId}/cluster_agents`,
+ endpoint`projects/${projectId}/cluster_agents/${agentId}/url_configurations/${urlConfigId}`,
{
sudo,
showExpanded,
- body: {
- name,
- },
},
);
}
- removeToken(
+ createUrlConfiguration(
projectId: string | number,
agentId: number,
- tokenId: number,
- options?: ShowExpanded & Sudo,
- ): Promise> {
- const { sudo, showExpanded } = options || {};
+ url: string,
+ options?: {
+ clientCert?: string;
+ clientKey?: string;
+ caCert?: string;
+ tlsHost?: string;
+ } & ShowExpanded &
+ Sudo,
+ ): Promise> {
+ const { sudo, showExpanded, ...body } = options || {};
- return RequestHelper.del()(
+ return RequestHelper.post()(
this,
- endpoint`projects/${projectId}/cluster_agents/${agentId}/tokens/${tokenId}`,
+ endpoint`projects/${projectId}/cluster_agents/${agentId}/url_configurations`,
{
sudo,
showExpanded,
+ body: { ...body, url },
},
);
}
- unregister(
+ deleteUrlConfiguration(
projectId: string | number,
agentId: number,
+ urlConfigId: number,
options?: ShowExpanded & Sudo,
): Promise> {
const { sudo, showExpanded } = options || {};
- return RequestHelper.del()(this, endpoint`projects/${projectId}/cluster_agents/${agentId}`, {
- sudo,
- showExpanded,
- });
+ return RequestHelper.del()(
+ this,
+ endpoint`projects/${projectId}/cluster_agents/${agentId}/url_configurations/${urlConfigId}`,
+ {
+ sudo,
+ showExpanded,
+ },
+ );
}
}
diff --git a/packages/core/src/resources/CodeSuggestions.ts b/packages/core/src/resources/CodeSuggestions.ts
index 8d0157d49..8c81e2fe2 100644
--- a/packages/core/src/resources/CodeSuggestions.ts
+++ b/packages/core/src/resources/CodeSuggestions.ts
@@ -1,18 +1,41 @@
import { BaseResource } from '@gitbeaker/requester-utils';
-import type {
- BaseRequestBodyRecordOptions,
- GitlabAPIResponse,
- ShowExpanded,
- Sudo,
-} from '../infrastructure';
+import type { GitlabAPIResponse, ShowExpanded, Sudo } from '../infrastructure';
import { RequestHelper } from '../infrastructure';
-export interface CodeSuggestionSchema extends Record {
- access_token: string;
- expires_in: number;
- created_at: number;
+export interface CodeSuggestionDirectAccessSchema extends Record {
+ base_url: string;
+ token: string;
+ expires_at: number;
+ headers: {
+ 'X-Gitlab-Instance-Id': string;
+ 'X-Gitlab-Realm': string;
+ 'X-Gitlab-Global-User-Id': string;
+ 'X-Gitlab-Host-Name': string;
+ };
+}
+
+export interface CodeSuggestionConnectionDetailsSchema extends Record {
+ instance_id: string;
+ instance_version: string;
+ realm: string;
+ global_user_id: string;
+ host_name: string;
+ feature_enablement_type: string;
+ saas_duo_pro_namespace_ids?: string;
+}
+
+export interface CodeSuggestionCurrentFileSchema {
+ file_name: string;
+ content_above_cursor: string;
+ content_below_cursor?: string;
+}
+
+export interface CodeSuggestionContextSchema {
+ type: 'file' | 'snippet';
+ name: string;
+ content: string;
}
export interface CodeCompletionSchema extends Record {
@@ -31,26 +54,76 @@ export interface CodeCompletionSchema extends Record {
}
export class CodeSuggestions extends BaseResource {
- createAccessToken(
- options?: ShowExpanded & Sudo,
- ): Promise> {
- const { sudo, showExpanded } = options || {};
+ generateCompletion(
+ currentFile: {
+ fileName: string;
+ contentAboveCursor: string;
+ contentBelowCursor?: string;
+ },
+ options?: {
+ intent?: 'completion' | 'generation';
+ stream?: boolean;
+ projectPath?: string;
+ generationType?: 'comment' | 'empty_function' | 'small_file';
+ context?: CodeSuggestionContextSchema[];
+ userInstruction?: string;
+ } & ShowExpanded &
+ Sudo,
+ ): Promise> {
+ const { sudo, showExpanded, ...body } = options || {};
- return RequestHelper.post()(this, 'code_suggestions/tokens', {
+ return RequestHelper.post()(this, 'code_suggestions/completions', {
sudo,
showExpanded,
+ body: {
+ ...body,
+ currentFile,
+ },
});
}
- generateCompletion(
- options?: BaseRequestBodyRecordOptions & ShowExpanded & Sudo,
- ): Promise> {
- const { sudo, showExpanded, ...body } = options || {};
+ checkEnabled(
+ projectPath: string,
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
- return RequestHelper.post()(this, 'code_suggestions/completions', {
+ return RequestHelper.post()(this, 'code_suggestions/enabled', {
sudo,
showExpanded,
- body,
+ body: {
+ projectPath,
+ },
});
}
+
+ showDirectAccessDetails(
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.post()(
+ this,
+ 'code_suggestions/direct_access',
+ {
+ sudo,
+ showExpanded,
+ },
+ );
+ }
+
+ showConnectionDetails(
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.post()(
+ this,
+ 'code_suggestions/connection_details',
+ {
+ sudo,
+ showExpanded,
+ },
+ );
+ }
}
diff --git a/packages/core/src/resources/Commits.ts b/packages/core/src/resources/Commits.ts
index 69cd96d8f..50c0922a2 100644
--- a/packages/core/src/resources/Commits.ts
+++ b/packages/core/src/resources/Commits.ts
@@ -58,6 +58,8 @@ export interface CommitSchema extends CondensedCommitSchema {
committer_email?: string;
committed_date?: string;
web_url: string;
+ trailers?: Record;
+ extended_trailers?: Record;
}
export interface ExpandedCommitSchema extends CommitSchema {
@@ -102,6 +104,20 @@ export interface X509SignatureSchema extends Record {
commit_source: string;
}
+export interface SSHSignatureSchema extends Record {
+ signature_type: 'SSH';
+ verification_status: 'verified' | 'unverified';
+ key: {
+ id: number;
+ title: string;
+ created_at: string;
+ expires_at?: string;
+ key: string;
+ usage_type: string;
+ };
+ commit_source: string;
+}
+
export interface MissingSignatureSchema extends Record {
message: string;
}
@@ -109,6 +125,7 @@ export interface MissingSignatureSchema extends Record {
export type CommitSignatureSchema =
| GPGSignatureSchema
| X509SignatureSchema
+ | SSHSignatureSchema
| MissingSignatureSchema;
export interface CondensedCommitCommentSchema extends Record {
@@ -131,6 +148,8 @@ export interface CommitDiffSchema extends Record {
new_file: boolean;
renamed_file: boolean;
deleted_file: boolean;
+ collapsed?: boolean;
+ too_large?: boolean;
}
export interface CommitStatusSchema extends Record {
@@ -179,6 +198,7 @@ export type AllCommitsOptions = {
firstParent?: boolean;
order?: string;
trailers?: boolean;
+ follow?: boolean;
};
export type CreateCommitOptions = {
@@ -190,6 +210,7 @@ export type CreateCommitOptions = {
authorName?: string;
stats?: boolean;
force?: boolean;
+ allowEmpty?: boolean;
};
export type EditPipelineStatusOptions = {
@@ -322,7 +343,15 @@ export class Commits extends BaseResource {
allStatuses(
projectId: string | number,
sha: string,
- options?: { ref?: string; stage?: string; name?: string; all?: boolean } & ShowExpanded &
+ options?: {
+ ref?: string;
+ stage?: string;
+ name?: string;
+ all?: boolean;
+ pipelineId?: number;
+ orderBy?: string;
+ sort?: string;
+ } & ShowExpanded &
Sudo,
): Promise> {
const { sudo, showExpanded, ...searchParams } = options || {};
diff --git a/packages/core/src/resources/CompliancePolicySettings.ts b/packages/core/src/resources/CompliancePolicySettings.ts
new file mode 100644
index 000000000..65f991f18
--- /dev/null
+++ b/packages/core/src/resources/CompliancePolicySettings.ts
@@ -0,0 +1,45 @@
+import { BaseResource } from '@gitbeaker/requester-utils';
+
+import type { GitlabAPIResponse, ShowExpanded, Sudo } from '../infrastructure';
+
+import { RequestHelper } from '../infrastructure';
+
+export interface CompliancePolicySettingsSchema extends Record {
+ csp_namespace_id: number | null;
+}
+
+export class CompliancePolicySettings extends BaseResource {
+ show(
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.get()(
+ this,
+ 'admin/security/compliance_policy_settings',
+ {
+ sudo,
+ showExpanded,
+ },
+ );
+ }
+
+ edit(
+ cspNamespaceId: number | null,
+ options?: ShowExpanded & Sudo,
+ ): Promise> {
+ const { sudo, showExpanded } = options || {};
+
+ return RequestHelper.put()(
+ this,
+ 'admin/security/compliance_policy_settings',
+ {
+ sudo,
+ showExpanded,
+ body: {
+ cspNamespaceId,
+ },
+ },
+ );
+ }
+}
diff --git a/packages/core/src/resources/ConanV2.ts b/packages/core/src/resources/ConanV2.ts
new file mode 100644
index 000000000..9db0d28c6
--- /dev/null
+++ b/packages/core/src/resources/ConanV2.ts
@@ -0,0 +1,377 @@
+import { BaseResource } from '@gitbeaker/requester-utils';
+
+import type { GitlabAPIResponse, ShowExpanded } from '../infrastructure';
+
+import { RequestHelper, createFormData, endpoint } from '../infrastructure';
+
+export interface ConanV2RevisionSchema extends Record {
+ revision: string;
+ time: string;
+}
+
+export interface ConanV2RevisionListSchema extends Record {
+ reference: string;
+ revisions: ConanV2RevisionSchema[];
+}
+
+export interface ConanV2PackageReferenceMetadataSchema extends Record {
+ settings: Record;
+ options: Record;
+ requires: Record;
+ recipe_hash: string;
+}
+
+export interface ConanV2FilesListSchema extends Record {
+ files: Record |