diff --git a/AI.md b/AI.md new file mode 100644 index 00000000000..cf208121faa --- /dev/null +++ b/AI.md @@ -0,0 +1,43 @@ +# AI-Assisted Development Context: PHP ArgoCD API Client + +This document provides context on the development process of this PHP client for the ArgoCD API, which was significantly assisted by an AI agent named Jules. + +## Project Goal + +The primary goal of this project was to refactor an existing PHP client library originally designed for the GitHub API (KnpLabs/php-github-api) and adapt it to become a fully functional client for the ArgoCD REST API. + +## Development Process + +The development process involved a collaborative effort between a human developer and the AI agent, Jules. Key aspects of this process include: + +* **Initial Request:** The human developer provided an issue statement outlining the need to fork the GitHub library, study its structure, and then refactor it to implement ArgoCD's OpenAPI specification (`https://raw.githubusercontent.com/argoproj/argo-cd/master/assets/swagger.json`). +* **Codebase Analysis:** Jules explored the existing GitHub client's codebase using tools to list files and read their content to understand its architecture and patterns. +* **OpenAPI Analysis:** Jules fetched and analyzed the ArgoCD OpenAPI specification to understand its endpoints, data structures, and service organization. +* **Planning:** Based on the analysis, Jules created a detailed, multi-step plan to execute the refactoring. This plan was reviewed and approved by the human developer. +* **Iterative Implementation:** Jules executed the plan step-by-step by delegating specific, actionable tasks to a "Worker" agent. These tasks included: + * Creating new directory structures. + * Initializing `composer.json` and managing dependencies. + * Adapting core client classes (`Client.php`, `HttpClient/Builder.php`, `Api/AbstractApi.php`). + * Implementing exception handling. + * Generating PHP model classes based on OpenAPI definitions. + * Implementing API service classes (e.g., `SessionService.php`, `AccountService.php`) with methods corresponding to ArgoCD API operations. +* **Feedback Incorporation:** The human developer provided feedback at various stages (e.g., on directory structure, PHP version constraints), and Jules updated the plan and execution accordingly. + +## Current State + +As of the last AI interaction, the project has achieved the following: + +* **Core Infrastructure:** A foundational client structure is in place, including the main `Client` class, HTTP client builder, abstract API class, and basic exception handling. +* **Authentication:** The client can authenticate against an ArgoCD instance by exchanging username/password for a bearer token (via `SessionService`) or by using a pre-existing token. +* **Initial API Services:** + * `SessionService`: Implemented for login, logout, and user info. + * `AccountService`: Implemented for managing accounts and tokens. +* **Data Models:** PHP model classes corresponding to the implemented services' request/response structures have been created. +* **Project Configuration:** `composer.json` has been set up, and the project directory has been structured. The ArgoCD OpenAPI specification has been added to `reference/argocd_swagger.json`. + +Further development will involve implementing the remaining ArgoCD API services (like the extensive `ApplicationService`), adding comprehensive unit tests, and refining documentation. + +## Acknowledgements + +* The initial structure and patterns were derived from the excellent [KnpLabs/php-github-api](https://github.com/KnpLabs/php-github-api) library. +* The target API is [ArgoCD](https://argo-cd.readthedocs.io/en/stable/), and its OpenAPI specification was used as the blueprint for API implementation. diff --git a/README.md b/README.md index de79112b4f8..ef48968b6a0 100644 --- a/README.md +++ b/README.md @@ -1,81 +1,45 @@ -# PHP GitHub API +# PHP ArgoCD API Client -![Build Status](https://github.com/KnpLabs/php-github-api/actions/workflows/ci.yml/badge.svg) -[![StyleCI](https://styleci.io/repos/3948501/shield?style=flat)](https://styleci.io/repos/3948501) -[![Latest Stable Version](https://poser.pugx.org/knplabs/github-api/v/stable)](https://packagist.org/packages/knplabs/github-api) -[![Total Downloads](https://poser.pugx.org/knplabs/github-api/downloads)](https://packagist.org/packages/knplabs/github-api) -[![Monthly Downloads](https://poser.pugx.org/knplabs/github-api/d/monthly)](https://packagist.org/packages/knplabs/github-api) -[![Daily Downloads](https://poser.pugx.org/knplabs/github-api/d/daily)](https://packagist.org/packages/knplabs/github-api) +[![Build Status](https://github.com/your-vendor/argocd-php-client/actions/workflows/ci.yml/badge.svg)](https://github.com/your-vendor/argocd-php-client/actions/workflows/ci.yml) +[![Latest Stable Version](https://poser.pugx.org/your-vendor/argocd-php-client/v/stable)](https://packagist.org/packages/your-vendor/argocd-php-client) +[![Total Downloads](https://poser.pugx.org/your-vendor/argocd-php-client/downloads)](https://packagist.org/packages/your-vendor/argocd-php-client) -A simple Object Oriented wrapper for GitHub API, written with PHP. +A PHP client for interacting with the ArgoCD API. This library provides an object-oriented interface to the ArgoCD REST API. -Uses [GitHub API v3](http://developer.github.com/v3/) & supports [GitHub API v4](http://developer.github.com/v4). The object API (v3) is very similar to the RESTful API. +This client's structure is based on the [KnpLabs/php-github-api](https://github.com/KnpLabs/php-github-api) library. + +For more context on the AI-assisted development process of this library, please see [AI.md](AI.md). ## Features -* Light and fast thanks to lazy loading of API classes -* Extensively tested and documented +* Light and fast thanks to lazy loading of API classes. +* Object-oriented interface to the ArgoCD API. ## Requirements -* PHP >= 7.2 -* A [PSR-17 implementation](https://packagist.org/providers/psr/http-factory-implementation) -* A [PSR-18 implementation](https://packagist.org/providers/psr/http-client-implementation) +* PHP ^8.3 +* A [PSR-17 implementation](https://packagist.org/providers/psr/http-factory-implementation) (e.g., `nyholm/psr7`) +* A [PSR-18 implementation](https://packagist.org/providers/psr/http-client-implementation) (e.g., `symfony/http-client` or `guzzlehttp/guzzle`) ## Quick install Via [Composer](https://getcomposer.org). -This command will get you up and running quickly with a Guzzle HTTP client. - ```bash -composer require knplabs/github-api:^3.0 guzzlehttp/guzzle:^7.0.1 http-interop/http-factory-guzzle:^1.0 +composer require your-vendor/argocd-php-client ``` -## Advanced install - -We are decoupled from any HTTP messaging client with help by [HTTPlug](https://httplug.io). - -### Using a different http client +You will also need to install implementations for PSR-17 (HTTP Factories) and PSR-18 (HTTP Client), for example: ```bash -composer require knplabs/github-api:^3.0 symfony/http-client nyholm/psr7 -``` - -To set up the Github client with this HTTP client - -```php -use Github\Client; -use Symfony\Component\HttpClient\HttplugClient; - -$client = Client::createWithHttpClient(new HttplugClient()); +composer require symfony/http-client nyholm/psr7 ``` - -Read more about [using different clients in our docs](doc/customize.md). - -## Framework integrations - -### Laravel - -To integrate this library in laravel [Graham Campbell](https://github.com/GrahamCampbell) created [graham-campbell/github](https://github.com/GrahamCampbell/Laravel-GitHub). See the [installation instructions](https://github.com/GrahamCampbell/Laravel-GitHub#installation) to get started in laravel. - -## Basic usage of `php-github-api` client - -```php -api('user')->repositories('ornicar'); +Or for Guzzle: +```bash +composer require guzzlehttp/guzzle php-http/guzzle7-adapter ``` -From `$client` object, you have access to all available GitHub api endpoints. - -## Cache usage - -This example uses the PSR6 cache pool [redis-adapter](https://github.com/php-cache/redis-adapter). See http://www.php-cache.com/ for alternatives. +## Basic Usage ```php connect('127.0.0.1', 6379); -// Create a PSR6 cache pool -$pool = new RedisCachePool($client); - -$client = new \Github\Client(); -$client->addCache($pool); - -// Do some request - -// Stop using cache -$client->removeCache(); +// 1. Instantiate the client with your ArgoCD server URL +// Ensure your ArgoCD server URL is correct and accessible. +// The client will automatically append /api/v1 if it's not present. +$client = new ArgoCD\Client('https://your-argocd-server.example.com'); + +// 2. Authenticate +// Option A: Using username and password (fetches a token via SessionService) +try { + $client->authenticate('your-username', 'your-password'); + echo "Successfully authenticated using username/password. Token: " . substr($client->getToken() ?? 'N/A', 0, 10) . "...\n"; +} catch (ArgoCD\Exception\RuntimeException $e) { + die('Authentication failed: ' . $e->getMessage() . "\n"); +} + +// Option B: Using a pre-existing token +// try { +// $client->authenticate('your-argocd-api-token'); +// echo "Successfully authenticated using pre-existing token.\n"; +// } catch (ArgoCD\Exception\InvalidArgumentException $e) { +// die('Authentication failed with token: ' . $e->getMessage() . "\n"); +// } + + +// 3. Access API services +try { + // Example: Get user info + $userInfo = $client->sessionService()->getUserInfo(); + echo "Logged in as: " . $userInfo->getUsername() . "\n"; + echo "Logged in status: " . ($userInfo->isLoggedIn() ? 'true' : 'false') . "\n"; + + // Example: List accounts (requires admin privileges typically) + // Note: Ensure the authenticated user has permissions for these operations. + // try { + // $accountsList = $client->accountService()->listAccounts(); + // echo "Listing accounts:\n"; + // if (count($accountsList->getItems()) > 0) { + // foreach ($accountsList->getItems() as $account) { + // echo " - Account Name: " . $account->getName() . ", Enabled: " . ($account->isEnabled() ? 'Yes' : 'No') . "\n"; + // } + // } else { + // echo "No accounts found or not enough permissions.\n"; + // } + // } catch (ArgoCD\Exception\RuntimeException $e) { + // echo "Could not list accounts: " . $e->getMessage() . "\n"; + // } + + +} catch (ArgoCD\Exception\RuntimeException $e) { + die('API Error: ' . $e->getMessage() . "\n"); +} + +// Example: Delete the session (logout) +// try { +// $client->sessionService()->delete(); +// echo "Successfully logged out.\n"; +// } catch (ArgoCD\Exception\RuntimeException $e) { +// die('Logout failed: ' . $e->getMessage() . "\n"); +// } + +?> ``` -Using cache, the client will get cached responses if resources haven't changed since last time, -**without** reaching the `X-Rate-Limit` [imposed by github](http://developer.github.com/v3/#rate-limiting). - - ## Documentation -See the [`doc` directory](doc/) for more detailed documentation. +Further documentation will be available as the library matures. For now, refer to the source code and the official [ArgoCD API documentation](https://cd.apps.argoproj.io/swagger-ui) (or the `reference/argocd_swagger.json` file in this repository). ## License -`php-github-api` is licensed under the MIT License - see the LICENSE file for details +This library is licensed under the MIT License - see the LICENSE file for details. ## Maintainers -Please read [this post](https://knplabs.com/en/blog/news-for-our-foss-projects-maintenance) first. - -This library is maintained by the following people (alphabetically sorted) : -- [@acrobat](https://github.com/acrobat) -- [@Nyholm](https://github.com/Nyholm) +This library is currently maintained by: +- [Your Name](https://github.com/your-vendor) (or your GitHub username) ## Contributors -- Thanks to [Thibault Duplessis aka. ornicar](https://github.com/ornicar) for his first version of this library. -- Thanks to [Joseph Bielawski aka. stloyd](https://github.com/stloyd) for his contributions and support. -- Thanks to [noloh](https://github.com/noloh) for his contribution on the Object API. -- Thanks to [bshaffer](https://github.com/bshaffer) for his contribution on the Repo API. -- Thanks to [Rolf van de Krol](https://github.com/rolfvandekrol) for his countless contributions. -- Thanks to [Nicolas Pastorino](https://github.com/jeanvoye) for his contribution on the Pull Request API. -- Thanks to [Edoardo Rivello](https://github.com/erivello) for his contribution on the Gists API. -- Thanks to [Miguel Piedrafita](https://github.com/m1guelpf) for his contribution to the v4 & Apps API. -- Thanks to [Emre DEGER](https://github.com/lexor) for his contribution to the Actions API. - -Thanks to GitHub for the high quality API and documentation. +* This project was significantly bootstrapped with the assistance of an AI agent. See [AI.md](AI.md) for more details. +* Structure and patterns inspired by [KnpLabs/php-github-api](https://github.com/KnpLabs/php-github-api). +* Thanks to the ArgoCD team for their excellent API and documentation. +``` diff --git a/composer.json b/composer.json index da450bc019d..5b0c2cf9128 100644 --- a/composer.json +++ b/composer.json @@ -1,65 +1,33 @@ { - "name": "knplabs/github-api", + "name": "your-vendor/argocd-php-client", + "description": "A PHP client for the ArgoCD API", "type": "library", - "description": "GitHub API v3 client", - "homepage": "https://github.com/KnpLabs/php-github-api", - "keywords": ["github", "gh", "api", "gist"], "license": "MIT", "authors": [ { - "name": "KnpLabs Team", - "homepage": "http://knplabs.com" - }, - { - "name": "Thibault Duplessis", - "email": "thibault.duplessis@gmail.com", - "homepage": "http://ornicar.github.com" + "name": "Your Name", + "email": "your.email@example.com" } ], "require": { - "php": "^7.2.5 || ^8.0", - "ext-json": "*", - "php-http/cache-plugin": "^1.7.1|^2.0", + "php": "^8.3", "php-http/client-common": "^2.3", "php-http/discovery": "^1.12", - "php-http/httplug": "^2.2", - "php-http/multipart-stream-builder": "^1.1.2", - "psr/cache": "^1.0|^2.0|^3.0", "psr/http-client-implementation": "^1.0", "psr/http-factory-implementation": "^1.0", - "psr/http-message": "^1.0|^2.0", - "symfony/polyfill-php80": "^1.17", - "symfony/deprecation-contracts": "^2.2|^3.0" + "psr/http-message": "^1.0 || ^2.0" }, "require-dev": { - "symfony/cache": "^5.1.8", - "guzzlehttp/psr7": "^2.7", - "http-interop/http-factory-guzzle": "^1.0", - "guzzlehttp/guzzle": "^7.2", - "php-http/mock-client": "^1.4.1", - "phpstan/phpstan": "^0.12.57", - "phpstan/extension-installer": "^1.0.5", - "phpstan/phpstan-deprecation-rules": "^0.12.5", - "phpunit/phpunit": "^8.5 || ^9.4", - "symfony/phpunit-bridge": "^5.2" + "phpunit/phpunit": "^9.5" }, "autoload": { - "psr-4": { "Github\\": "lib/Github/" } - }, - "autoload-dev": { - "psr-4": { "Github\\Tests\\": "test/Github/Tests/"} - }, - "extra": { - "branch-alias": { - "dev-2.x": "2.20.x-dev", - "dev-master": "3.16-dev" + "psr-4": { + "ArgoCD\\": "src/ArgoCD/" } }, - "config": { - "allow-plugins": { - "phpstan/extension-installer": true, - "composer/package-versions-deprecated": true, - "php-http/discovery": true + "autoload-dev": { + "psr-4": { + "ArgoCD\\Tests\\": "tests/" } } } diff --git a/reference/argocd_swagger.json b/reference/argocd_swagger.json new file mode 100644 index 00000000000..e0cbba6447a --- /dev/null +++ b/reference/argocd_swagger.json @@ -0,0 +1,8094 @@ +{ + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "swagger": "2.0", + "info": { + "description": "Description of all APIs", + "title": "Consolidate Services", + "version": "version not set" + }, + "paths": { + "/api/v1/account": { + "get": { + "tags": [ + "AccountService" + ], + "summary": "ListAccounts returns the list of accounts", + "operationId": "AccountService_ListAccounts", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/accountAccountsList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/account/can-i/{resource}/{action}/{subresource}": { + "get": { + "tags": [ + "AccountService" + ], + "summary": "CanI checks if the current account has permission to perform an action", + "operationId": "AccountService_CanI", + "parameters": [ + { + "type": "string", + "name": "resource", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "action", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "subresource", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/accountCanIResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/account/password": { + "put": { + "tags": [ + "AccountService" + ], + "summary": "UpdatePassword updates an account's password to a new value", + "operationId": "AccountService_UpdatePassword", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/accountUpdatePasswordRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/accountUpdatePasswordResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/account/{name}": { + "get": { + "tags": [ + "AccountService" + ], + "summary": "GetAccount returns an account", + "operationId": "AccountService_GetAccount", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/accountAccount" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/account/{name}/token": { + "post": { + "tags": [ + "AccountService" + ], + "summary": "CreateToken creates a token", + "operationId": "AccountService_CreateToken", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/accountCreateTokenRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/accountCreateTokenResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/account/{name}/token/{id}": { + "delete": { + "tags": [ + "AccountService" + ], + "summary": "DeleteToken deletes a token", + "operationId": "AccountService_DeleteToken", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/accountEmptyResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "List returns list of applications", + "operationId": "ApplicationService_List", + "parameters": [ + { + "type": "string", + "description": "the application's name.", + "name": "name", + "in": "query" + }, + { + "type": "string", + "description": "forces application reconciliation if set to 'hard'.", + "name": "refresh", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "the project names to restrict returned list applications.", + "name": "projects", + "in": "query" + }, + { + "type": "string", + "description": "when specified with a watch call, shows changes that occur after that particular version of a resource.", + "name": "resourceVersion", + "in": "query" + }, + { + "type": "string", + "description": "the selector to restrict returned list to applications only with matched labels.", + "name": "selector", + "in": "query" + }, + { + "type": "string", + "description": "the repoURL to restrict returned list applications.", + "name": "repo", + "in": "query" + }, + { + "type": "string", + "description": "the application's namespace.", + "name": "appNamespace", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "the project names to restrict returned list applications (legacy name for backwards-compatibility).", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1ApplicationList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "post": { + "tags": [ + "ApplicationService" + ], + "summary": "Create creates an application", + "operationId": "ApplicationService_Create", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1Application" + } + }, + { + "type": "boolean", + "name": "upsert", + "in": "query" + }, + { + "type": "boolean", + "name": "validate", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Application" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/manifestsWithFiles": { + "post": { + "tags": [ + "ApplicationService" + ], + "summary": "GetManifestsWithFiles returns application manifests using provided files to generate them", + "operationId": "ApplicationService_GetManifestsWithFiles", + "parameters": [ + { + "description": " (streaming inputs)", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/applicationApplicationManifestQueryWithFilesWrapper" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/repositoryManifestResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{application.metadata.name}": { + "put": { + "tags": [ + "ApplicationService" + ], + "summary": "Update updates an application", + "operationId": "ApplicationService_Update", + "parameters": [ + { + "type": "string", + "description": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names\n+optional", + "name": "application.metadata.name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1Application" + } + }, + { + "type": "boolean", + "name": "validate", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Application" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{applicationName}/managed-resources": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "ManagedResources returns list of managed resources", + "operationId": "ApplicationService_ManagedResources", + "parameters": [ + { + "type": "string", + "name": "applicationName", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "name": "name", + "in": "query" + }, + { + "type": "string", + "name": "version", + "in": "query" + }, + { + "type": "string", + "name": "group", + "in": "query" + }, + { + "type": "string", + "name": "kind", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationManagedResourcesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{applicationName}/resource-tree": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "ResourceTree returns resource tree", + "operationId": "ApplicationService_ResourceTree", + "parameters": [ + { + "type": "string", + "name": "applicationName", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "name": "name", + "in": "query" + }, + { + "type": "string", + "name": "version", + "in": "query" + }, + { + "type": "string", + "name": "group", + "in": "query" + }, + { + "type": "string", + "name": "kind", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1ApplicationTree" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "Get returns an application by name", + "operationId": "ApplicationService_Get", + "parameters": [ + { + "type": "string", + "description": "the application's name", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "forces application reconciliation if set to 'hard'.", + "name": "refresh", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "the project names to restrict returned list applications.", + "name": "projects", + "in": "query" + }, + { + "type": "string", + "description": "when specified with a watch call, shows changes that occur after that particular version of a resource.", + "name": "resourceVersion", + "in": "query" + }, + { + "type": "string", + "description": "the selector to restrict returned list to applications only with matched labels.", + "name": "selector", + "in": "query" + }, + { + "type": "string", + "description": "the repoURL to restrict returned list applications.", + "name": "repo", + "in": "query" + }, + { + "type": "string", + "description": "the application's namespace.", + "name": "appNamespace", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "the project names to restrict returned list applications (legacy name for backwards-compatibility).", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Application" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "delete": { + "tags": [ + "ApplicationService" + ], + "summary": "Delete deletes an application", + "operationId": "ApplicationService_Delete", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "boolean", + "name": "cascade", + "in": "query" + }, + { + "type": "string", + "name": "propagationPolicy", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationApplicationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "patch": { + "tags": [ + "ApplicationService" + ], + "summary": "Patch patch an application", + "operationId": "ApplicationService_Patch", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/applicationApplicationPatchRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Application" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/events": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "ListResourceEvents returns a list of event resources", + "operationId": "ApplicationService_ListResourceEvents", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "resourceNamespace", + "in": "query" + }, + { + "type": "string", + "name": "resourceName", + "in": "query" + }, + { + "type": "string", + "name": "resourceUID", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1EventList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/links": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "ListLinks returns the list of all application deep links", + "operationId": "ApplicationService_ListLinks", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationLinksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/logs": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "PodLogs returns stream of log entries for the specified pod. Pod", + "operationId": "ApplicationService_PodLogs2", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "name": "podName", + "in": "query" + }, + { + "type": "string", + "name": "container", + "in": "query" + }, + { + "type": "string", + "format": "int64", + "name": "sinceSeconds", + "in": "query" + }, + { + "type": "string", + "format": "int64", + "description": "Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive.", + "name": "sinceTime.seconds", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "description": "Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context.", + "name": "sinceTime.nanos", + "in": "query" + }, + { + "type": "string", + "format": "int64", + "name": "tailLines", + "in": "query" + }, + { + "type": "boolean", + "name": "follow", + "in": "query" + }, + { + "type": "string", + "name": "untilTime", + "in": "query" + }, + { + "type": "string", + "name": "filter", + "in": "query" + }, + { + "type": "string", + "name": "kind", + "in": "query" + }, + { + "type": "string", + "name": "group", + "in": "query" + }, + { + "type": "string", + "name": "resourceName", + "in": "query" + }, + { + "type": "boolean", + "name": "previous", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + }, + { + "type": "boolean", + "name": "matchCase", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "title": "Stream result of applicationLogEntry", + "properties": { + "error": { + "$ref": "#/definitions/runtimeStreamError" + }, + "result": { + "$ref": "#/definitions/applicationLogEntry" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/manifests": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "GetManifests returns application manifests", + "operationId": "ApplicationService_GetManifests", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "revision", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "int64" + }, + "collectionFormat": "multi", + "name": "sourcePositions", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "name": "revisions", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/repositoryManifestResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/operation": { + "delete": { + "tags": [ + "ApplicationService" + ], + "summary": "TerminateOperation terminates the currently running operation", + "operationId": "ApplicationService_TerminateOperation", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationOperationTerminateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/pods/{podName}/logs": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "PodLogs returns stream of log entries for the specified pod. Pod", + "operationId": "ApplicationService_PodLogs", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "podName", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "name": "container", + "in": "query" + }, + { + "type": "string", + "format": "int64", + "name": "sinceSeconds", + "in": "query" + }, + { + "type": "string", + "format": "int64", + "description": "Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive.", + "name": "sinceTime.seconds", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "description": "Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context.", + "name": "sinceTime.nanos", + "in": "query" + }, + { + "type": "string", + "format": "int64", + "name": "tailLines", + "in": "query" + }, + { + "type": "boolean", + "name": "follow", + "in": "query" + }, + { + "type": "string", + "name": "untilTime", + "in": "query" + }, + { + "type": "string", + "name": "filter", + "in": "query" + }, + { + "type": "string", + "name": "kind", + "in": "query" + }, + { + "type": "string", + "name": "group", + "in": "query" + }, + { + "type": "string", + "name": "resourceName", + "in": "query" + }, + { + "type": "boolean", + "name": "previous", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + }, + { + "type": "boolean", + "name": "matchCase", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "title": "Stream result of applicationLogEntry", + "properties": { + "error": { + "$ref": "#/definitions/runtimeStreamError" + }, + "result": { + "$ref": "#/definitions/applicationLogEntry" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/resource": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "GetResource returns single application resource", + "operationId": "ApplicationService_GetResource", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "name": "resourceName", + "in": "query" + }, + { + "type": "string", + "name": "version", + "in": "query" + }, + { + "type": "string", + "name": "group", + "in": "query" + }, + { + "type": "string", + "name": "kind", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationApplicationResourceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "post": { + "tags": [ + "ApplicationService" + ], + "summary": "PatchResource patch single application resource", + "operationId": "ApplicationService_PatchResource", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + }, + { + "type": "string", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "name": "resourceName", + "in": "query" + }, + { + "type": "string", + "name": "version", + "in": "query" + }, + { + "type": "string", + "name": "group", + "in": "query" + }, + { + "type": "string", + "name": "kind", + "in": "query" + }, + { + "type": "string", + "name": "patchType", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationApplicationResourceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "delete": { + "tags": [ + "ApplicationService" + ], + "summary": "DeleteResource deletes a single application resource", + "operationId": "ApplicationService_DeleteResource", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "name": "resourceName", + "in": "query" + }, + { + "type": "string", + "name": "version", + "in": "query" + }, + { + "type": "string", + "name": "group", + "in": "query" + }, + { + "type": "string", + "name": "kind", + "in": "query" + }, + { + "type": "boolean", + "name": "force", + "in": "query" + }, + { + "type": "boolean", + "name": "orphan", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationApplicationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/resource/actions": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "ListResourceActions returns list of resource actions", + "operationId": "ApplicationService_ListResourceActions", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "name": "resourceName", + "in": "query" + }, + { + "type": "string", + "name": "version", + "in": "query" + }, + { + "type": "string", + "name": "group", + "in": "query" + }, + { + "type": "string", + "name": "kind", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationResourceActionsListResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "post": { + "tags": [ + "ApplicationService" + ], + "summary": "RunResourceAction run resource action", + "operationId": "ApplicationService_RunResourceAction", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/applicationResourceActionRunRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationApplicationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/resource/links": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "ListResourceLinks returns the list of all resource deep links", + "operationId": "ApplicationService_ListResourceLinks", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "name": "resourceName", + "in": "query" + }, + { + "type": "string", + "name": "version", + "in": "query" + }, + { + "type": "string", + "name": "group", + "in": "query" + }, + { + "type": "string", + "name": "kind", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationLinksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/revisions/{revision}/chartdetails": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "Get the chart metadata (description, maintainers, home) for a specific revision of the application", + "operationId": "ApplicationService_RevisionChartDetails", + "parameters": [ + { + "type": "string", + "description": "the application's name", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the revision of the app", + "name": "revision", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the application's namespace.", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "description": "source index (for multi source apps).", + "name": "sourceIndex", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "description": "versionId from historical data (for multi source apps).", + "name": "versionId", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1ChartDetails" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/revisions/{revision}/metadata": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "Get the meta-data (author, date, tags, message) for a specific revision of the application", + "operationId": "ApplicationService_RevisionMetadata", + "parameters": [ + { + "type": "string", + "description": "the application's name", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the revision of the app", + "name": "revision", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the application's namespace.", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "description": "source index (for multi source apps).", + "name": "sourceIndex", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "description": "versionId from historical data (for multi source apps).", + "name": "versionId", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1RevisionMetadata" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/rollback": { + "post": { + "tags": [ + "ApplicationService" + ], + "summary": "Rollback syncs an application to its target state", + "operationId": "ApplicationService_Rollback", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/applicationApplicationRollbackRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Application" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/spec": { + "put": { + "tags": [ + "ApplicationService" + ], + "summary": "UpdateSpec updates an application spec", + "operationId": "ApplicationService_UpdateSpec", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1ApplicationSpec" + } + }, + { + "type": "boolean", + "name": "validate", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1ApplicationSpec" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/sync": { + "post": { + "tags": [ + "ApplicationService" + ], + "summary": "Sync syncs an application to its target state", + "operationId": "ApplicationService_Sync", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/applicationApplicationSyncRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Application" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applications/{name}/syncwindows": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "Get returns sync windows of the application", + "operationId": "ApplicationService_GetApplicationSyncWindows", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationApplicationSyncWindowsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applicationsets": { + "get": { + "tags": [ + "ApplicationSetService" + ], + "summary": "List returns list of applicationset", + "operationId": "ApplicationSetService_List", + "parameters": [ + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "the project names to restrict returned list applicationsets.", + "name": "projects", + "in": "query" + }, + { + "type": "string", + "description": "the selector to restrict returned list to applications only with matched labels.", + "name": "selector", + "in": "query" + }, + { + "type": "string", + "description": "The application set namespace. Default empty is argocd control plane namespace.", + "name": "appsetNamespace", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1ApplicationSetList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "post": { + "tags": [ + "ApplicationSetService" + ], + "summary": "Create creates an applicationset", + "operationId": "ApplicationSetService_Create", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1ApplicationSet" + } + }, + { + "type": "boolean", + "name": "upsert", + "in": "query" + }, + { + "type": "boolean", + "name": "dryRun", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1ApplicationSet" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applicationsets/generate": { + "post": { + "tags": [ + "ApplicationSetService" + ], + "summary": "Generate generates", + "operationId": "ApplicationSetService_Generate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/applicationsetApplicationSetGenerateRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationsetApplicationSetGenerateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applicationsets/{name}": { + "get": { + "tags": [ + "ApplicationSetService" + ], + "summary": "Get returns an applicationset by name", + "operationId": "ApplicationSetService_Get", + "parameters": [ + { + "type": "string", + "description": "the applicationsets's name", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The application set namespace. Default empty is argocd control plane namespace.", + "name": "appsetNamespace", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1ApplicationSet" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "delete": { + "tags": [ + "ApplicationSetService" + ], + "summary": "Delete deletes an application set", + "operationId": "ApplicationSetService_Delete", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The application set namespace. Default empty is argocd control plane namespace.", + "name": "appsetNamespace", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationsetApplicationSetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/applicationsets/{name}/resource-tree": { + "get": { + "tags": [ + "ApplicationSetService" + ], + "summary": "ResourceTree returns resource tree", + "operationId": "ApplicationSetService_ResourceTree", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The application set namespace. Default empty is argocd control plane namespace.", + "name": "appsetNamespace", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1ApplicationSetTree" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/certificates": { + "get": { + "tags": [ + "CertificateService" + ], + "summary": "List all available repository certificates", + "operationId": "CertificateService_ListCertificates", + "parameters": [ + { + "type": "string", + "description": "A file-glob pattern (not regular expression) the host name has to match.", + "name": "hostNamePattern", + "in": "query" + }, + { + "type": "string", + "description": "The type of the certificate to match (ssh or https).", + "name": "certType", + "in": "query" + }, + { + "type": "string", + "description": "The sub type of the certificate to match (protocol dependent, usually only used for ssh certs).", + "name": "certSubType", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1RepositoryCertificateList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "post": { + "tags": [ + "CertificateService" + ], + "summary": "Creates repository certificates on the server", + "operationId": "CertificateService_CreateCertificate", + "parameters": [ + { + "description": "List of certificates to be created", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1RepositoryCertificateList" + } + }, + { + "type": "boolean", + "description": "Whether to upsert already existing certificates.", + "name": "upsert", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1RepositoryCertificateList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "delete": { + "tags": [ + "CertificateService" + ], + "summary": "Delete the certificates that match the RepositoryCertificateQuery", + "operationId": "CertificateService_DeleteCertificate", + "parameters": [ + { + "type": "string", + "description": "A file-glob pattern (not regular expression) the host name has to match.", + "name": "hostNamePattern", + "in": "query" + }, + { + "type": "string", + "description": "The type of the certificate to match (ssh or https).", + "name": "certType", + "in": "query" + }, + { + "type": "string", + "description": "The sub type of the certificate to match (protocol dependent, usually only used for ssh certs).", + "name": "certSubType", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1RepositoryCertificateList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/clusters": { + "get": { + "tags": [ + "ClusterService" + ], + "summary": "List returns list of clusters", + "operationId": "ClusterService_List", + "parameters": [ + { + "type": "string", + "name": "server", + "in": "query" + }, + { + "type": "string", + "name": "name", + "in": "query" + }, + { + "type": "string", + "description": "type is the type of the specified cluster identifier ( \"server\" - default, \"name\" ).", + "name": "id.type", + "in": "query" + }, + { + "type": "string", + "description": "value holds the cluster server URL or cluster name.", + "name": "id.value", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1ClusterList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "post": { + "tags": [ + "ClusterService" + ], + "summary": "Create creates a cluster", + "operationId": "ClusterService_Create", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1Cluster" + } + }, + { + "type": "boolean", + "name": "upsert", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Cluster" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/clusters/{id.value}": { + "get": { + "tags": [ + "ClusterService" + ], + "summary": "Get returns a cluster by server address", + "operationId": "ClusterService_Get", + "parameters": [ + { + "type": "string", + "description": "value holds the cluster server URL or cluster name", + "name": "id.value", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "server", + "in": "query" + }, + { + "type": "string", + "name": "name", + "in": "query" + }, + { + "type": "string", + "description": "type is the type of the specified cluster identifier ( \"server\" - default, \"name\" ).", + "name": "id.type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Cluster" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "put": { + "tags": [ + "ClusterService" + ], + "summary": "Update updates a cluster", + "operationId": "ClusterService_Update", + "parameters": [ + { + "type": "string", + "description": "value holds the cluster server URL or cluster name", + "name": "id.value", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1Cluster" + } + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "name": "updatedFields", + "in": "query" + }, + { + "type": "string", + "description": "type is the type of the specified cluster identifier ( \"server\" - default, \"name\" ).", + "name": "id.type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Cluster" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "delete": { + "tags": [ + "ClusterService" + ], + "summary": "Delete deletes a cluster", + "operationId": "ClusterService_Delete", + "parameters": [ + { + "type": "string", + "description": "value holds the cluster server URL or cluster name", + "name": "id.value", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "server", + "in": "query" + }, + { + "type": "string", + "name": "name", + "in": "query" + }, + { + "type": "string", + "description": "type is the type of the specified cluster identifier ( \"server\" - default, \"name\" ).", + "name": "id.type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/clusterClusterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/clusters/{id.value}/invalidate-cache": { + "post": { + "tags": [ + "ClusterService" + ], + "summary": "InvalidateCache invalidates cluster cache", + "operationId": "ClusterService_InvalidateCache", + "parameters": [ + { + "type": "string", + "description": "value holds the cluster server URL or cluster name", + "name": "id.value", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Cluster" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/clusters/{id.value}/rotate-auth": { + "post": { + "tags": [ + "ClusterService" + ], + "summary": "RotateAuth rotates the bearer token used for a cluster", + "operationId": "ClusterService_RotateAuth", + "parameters": [ + { + "type": "string", + "description": "value holds the cluster server URL or cluster name", + "name": "id.value", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/clusterClusterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/gpgkeys": { + "get": { + "tags": [ + "GPGKeyService" + ], + "summary": "List all available repository certificates", + "operationId": "GPGKeyService_List", + "parameters": [ + { + "type": "string", + "description": "The GPG key ID to query for.", + "name": "keyID", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1GnuPGPublicKeyList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "post": { + "tags": [ + "GPGKeyService" + ], + "summary": "Create one or more GPG public keys in the server's configuration", + "operationId": "GPGKeyService_Create", + "parameters": [ + { + "description": "Raw key data of the GPG key(s) to create", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1GnuPGPublicKey" + } + }, + { + "type": "boolean", + "description": "Whether to upsert already existing public keys.", + "name": "upsert", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/gpgkeyGnuPGPublicKeyCreateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "delete": { + "tags": [ + "GPGKeyService" + ], + "summary": "Delete specified GPG public key from the server's configuration", + "operationId": "GPGKeyService_Delete", + "parameters": [ + { + "type": "string", + "description": "The GPG key ID to query for.", + "name": "keyID", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/gpgkeyGnuPGPublicKeyResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/gpgkeys/{keyID}": { + "get": { + "tags": [ + "GPGKeyService" + ], + "summary": "Get information about specified GPG public key from the server", + "operationId": "GPGKeyService_Get", + "parameters": [ + { + "type": "string", + "description": "The GPG key ID to query for", + "name": "keyID", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1GnuPGPublicKey" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/notifications/services": { + "get": { + "tags": [ + "NotificationService" + ], + "summary": "List returns list of services", + "operationId": "NotificationService_ListServices", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/notificationServiceList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/notifications/templates": { + "get": { + "tags": [ + "NotificationService" + ], + "summary": "List returns list of templates", + "operationId": "NotificationService_ListTemplates", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/notificationTemplateList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/notifications/triggers": { + "get": { + "tags": [ + "NotificationService" + ], + "summary": "List returns list of triggers", + "operationId": "NotificationService_ListTriggers", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/notificationTriggerList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/projects": { + "get": { + "tags": [ + "ProjectService" + ], + "summary": "List returns list of projects", + "operationId": "ProjectService_List", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1AppProjectList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "post": { + "tags": [ + "ProjectService" + ], + "summary": "Create a new project", + "operationId": "ProjectService_Create", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/projectProjectCreateRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1AppProject" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/projects/{name}": { + "get": { + "tags": [ + "ProjectService" + ], + "summary": "Get returns a project by name", + "operationId": "ProjectService_Get", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1AppProject" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "delete": { + "tags": [ + "ProjectService" + ], + "summary": "Delete deletes a project", + "operationId": "ProjectService_Delete", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/projectEmptyResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/projects/{name}/detailed": { + "get": { + "tags": [ + "ProjectService" + ], + "summary": "GetDetailedProject returns a project that include project, global project and scoped resources by name", + "operationId": "ProjectService_GetDetailedProject", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/projectDetailedProjectsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/projects/{name}/events": { + "get": { + "tags": [ + "ProjectService" + ], + "summary": "ListEvents returns a list of project events", + "operationId": "ProjectService_ListEvents", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1EventList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/projects/{name}/globalprojects": { + "get": { + "tags": [ + "ProjectService" + ], + "summary": "Get returns a virtual project by name", + "operationId": "ProjectService_GetGlobalProjects", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/projectGlobalProjectsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/projects/{name}/links": { + "get": { + "tags": [ + "ProjectService" + ], + "summary": "ListLinks returns all deep links for the particular project", + "operationId": "ProjectService_ListLinks", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationLinksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/projects/{name}/syncwindows": { + "get": { + "tags": [ + "ProjectService" + ], + "summary": "GetSchedulesState returns true if there are any active sync syncWindows", + "operationId": "ProjectService_GetSyncWindowsState", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/projectSyncWindowsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/projects/{project.metadata.name}": { + "put": { + "tags": [ + "ProjectService" + ], + "summary": "Update updates a project", + "operationId": "ProjectService_Update", + "parameters": [ + { + "type": "string", + "description": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names\n+optional", + "name": "project.metadata.name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/projectProjectUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1AppProject" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/projects/{project}/roles/{role}/token": { + "post": { + "tags": [ + "ProjectService" + ], + "summary": "Create a new project token", + "operationId": "ProjectService_CreateToken", + "parameters": [ + { + "type": "string", + "name": "project", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "role", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/projectProjectTokenCreateRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/projectProjectTokenResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/projects/{project}/roles/{role}/token/{iat}": { + "delete": { + "tags": [ + "ProjectService" + ], + "summary": "Delete a new project token", + "operationId": "ProjectService_DeleteToken", + "parameters": [ + { + "type": "string", + "name": "project", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "role", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "int64", + "name": "iat", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/projectEmptyResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/repocreds": { + "get": { + "tags": [ + "RepoCredsService" + ], + "summary": "ListRepositoryCredentials gets a list of all configured repository credential sets", + "operationId": "RepoCredsService_ListRepositoryCredentials", + "parameters": [ + { + "type": "string", + "description": "Repo URL for query.", + "name": "url", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1RepoCredsList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "post": { + "tags": [ + "RepoCredsService" + ], + "summary": "CreateRepositoryCredentials creates a new repository credential set", + "operationId": "RepoCredsService_CreateRepositoryCredentials", + "parameters": [ + { + "description": "Repository definition", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1RepoCreds" + } + }, + { + "type": "boolean", + "description": "Whether to create in upsert mode.", + "name": "upsert", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1RepoCreds" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/repocreds/{creds.url}": { + "put": { + "tags": [ + "RepoCredsService" + ], + "summary": "UpdateRepositoryCredentials updates a repository credential set", + "operationId": "RepoCredsService_UpdateRepositoryCredentials", + "parameters": [ + { + "type": "string", + "description": "URL is the URL to which these credentials match", + "name": "creds.url", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1RepoCreds" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1RepoCreds" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/repocreds/{url}": { + "delete": { + "tags": [ + "RepoCredsService" + ], + "summary": "DeleteRepositoryCredentials deletes a repository credential set from the configuration", + "operationId": "RepoCredsService_DeleteRepositoryCredentials", + "parameters": [ + { + "type": "string", + "name": "url", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/repocredsRepoCredsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/repositories": { + "get": { + "tags": [ + "RepositoryService" + ], + "summary": "ListRepositories gets a list of all configured repositories", + "operationId": "RepositoryService_ListRepositories", + "parameters": [ + { + "type": "string", + "description": "Repo URL for query.", + "name": "repo", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether to force a cache refresh on repo's connection state.", + "name": "forceRefresh", + "in": "query" + }, + { + "type": "string", + "description": "App project for query.", + "name": "appProject", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1RepositoryList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "post": { + "tags": [ + "RepositoryService" + ], + "summary": "CreateRepository creates a new repository configuration", + "operationId": "RepositoryService_CreateRepository", + "parameters": [ + { + "description": "Repository definition", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1Repository" + } + }, + { + "type": "boolean", + "description": "Whether to create in upsert mode.", + "name": "upsert", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether to operate on credential set instead of repository.", + "name": "credsOnly", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Repository" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/repositories/{repo.repo}": { + "put": { + "tags": [ + "RepositoryService" + ], + "summary": "UpdateRepository updates a repository configuration", + "operationId": "RepositoryService_UpdateRepository", + "parameters": [ + { + "type": "string", + "description": "Repo contains the URL to the remote repository", + "name": "repo.repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1Repository" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Repository" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/repositories/{repo}": { + "get": { + "tags": [ + "RepositoryService" + ], + "summary": "Get returns a repository or its credentials", + "operationId": "RepositoryService_Get", + "parameters": [ + { + "type": "string", + "description": "Repo URL for query", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "Whether to force a cache refresh on repo's connection state.", + "name": "forceRefresh", + "in": "query" + }, + { + "type": "string", + "description": "App project for query.", + "name": "appProject", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Repository" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "delete": { + "tags": [ + "RepositoryService" + ], + "summary": "DeleteRepository deletes a repository from the configuration", + "operationId": "RepositoryService_DeleteRepository", + "parameters": [ + { + "type": "string", + "description": "Repo URL for query", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "Whether to force a cache refresh on repo's connection state.", + "name": "forceRefresh", + "in": "query" + }, + { + "type": "string", + "description": "App project for query.", + "name": "appProject", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/repositoryRepoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/repositories/{repo}/apps": { + "get": { + "tags": [ + "RepositoryService" + ], + "summary": "ListApps returns list of apps in the repo", + "operationId": "RepositoryService_ListApps", + "parameters": [ + { + "type": "string", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "revision", + "in": "query" + }, + { + "type": "string", + "name": "appName", + "in": "query" + }, + { + "type": "string", + "name": "appProject", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/repositoryRepoAppsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/repositories/{repo}/helmcharts": { + "get": { + "tags": [ + "RepositoryService" + ], + "summary": "GetHelmCharts returns list of helm charts in the specified repository", + "operationId": "RepositoryService_GetHelmCharts", + "parameters": [ + { + "type": "string", + "description": "Repo URL for query", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "Whether to force a cache refresh on repo's connection state.", + "name": "forceRefresh", + "in": "query" + }, + { + "type": "string", + "description": "App project for query.", + "name": "appProject", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/repositoryHelmChartsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/repositories/{repo}/refs": { + "get": { + "tags": [ + "RepositoryService" + ], + "operationId": "RepositoryService_ListRefs", + "parameters": [ + { + "type": "string", + "description": "Repo URL for query", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "Whether to force a cache refresh on repo's connection state.", + "name": "forceRefresh", + "in": "query" + }, + { + "type": "string", + "description": "App project for query.", + "name": "appProject", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/repositoryRefs" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/repositories/{repo}/validate": { + "post": { + "tags": [ + "RepositoryService" + ], + "summary": "ValidateAccess validates access to a repository with given parameters", + "operationId": "RepositoryService_ValidateAccess", + "parameters": [ + { + "type": "string", + "description": "The URL to the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "The URL to the repo", + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + }, + { + "type": "string", + "description": "Username for accessing repo.", + "name": "username", + "in": "query" + }, + { + "type": "string", + "description": "Password for accessing repo.", + "name": "password", + "in": "query" + }, + { + "type": "string", + "description": "Private key data for accessing SSH repository.", + "name": "sshPrivateKey", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether to skip certificate or host key validation.", + "name": "insecure", + "in": "query" + }, + { + "type": "string", + "description": "TLS client cert data for accessing HTTPS repository.", + "name": "tlsClientCertData", + "in": "query" + }, + { + "type": "string", + "description": "TLS client cert key for accessing HTTPS repository.", + "name": "tlsClientCertKey", + "in": "query" + }, + { + "type": "string", + "description": "The type of the repo.", + "name": "type", + "in": "query" + }, + { + "type": "string", + "description": "The name of the repo.", + "name": "name", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether helm-oci support should be enabled for this repo.", + "name": "enableOci", + "in": "query" + }, + { + "type": "string", + "description": "Github App Private Key PEM data.", + "name": "githubAppPrivateKey", + "in": "query" + }, + { + "type": "string", + "format": "int64", + "description": "Github App ID of the app used to access the repo.", + "name": "githubAppID", + "in": "query" + }, + { + "type": "string", + "format": "int64", + "description": "Github App Installation ID of the installed GitHub App.", + "name": "githubAppInstallationID", + "in": "query" + }, + { + "type": "string", + "description": "Github App Enterprise base url if empty will default to https://api.github.com.", + "name": "githubAppEnterpriseBaseUrl", + "in": "query" + }, + { + "type": "string", + "description": "HTTP/HTTPS proxy to access the repository.", + "name": "proxy", + "in": "query" + }, + { + "type": "string", + "description": "Reference between project and repository that allow you automatically to be added as item inside SourceRepos project entity.", + "name": "project", + "in": "query" + }, + { + "type": "string", + "description": "Google Cloud Platform service account key.", + "name": "gcpServiceAccountKey", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether to force HTTP basic auth.", + "name": "forceHttpBasicAuth", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether to use azure workload identity for authentication.", + "name": "useAzureWorkloadIdentity", + "in": "query" + }, + { + "type": "string", + "description": "BearerToken contains the bearer token used for Git auth at the repo server.", + "name": "bearerToken", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/repositoryRepoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/repositories/{source.repoURL}/appdetails": { + "post": { + "tags": [ + "RepositoryService" + ], + "summary": "GetAppDetails returns application details by given path", + "operationId": "RepositoryService_GetAppDetails", + "parameters": [ + { + "type": "string", + "description": "RepoURL is the URL to the repository (Git or Helm) that contains the application manifests", + "name": "source.repoURL", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/repositoryRepoAppDetailsQuery" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/repositoryRepoAppDetailsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/session": { + "post": { + "tags": [ + "SessionService" + ], + "summary": "Create a new JWT for authentication and set a cookie if using HTTP", + "operationId": "SessionService_Create", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/sessionSessionCreateRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/sessionSessionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "delete": { + "tags": [ + "SessionService" + ], + "summary": "Delete an existing JWT cookie if using HTTP", + "operationId": "SessionService_Delete", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/sessionSessionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/session/userinfo": { + "get": { + "tags": [ + "SessionService" + ], + "summary": "Get the current user's info", + "operationId": "SessionService_GetUserInfo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/sessionGetUserInfoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/settings": { + "get": { + "tags": [ + "SettingsService" + ], + "summary": "Get returns Argo CD settings", + "operationId": "SettingsService_Get", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/clusterSettings" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/settings/plugins": { + "get": { + "tags": [ + "SettingsService" + ], + "summary": "Get returns Argo CD plugins", + "operationId": "SettingsService_GetPlugins", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/clusterSettingsPluginsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/stream/applications": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "Watch returns stream of application change events", + "operationId": "ApplicationService_Watch", + "parameters": [ + { + "type": "string", + "description": "the application's name.", + "name": "name", + "in": "query" + }, + { + "type": "string", + "description": "forces application reconciliation if set to 'hard'.", + "name": "refresh", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "the project names to restrict returned list applications.", + "name": "projects", + "in": "query" + }, + { + "type": "string", + "description": "when specified with a watch call, shows changes that occur after that particular version of a resource.", + "name": "resourceVersion", + "in": "query" + }, + { + "type": "string", + "description": "the selector to restrict returned list to applications only with matched labels.", + "name": "selector", + "in": "query" + }, + { + "type": "string", + "description": "the repoURL to restrict returned list applications.", + "name": "repo", + "in": "query" + }, + { + "type": "string", + "description": "the application's namespace.", + "name": "appNamespace", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "the project names to restrict returned list applications (legacy name for backwards-compatibility).", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "title": "Stream result of v1alpha1ApplicationWatchEvent", + "properties": { + "error": { + "$ref": "#/definitions/runtimeStreamError" + }, + "result": { + "$ref": "#/definitions/v1alpha1ApplicationWatchEvent" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/stream/applications/{applicationName}/resource-tree": { + "get": { + "tags": [ + "ApplicationService" + ], + "summary": "Watch returns stream of application resource tree", + "operationId": "ApplicationService_WatchResourceTree", + "parameters": [ + { + "type": "string", + "name": "applicationName", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "name": "name", + "in": "query" + }, + { + "type": "string", + "name": "version", + "in": "query" + }, + { + "type": "string", + "name": "group", + "in": "query" + }, + { + "type": "string", + "name": "kind", + "in": "query" + }, + { + "type": "string", + "name": "appNamespace", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "title": "Stream result of v1alpha1ApplicationTree", + "properties": { + "error": { + "$ref": "#/definitions/runtimeStreamError" + }, + "result": { + "$ref": "#/definitions/v1alpha1ApplicationTree" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/write-repocreds": { + "get": { + "tags": [ + "RepoCredsService" + ], + "summary": "ListWriteRepositoryCredentials gets a list of all configured repository credential sets that have write access", + "operationId": "RepoCredsService_ListWriteRepositoryCredentials", + "parameters": [ + { + "type": "string", + "description": "Repo URL for query.", + "name": "url", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1RepoCredsList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "post": { + "tags": [ + "RepoCredsService" + ], + "summary": "CreateWriteRepositoryCredentials creates a new repository credential set with write access", + "operationId": "RepoCredsService_CreateWriteRepositoryCredentials", + "parameters": [ + { + "description": "Repository definition", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1RepoCreds" + } + }, + { + "type": "boolean", + "description": "Whether to create in upsert mode.", + "name": "upsert", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1RepoCreds" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/write-repocreds/{creds.url}": { + "put": { + "tags": [ + "RepoCredsService" + ], + "summary": "UpdateWriteRepositoryCredentials updates a repository credential set with write access", + "operationId": "RepoCredsService_UpdateWriteRepositoryCredentials", + "parameters": [ + { + "type": "string", + "description": "URL is the URL to which these credentials match", + "name": "creds.url", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1RepoCreds" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1RepoCreds" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/write-repocreds/{url}": { + "delete": { + "tags": [ + "RepoCredsService" + ], + "summary": "DeleteWriteRepositoryCredentials deletes a repository credential set with write access from the configuration", + "operationId": "RepoCredsService_DeleteWriteRepositoryCredentials", + "parameters": [ + { + "type": "string", + "name": "url", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/repocredsRepoCredsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/write-repositories": { + "get": { + "tags": [ + "RepositoryService" + ], + "summary": "ListWriteRepositories gets a list of all configured write repositories", + "operationId": "RepositoryService_ListWriteRepositories", + "parameters": [ + { + "type": "string", + "description": "Repo URL for query.", + "name": "repo", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether to force a cache refresh on repo's connection state.", + "name": "forceRefresh", + "in": "query" + }, + { + "type": "string", + "description": "App project for query.", + "name": "appProject", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1RepositoryList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "post": { + "tags": [ + "RepositoryService" + ], + "summary": "CreateWriteRepository creates a new write repository configuration", + "operationId": "RepositoryService_CreateWriteRepository", + "parameters": [ + { + "description": "Repository definition", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1Repository" + } + }, + { + "type": "boolean", + "description": "Whether to create in upsert mode.", + "name": "upsert", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether to operate on credential set instead of repository.", + "name": "credsOnly", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Repository" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/write-repositories/{repo.repo}": { + "put": { + "tags": [ + "RepositoryService" + ], + "summary": "UpdateWriteRepository updates a write repository configuration", + "operationId": "RepositoryService_UpdateWriteRepository", + "parameters": [ + { + "type": "string", + "description": "Repo contains the URL to the remote repository", + "name": "repo.repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1Repository" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Repository" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/write-repositories/{repo}": { + "get": { + "tags": [ + "RepositoryService" + ], + "summary": "GetWrite returns a repository or its write credentials", + "operationId": "RepositoryService_GetWrite", + "parameters": [ + { + "type": "string", + "description": "Repo URL for query", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "Whether to force a cache refresh on repo's connection state.", + "name": "forceRefresh", + "in": "query" + }, + { + "type": "string", + "description": "App project for query.", + "name": "appProject", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1Repository" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "delete": { + "tags": [ + "RepositoryService" + ], + "summary": "DeleteWriteRepository deletes a write repository from the configuration", + "operationId": "RepositoryService_DeleteWriteRepository", + "parameters": [ + { + "type": "string", + "description": "Repo URL for query", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "Whether to force a cache refresh on repo's connection state.", + "name": "forceRefresh", + "in": "query" + }, + { + "type": "string", + "description": "App project for query.", + "name": "appProject", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/repositoryRepoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/v1/write-repositories/{repo}/validate": { + "post": { + "tags": [ + "RepositoryService" + ], + "summary": "ValidateWriteAccess validates write access to a repository with given parameters", + "operationId": "RepositoryService_ValidateWriteAccess", + "parameters": [ + { + "type": "string", + "description": "The URL to the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "The URL to the repo", + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + }, + { + "type": "string", + "description": "Username for accessing repo.", + "name": "username", + "in": "query" + }, + { + "type": "string", + "description": "Password for accessing repo.", + "name": "password", + "in": "query" + }, + { + "type": "string", + "description": "Private key data for accessing SSH repository.", + "name": "sshPrivateKey", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether to skip certificate or host key validation.", + "name": "insecure", + "in": "query" + }, + { + "type": "string", + "description": "TLS client cert data for accessing HTTPS repository.", + "name": "tlsClientCertData", + "in": "query" + }, + { + "type": "string", + "description": "TLS client cert key for accessing HTTPS repository.", + "name": "tlsClientCertKey", + "in": "query" + }, + { + "type": "string", + "description": "The type of the repo.", + "name": "type", + "in": "query" + }, + { + "type": "string", + "description": "The name of the repo.", + "name": "name", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether helm-oci support should be enabled for this repo.", + "name": "enableOci", + "in": "query" + }, + { + "type": "string", + "description": "Github App Private Key PEM data.", + "name": "githubAppPrivateKey", + "in": "query" + }, + { + "type": "string", + "format": "int64", + "description": "Github App ID of the app used to access the repo.", + "name": "githubAppID", + "in": "query" + }, + { + "type": "string", + "format": "int64", + "description": "Github App Installation ID of the installed GitHub App.", + "name": "githubAppInstallationID", + "in": "query" + }, + { + "type": "string", + "description": "Github App Enterprise base url if empty will default to https://api.github.com.", + "name": "githubAppEnterpriseBaseUrl", + "in": "query" + }, + { + "type": "string", + "description": "HTTP/HTTPS proxy to access the repository.", + "name": "proxy", + "in": "query" + }, + { + "type": "string", + "description": "Reference between project and repository that allow you automatically to be added as item inside SourceRepos project entity.", + "name": "project", + "in": "query" + }, + { + "type": "string", + "description": "Google Cloud Platform service account key.", + "name": "gcpServiceAccountKey", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether to force HTTP basic auth.", + "name": "forceHttpBasicAuth", + "in": "query" + }, + { + "type": "boolean", + "description": "Whether to use azure workload identity for authentication.", + "name": "useAzureWorkloadIdentity", + "in": "query" + }, + { + "type": "string", + "description": "BearerToken contains the bearer token used for Git auth at the repo server.", + "name": "bearerToken", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/repositoryRepoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/api/version": { + "get": { + "tags": [ + "VersionService" + ], + "summary": "Version returns version information of the API server", + "operationId": "VersionService_Version", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/versionVersionMessage" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + } + }, + "definitions": { + "accountAccount": { + "type": "object", + "properties": { + "capabilities": { + "type": "array", + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "tokens": { + "type": "array", + "items": { + "$ref": "#/definitions/accountToken" + } + } + } + }, + "accountAccountsList": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/accountAccount" + } + } + } + }, + "accountCanIResponse": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + }, + "accountCreateTokenRequest": { + "type": "object", + "properties": { + "expiresIn": { + "type": "integer", + "format": "int64", + "title": "expiresIn represents a duration in seconds" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "accountCreateTokenResponse": { + "type": "object", + "properties": { + "token": { + "type": "string" + } + } + }, + "accountEmptyResponse": { + "type": "object" + }, + "accountToken": { + "type": "object", + "properties": { + "expiresAt": { + "type": "integer", + "format": "int64" + }, + "id": { + "type": "string" + }, + "issuedAt": { + "type": "integer", + "format": "int64" + } + } + }, + "accountUpdatePasswordRequest": { + "type": "object", + "properties": { + "currentPassword": { + "type": "string" + }, + "name": { + "type": "string" + }, + "newPassword": { + "type": "string" + } + } + }, + "accountUpdatePasswordResponse": { + "type": "object" + }, + "applicationApplicationManifestQueryWithFiles": { + "type": "object", + "properties": { + "appNamespace": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "name": { + "type": "string" + }, + "project": { + "type": "string" + } + } + }, + "applicationApplicationManifestQueryWithFilesWrapper": { + "type": "object", + "properties": { + "chunk": { + "$ref": "#/definitions/applicationFileChunk" + }, + "query": { + "$ref": "#/definitions/applicationApplicationManifestQueryWithFiles" + } + } + }, + "applicationApplicationPatchRequest": { + "type": "object", + "title": "ApplicationPatchRequest is a request to patch an application", + "properties": { + "appNamespace": { + "type": "string" + }, + "name": { + "type": "string" + }, + "patch": { + "type": "string" + }, + "patchType": { + "type": "string" + }, + "project": { + "type": "string" + } + } + }, + "applicationApplicationResourceResponse": { + "type": "object", + "properties": { + "manifest": { + "type": "string" + } + } + }, + "applicationApplicationResponse": { + "type": "object" + }, + "applicationApplicationRollbackRequest": { + "type": "object", + "properties": { + "appNamespace": { + "type": "string" + }, + "dryRun": { + "type": "boolean" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "project": { + "type": "string" + }, + "prune": { + "type": "boolean" + } + } + }, + "applicationApplicationSyncRequest": { + "type": "object", + "title": "ApplicationSyncRequest is a request to apply the config state to live state", + "properties": { + "appNamespace": { + "type": "string" + }, + "dryRun": { + "type": "boolean" + }, + "infos": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1Info" + } + }, + "manifests": { + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "project": { + "type": "string" + }, + "prune": { + "type": "boolean" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1SyncOperationResource" + } + }, + "retryStrategy": { + "$ref": "#/definitions/v1alpha1RetryStrategy" + }, + "revision": { + "type": "string" + }, + "revisions": { + "type": "array", + "items": { + "type": "string" + } + }, + "sourcePositions": { + "type": "array", + "items": { + "type": "string", + "format": "int64" + } + }, + "strategy": { + "$ref": "#/definitions/v1alpha1SyncStrategy" + }, + "syncOptions": { + "$ref": "#/definitions/applicationSyncOptions" + } + } + }, + "applicationApplicationSyncWindow": { + "type": "object", + "properties": { + "duration": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "manualSync": { + "type": "boolean" + }, + "schedule": { + "type": "string" + } + } + }, + "applicationApplicationSyncWindowsResponse": { + "type": "object", + "properties": { + "activeWindows": { + "type": "array", + "items": { + "$ref": "#/definitions/applicationApplicationSyncWindow" + } + }, + "assignedWindows": { + "type": "array", + "items": { + "$ref": "#/definitions/applicationApplicationSyncWindow" + } + }, + "canSync": { + "type": "boolean" + } + } + }, + "applicationFileChunk": { + "type": "object", + "properties": { + "chunk": { + "type": "string", + "format": "byte" + } + } + }, + "applicationLinkInfo": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "iconClass": { + "type": "string" + }, + "title": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "applicationLinksResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/applicationLinkInfo" + } + } + } + }, + "applicationLogEntry": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "last": { + "type": "boolean" + }, + "podName": { + "type": "string" + }, + "timeStamp": { + "$ref": "#/definitions/v1Time" + }, + "timeStampStr": { + "type": "string" + } + } + }, + "applicationManagedResourcesResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1ResourceDiff" + } + } + } + }, + "applicationOperationTerminateResponse": { + "type": "object" + }, + "applicationResourceActionParameters": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "applicationResourceActionRunRequest": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "appNamespace": { + "type": "string" + }, + "group": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "project": { + "type": "string" + }, + "resourceActionParameters": { + "type": "array", + "items": { + "$ref": "#/definitions/applicationResourceActionParameters" + } + }, + "resourceName": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "applicationResourceActionsListResponse": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1ResourceAction" + } + } + } + }, + "applicationSyncOptions": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "applicationsetApplicationSetGenerateRequest": { + "type": "object", + "title": "ApplicationSetGetQuery is a query for applicationset resources", + "properties": { + "applicationSet": { + "$ref": "#/definitions/v1alpha1ApplicationSet" + } + } + }, + "applicationsetApplicationSetGenerateResponse": { + "type": "object", + "title": "ApplicationSetGenerateResponse is a response for applicationset generate request", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1Application" + } + } + } + }, + "applicationsetApplicationSetResponse": { + "type": "object", + "properties": { + "applicationset": { + "$ref": "#/definitions/v1alpha1ApplicationSet" + }, + "project": { + "type": "string" + } + } + }, + "applicationv1alpha1EnvEntry": { + "type": "object", + "title": "EnvEntry represents an entry in the application's environment", + "properties": { + "name": { + "type": "string", + "title": "Name is the name of the variable, usually expressed in uppercase" + }, + "value": { + "type": "string", + "title": "Value is the value of the variable" + } + } + }, + "applicationv1alpha1ResourceStatus": { + "description": "ResourceStatus holds the current synchronization and health status of a Kubernetes resource.", + "type": "object", + "properties": { + "group": { + "description": "Group represents the API group of the resource (e.g., \"apps\" for Deployments).", + "type": "string" + }, + "health": { + "$ref": "#/definitions/v1alpha1HealthStatus" + }, + "hook": { + "description": "Hook is true if the resource is used as a lifecycle hook in an Argo CD application.", + "type": "boolean" + }, + "kind": { + "description": "Kind specifies the type of the resource (e.g., \"Deployment\", \"Service\").", + "type": "string" + }, + "name": { + "description": "Name is the unique name of the resource within the namespace.", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the Kubernetes namespace where the resource is located.", + "type": "string" + }, + "requiresDeletionConfirmation": { + "description": "RequiresDeletionConfirmation is true if the resource requires explicit user confirmation before deletion.", + "type": "boolean" + }, + "requiresPruning": { + "description": "RequiresPruning is true if the resource needs to be pruned (deleted) as part of synchronization.", + "type": "boolean" + }, + "status": { + "description": "Status represents the synchronization state of the resource (e.g., Synced, OutOfSync).", + "type": "string" + }, + "syncWave": { + "description": "SyncWave determines the order in which resources are applied during a sync operation.\nLower values are applied first.", + "type": "integer", + "format": "int64" + }, + "version": { + "description": "Version indicates the API version of the resource (e.g., \"v1\", \"v1beta1\").", + "type": "string" + } + } + }, + "clusterClusterID": { + "type": "object", + "title": "ClusterID holds a cluster server URL or cluster name", + "properties": { + "type": { + "type": "string", + "title": "type is the type of the specified cluster identifier ( \"server\" - default, \"name\" )" + }, + "value": { + "type": "string", + "title": "value holds the cluster server URL or cluster name" + } + } + }, + "clusterClusterResponse": { + "type": "object" + }, + "clusterConnector": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "clusterDexConfig": { + "type": "object", + "properties": { + "connectors": { + "type": "array", + "items": { + "$ref": "#/definitions/clusterConnector" + } + } + } + }, + "clusterGoogleAnalyticsConfig": { + "type": "object", + "properties": { + "anonymizeUsers": { + "type": "boolean" + }, + "trackingID": { + "type": "string" + } + } + }, + "clusterHelp": { + "type": "object", + "title": "Help settings", + "properties": { + "binaryUrls": { + "type": "object", + "title": "the URLs for downloading argocd binaries", + "additionalProperties": { + "type": "string" + } + }, + "chatText": { + "type": "string", + "title": "the text for getting chat help, defaults to \"Chat now!\"" + }, + "chatUrl": { + "type": "string", + "title": "the URL for getting chat help, this will typically be your Slack channel for support" + } + } + }, + "clusterOIDCConfig": { + "type": "object", + "properties": { + "cliClientID": { + "type": "string" + }, + "clientID": { + "type": "string" + }, + "enablePKCEAuthentication": { + "type": "boolean" + }, + "idTokenClaims": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/oidcClaim" + } + }, + "issuer": { + "type": "string" + }, + "name": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "clusterPlugin": { + "type": "object", + "title": "Plugin settings", + "properties": { + "name": { + "type": "string", + "title": "the name of the plugin, e.g. \"kasane\"" + } + } + }, + "clusterSettings": { + "type": "object", + "properties": { + "additionalUrls": { + "type": "array", + "items": { + "type": "string" + } + }, + "appLabelKey": { + "type": "string" + }, + "appsInAnyNamespaceEnabled": { + "type": "boolean" + }, + "configManagementPlugins": { + "description": "Deprecated: use sidecar plugins instead.", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1ConfigManagementPlugin" + } + }, + "controllerNamespace": { + "type": "string" + }, + "dexConfig": { + "$ref": "#/definitions/clusterDexConfig" + }, + "execEnabled": { + "type": "boolean" + }, + "googleAnalytics": { + "$ref": "#/definitions/clusterGoogleAnalyticsConfig" + }, + "help": { + "$ref": "#/definitions/clusterHelp" + }, + "hydratorEnabled": { + "type": "boolean" + }, + "impersonationEnabled": { + "type": "boolean" + }, + "installationID": { + "type": "string" + }, + "kustomizeOptions": { + "$ref": "#/definitions/v1alpha1KustomizeOptions" + }, + "kustomizeVersions": { + "type": "array", + "items": { + "type": "string" + } + }, + "oidcConfig": { + "$ref": "#/definitions/clusterOIDCConfig" + }, + "passwordPattern": { + "type": "string" + }, + "plugins": { + "type": "array", + "items": { + "$ref": "#/definitions/clusterPlugin" + } + }, + "resourceOverrides": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1alpha1ResourceOverride" + } + }, + "statusBadgeEnabled": { + "type": "boolean" + }, + "statusBadgeRootUrl": { + "type": "string" + }, + "trackingMethod": { + "type": "string" + }, + "uiBannerContent": { + "type": "string" + }, + "uiBannerPermanent": { + "type": "boolean" + }, + "uiBannerPosition": { + "type": "string" + }, + "uiBannerURL": { + "type": "string" + }, + "uiCssURL": { + "type": "string" + }, + "url": { + "type": "string" + }, + "userLoginsDisabled": { + "type": "boolean" + } + } + }, + "clusterSettingsPluginsResponse": { + "type": "object", + "properties": { + "plugins": { + "type": "array", + "items": { + "$ref": "#/definitions/clusterPlugin" + } + } + } + }, + "gpgkeyGnuPGPublicKeyCreateResponse": { + "type": "object", + "title": "Response to a public key creation request", + "properties": { + "created": { + "$ref": "#/definitions/v1alpha1GnuPGPublicKeyList" + }, + "skipped": { + "type": "array", + "title": "List of key IDs that haven been skipped because they already exist on the server", + "items": { + "type": "string" + } + } + } + }, + "gpgkeyGnuPGPublicKeyResponse": { + "type": "object", + "title": "Generic (empty) response for GPG public key CRUD requests" + }, + "intstrIntOrString": { + "description": "+protobuf=true\n+protobuf.options.(gogoproto.goproto_stringer)=false\n+k8s:openapi-gen=true", + "type": "object", + "title": "IntOrString is a type that can hold an int32 or a string. When used in\nJSON or YAML marshalling and unmarshalling, it produces or consumes the\ninner type. This allows you to have, for example, a JSON field that can\naccept a name or number.\nTODO: Rename to Int32OrString", + "properties": { + "intVal": { + "type": "integer", + "format": "int32" + }, + "strVal": { + "type": "string" + }, + "type": { + "type": "integer", + "format": "int64" + } + } + }, + "notificationService": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "notificationServiceList": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/notificationService" + } + } + } + }, + "notificationTemplate": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "notificationTemplateList": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/notificationTemplate" + } + } + } + }, + "notificationTrigger": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "notificationTriggerList": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/notificationTrigger" + } + } + } + }, + "oidcClaim": { + "type": "object", + "properties": { + "essential": { + "type": "boolean" + }, + "value": { + "type": "string" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "projectDetailedProjectsResponse": { + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1Cluster" + } + }, + "globalProjects": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1AppProject" + } + }, + "project": { + "$ref": "#/definitions/v1alpha1AppProject" + }, + "repositories": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1Repository" + } + } + } + }, + "projectEmptyResponse": { + "type": "object" + }, + "projectGlobalProjectsResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1AppProject" + } + } + } + }, + "projectProjectCreateRequest": { + "description": "ProjectCreateRequest defines project creation parameters.", + "type": "object", + "properties": { + "project": { + "$ref": "#/definitions/v1alpha1AppProject" + }, + "upsert": { + "type": "boolean" + } + } + }, + "projectProjectTokenCreateRequest": { + "description": "ProjectTokenCreateRequest defines project token creation parameters.", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "expiresIn": { + "type": "integer", + "format": "int64", + "title": "expiresIn represents a duration in seconds" + }, + "id": { + "type": "string" + }, + "project": { + "type": "string" + }, + "role": { + "type": "string" + } + } + }, + "projectProjectTokenResponse": { + "description": "ProjectTokenResponse wraps the created token or returns an empty string if deleted.", + "type": "object", + "properties": { + "token": { + "type": "string" + } + } + }, + "projectProjectUpdateRequest": { + "type": "object", + "properties": { + "project": { + "$ref": "#/definitions/v1alpha1AppProject" + } + } + }, + "projectSyncWindowsResponse": { + "type": "object", + "properties": { + "windows": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1SyncWindow" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "type": "string", + "format": "byte" + } + } + }, + "repocredsRepoCredsResponse": { + "type": "object", + "title": "RepoCredsResponse is a response to most repository credentials requests" + }, + "repositoryAppInfo": { + "type": "object", + "title": "AppInfo contains application type and app file path", + "properties": { + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "repositoryDirectoryAppSpec": { + "type": "object", + "title": "DirectoryAppSpec contains directory" + }, + "repositoryHelmAppSpec": { + "type": "object", + "title": "HelmAppSpec contains helm app name in source repo", + "properties": { + "fileParameters": { + "type": "array", + "title": "helm file parameters", + "items": { + "$ref": "#/definitions/v1alpha1HelmFileParameter" + } + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "title": "the output of `helm inspect values`", + "items": { + "$ref": "#/definitions/v1alpha1HelmParameter" + } + }, + "valueFiles": { + "type": "array", + "items": { + "type": "string" + } + }, + "values": { + "type": "string", + "title": "the contents of values.yaml" + } + } + }, + "repositoryHelmChart": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "versions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "repositoryHelmChartsResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/repositoryHelmChart" + } + } + } + }, + "repositoryKustomizeAppSpec": { + "type": "object", + "title": "KustomizeAppSpec contains kustomize images", + "properties": { + "images": { + "description": "images is a list of available images.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "repositoryManifestResponse": { + "type": "object", + "properties": { + "commands": { + "type": "array", + "title": "Commands is the list of commands used to hydrate the manifests", + "items": { + "type": "string" + } + }, + "manifests": { + "type": "array", + "items": { + "type": "string" + } + }, + "namespace": { + "type": "string" + }, + "revision": { + "type": "string", + "title": "resolved revision" + }, + "server": { + "type": "string" + }, + "sourceType": { + "type": "string" + }, + "verifyResult": { + "type": "string", + "title": "Raw response of git verify-commit operation (always the empty string for Helm)" + } + } + }, + "repositoryParameterAnnouncement": { + "type": "object", + "properties": { + "array": { + "description": "array is the default value of the parameter if the parameter is an array.", + "type": "array", + "items": { + "type": "string" + } + }, + "collectionType": { + "description": "collectionType is the type of value this parameter holds - either a single value (a string) or a collection\n(array or map). If collectionType is set, only the field with that type will be used. If collectionType is not\nset, `string` is the default. If collectionType is set to an invalid value, a validation error is thrown.", + "type": "string" + }, + "itemType": { + "description": "itemType determines the primitive data type represented by the parameter. Parameters are always encoded as\nstrings, but this field lets them be interpreted as other primitive types.", + "type": "string" + }, + "map": { + "description": "map is the default value of the parameter if the parameter is a map.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "name is the name identifying a parameter.", + "type": "string" + }, + "required": { + "description": "required defines if this given parameter is mandatory.", + "type": "boolean" + }, + "string": { + "description": "string is the default value of the parameter if the parameter is a string.", + "type": "string" + }, + "title": { + "description": "title is a human-readable text of the parameter name.", + "type": "string" + }, + "tooltip": { + "description": "tooltip is a human-readable description of the parameter.", + "type": "string" + } + } + }, + "repositoryPluginAppSpec": { + "type": "object", + "title": "PluginAppSpec contains details about a plugin-type Application", + "properties": { + "parametersAnnouncement": { + "type": "array", + "items": { + "$ref": "#/definitions/repositoryParameterAnnouncement" + } + } + } + }, + "repositoryRefs": { + "type": "object", + "title": "A subset of the repository's named refs", + "properties": { + "branches": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "repositoryRepoAppDetailsQuery": { + "type": "object", + "title": "RepoAppDetailsQuery contains query information for app details request", + "properties": { + "appName": { + "type": "string" + }, + "appProject": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/v1alpha1ApplicationSource" + }, + "sourceIndex": { + "type": "integer", + "format": "int32", + "title": "source index (for multi source apps)" + }, + "versionId": { + "type": "integer", + "format": "int32", + "title": "versionId from historical data (for multi source apps)" + } + } + }, + "repositoryRepoAppDetailsResponse": { + "type": "object", + "title": "RepoAppDetailsResponse application details", + "properties": { + "directory": { + "$ref": "#/definitions/repositoryDirectoryAppSpec" + }, + "helm": { + "$ref": "#/definitions/repositoryHelmAppSpec" + }, + "kustomize": { + "$ref": "#/definitions/repositoryKustomizeAppSpec" + }, + "plugin": { + "$ref": "#/definitions/repositoryPluginAppSpec" + }, + "type": { + "type": "string" + } + } + }, + "repositoryRepoAppsResponse": { + "type": "object", + "title": "RepoAppsResponse contains applications of specified repository", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/repositoryAppInfo" + } + } + } + }, + "repositoryRepoResponse": { + "type": "object" + }, + "runtimeError": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + }, + "error": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "runtimeRawExtension": { + "description": "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned\nstruct, and Object in your internal struct. You also need to register your\nvarious plugin types.\n\n// Internal package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.Object `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// External package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// On the wire, the JSON will look something like this:\n\n\t{\n\t\t\"kind\":\"MyAPIObject\",\n\t\t\"apiVersion\":\"v1\",\n\t\t\"myPlugin\": {\n\t\t\t\"kind\":\"PluginA\",\n\t\t\t\"aOption\":\"foo\",\n\t\t},\n\t}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into\nyour external MyAPIObject. That causes the raw JSON to be stored, but not unpacked.\nThe next step is to copy (using pkg/conversion) into the internal struct. The runtime\npackage's DefaultScheme has conversion functions installed which will unpack the\nJSON stored in RawExtension, turning it into the correct object type, and storing it\nin the Object. (TODO: In the case where the object is of an unknown type, a\nruntime.Unknown object will be created and stored.)\n\n+k8s:deepcopy-gen=true\n+protobuf=true\n+k8s:openapi-gen=true", + "type": "object", + "properties": { + "raw": { + "description": "Raw is the underlying serialization of this object.\n\nTODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data.", + "type": "string", + "format": "byte" + } + } + }, + "runtimeStreamError": { + "type": "object", + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + }, + "grpc_code": { + "type": "integer", + "format": "int32" + }, + "http_code": { + "type": "integer", + "format": "int32" + }, + "http_status": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "sessionGetUserInfoResponse": { + "type": "object", + "title": "The current user's userInfo info", + "properties": { + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "iss": { + "type": "string" + }, + "loggedIn": { + "type": "boolean" + }, + "username": { + "type": "string" + } + } + }, + "sessionSessionCreateRequest": { + "description": "SessionCreateRequest is for logging in.", + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "token": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "sessionSessionResponse": { + "description": "SessionResponse wraps the created token or returns an empty string if deleted.", + "type": "object", + "properties": { + "token": { + "type": "string" + } + } + }, + "v1Event": { + "description": "Event is a report of an event somewhere in the cluster. Events\nhave a limited retention time and triggers and messages may evolve\nwith time. Event consumers should not rely on the timing of an event\nwith a given Reason reflecting a consistent underlying trigger, or the\ncontinued existence of events with that Reason. Events should be\ntreated as informative, best-effort, supplemental data.", + "type": "object", + "properties": { + "action": { + "type": "string", + "title": "What action was taken/failed regarding to the Regarding object.\n+optional" + }, + "count": { + "type": "integer", + "format": "int32", + "title": "The number of times this event has occurred.\n+optional" + }, + "eventTime": { + "$ref": "#/definitions/v1MicroTime" + }, + "firstTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "involvedObject": { + "$ref": "#/definitions/v1ObjectReference" + }, + "lastTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "message": { + "type": "string", + "title": "A human-readable description of the status of this operation.\nTODO: decide on maximum length.\n+optional" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "reason": { + "type": "string", + "title": "This should be a short, machine understandable string that gives the reason\nfor the transition into the object's current status.\nTODO: provide exact specification for format.\n+optional" + }, + "related": { + "$ref": "#/definitions/v1ObjectReference" + }, + "reportingComponent": { + "type": "string", + "title": "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.\n+optional" + }, + "reportingInstance": { + "type": "string", + "title": "ID of the controller instance, e.g. `kubelet-xyzf`.\n+optional" + }, + "series": { + "$ref": "#/definitions/v1EventSeries" + }, + "source": { + "$ref": "#/definitions/v1EventSource" + }, + "type": { + "type": "string", + "title": "Type of this event (Normal, Warning), new types could be added in the future\n+optional" + } + } + }, + "v1EventList": { + "description": "EventList is a list of events.", + "type": "object", + "properties": { + "items": { + "type": "array", + "title": "List of events", + "items": { + "$ref": "#/definitions/v1Event" + } + }, + "metadata": { + "$ref": "#/definitions/v1ListMeta" + } + } + }, + "v1EventSeries": { + "description": "EventSeries contain information on series of events, i.e. thing that was/is happening\ncontinuously for some time.", + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int32", + "title": "Number of occurrences in this series up to the last heartbeat time" + }, + "lastObservedTime": { + "$ref": "#/definitions/v1MicroTime" + } + } + }, + "v1EventSource": { + "description": "EventSource contains information for an event.", + "type": "object", + "properties": { + "component": { + "type": "string", + "title": "Component from which the event is generated.\n+optional" + }, + "host": { + "type": "string", + "title": "Node name on which the event is generated.\n+optional" + } + } + }, + "v1FieldsV1": { + "description": "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set,\nor a string representing a sub-field or item. The string will follow one of these four formats:\n'f:', where is the name of a field in a struct, or key in a map\n'v:', where is the exact json formatted value of a list item\n'i:', where is position of a item in a list\n'k:', where is a map of a list item's key fields to their unique values\nIf a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff\n+protobuf.options.(gogoproto.goproto_stringer)=false", + "type": "object", + "properties": { + "Raw": { + "description": "Raw is the underlying serialization of this object.", + "type": "string", + "format": "byte" + } + } + }, + "v1GroupKind": { + "description": "+protobuf.options.(gogoproto.goproto_stringer)=false", + "type": "object", + "title": "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying\nconcepts during lookup stages without having partially valid types", + "properties": { + "group": { + "type": "string" + }, + "kind": { + "type": "string" + } + } + }, + "v1JSON": { + "description": "JSON represents any valid JSON value.\nThese types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.", + "type": "object", + "properties": { + "raw": { + "type": "string", + "format": "byte" + } + } + }, + "v1LabelSelector": { + "type": "object", + "title": "A label selector is a label query over a set of resources. The result of matchLabels and\nmatchExpressions are ANDed. An empty label selector matches all objects. A null\nlabel selector matches no objects.\n+structType=atomic", + "properties": { + "matchExpressions": { + "type": "array", + "title": "matchExpressions is a list of label selector requirements. The requirements are ANDed.\n+optional\n+listType=atomic", + "items": { + "$ref": "#/definitions/v1LabelSelectorRequirement" + } + }, + "matchLabels": { + "type": "object", + "title": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n+optional", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1LabelSelectorRequirement": { + "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.", + "type": "object", + "properties": { + "key": { + "description": "key is the label key that the selector applies to.", + "type": "string" + }, + "operator": { + "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.", + "type": "string" + }, + "values": { + "type": "array", + "title": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.\n+optional\n+listType=atomic", + "items": { + "type": "string" + } + } + } + }, + "v1ListMeta": { + "description": "ListMeta describes metadata that synthetic resources must have, including lists and\nvarious status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + "type": "object", + "properties": { + "continue": { + "description": "continue may be set if the user set a limit on the number of items returned, and indicates that\nthe server has more data available. The value is opaque and may be used to issue another request\nto the endpoint that served this list to retrieve the next set of available objects. Continuing a\nconsistent list may not be possible if the server configuration has changed or more than a few\nminutes have passed. The resourceVersion field returned when using this continue value will be\nidentical to the value in the first response, unless you have received this token from an error\nmessage.", + "type": "string" + }, + "remainingItemCount": { + "type": "integer", + "format": "int64", + "title": "remainingItemCount is the number of subsequent items in the list which are not included in this\nlist response. If the list request contained label or field selectors, then the number of\nremaining items is unknown and the field will be left unset and omitted during serialization.\nIf the list is complete (either because it is not chunking or because this is the last chunk),\nthen there are no more remaining items and this field will be left unset and omitted during\nserialization.\nServers older than v1.15 do not set this field.\nThe intended use of the remainingItemCount is *estimating* the size of a collection. Clients\nshould not rely on the remainingItemCount to be set or to be exact.\n+optional" + }, + "resourceVersion": { + "type": "string", + "title": "String that identifies the server's internal version of this object that\ncan be used by clients to determine when objects have changed.\nValue must be treated as opaque by clients and passed unmodified back to the server.\nPopulated by the system.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional" + }, + "selfLink": { + "type": "string", + "title": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.\n+optional" + } + } + }, + "v1LoadBalancerIngress": { + "description": "LoadBalancerIngress represents the status of a load-balancer ingress point:\ntraffic intended for the service should be sent to an ingress point.", + "type": "object", + "properties": { + "hostname": { + "type": "string", + "title": "Hostname is set for load-balancer ingress points that are DNS based\n(typically AWS load-balancers)\n+optional" + }, + "ip": { + "type": "string", + "title": "IP is set for load-balancer ingress points that are IP based\n(typically GCE or OpenStack load-balancers)\n+optional" + }, + "ipMode": { + "type": "string", + "title": "IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is specified.\nSetting this to \"VIP\" indicates that traffic is delivered to the node with\nthe destination set to the load-balancer's IP and port.\nSetting this to \"Proxy\" indicates that traffic is delivered to the node or pod with\nthe destination set to the node's IP and node port or the pod's IP and port.\nService implementations may use this information to adjust traffic routing.\n+optional" + }, + "ports": { + "type": "array", + "title": "Ports is a list of records of service ports\nIf used, every port defined in the service should have an entry in it\n+listType=atomic\n+optional", + "items": { + "$ref": "#/definitions/v1PortStatus" + } + } + } + }, + "v1ManagedFieldsEntry": { + "description": "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource\nthat the fieldset applies to.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the version of this resource that this field set\napplies to. The format is \"group/version\" just like the top-level\nAPIVersion field. It is necessary to track the version of a field\nset because it cannot be automatically converted.", + "type": "string" + }, + "fieldsType": { + "type": "string", + "title": "FieldsType is the discriminator for the different fields format and version.\nThere is currently only one possible value: \"FieldsV1\"" + }, + "fieldsV1": { + "$ref": "#/definitions/v1FieldsV1" + }, + "manager": { + "description": "Manager is an identifier of the workflow managing these fields.", + "type": "string" + }, + "operation": { + "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created.\nThe only valid values for this field are 'Apply' and 'Update'.", + "type": "string" + }, + "subresource": { + "description": "Subresource is the name of the subresource used to update that object, or\nempty string if the object was updated through the main resource. The\nvalue of this field is used to distinguish between managers, even if they\nshare the same name. For example, a status update will be distinct from a\nregular update using the same manager name.\nNote that the APIVersion field is not related to the Subresource field and\nit always corresponds to the version of the main resource.", + "type": "string" + }, + "time": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1MicroTime": { + "description": "MicroTime is version of Time with microsecond level precision.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false", + "type": "object", + "properties": { + "nanos": { + "description": "Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context.", + "type": "integer", + "format": "int32" + }, + "seconds": { + "description": "Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive.", + "type": "integer", + "format": "int64" + } + } + }, + "v1NodeSystemInfo": { + "description": "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", + "type": "object", + "properties": { + "architecture": { + "type": "string", + "title": "The Architecture reported by the node" + }, + "bootID": { + "description": "Boot ID reported by the node.", + "type": "string" + }, + "containerRuntimeVersion": { + "description": "ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2).", + "type": "string" + }, + "kernelVersion": { + "description": "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", + "type": "string" + }, + "kubeProxyVersion": { + "description": "Deprecated: KubeProxy Version reported by the node.", + "type": "string" + }, + "kubeletVersion": { + "description": "Kubelet Version reported by the node.", + "type": "string" + }, + "machineID": { + "type": "string", + "title": "MachineID reported by the node. For unique machine identification\nin the cluster this field is preferred. Learn more from man(5)\nmachine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html" + }, + "operatingSystem": { + "type": "string", + "title": "The Operating System reported by the node" + }, + "osImage": { + "description": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", + "type": "string" + }, + "systemUUID": { + "type": "string", + "title": "SystemUUID reported by the node. For unique machine identification\nMachineID is preferred. This field is specific to Red Hat hosts\nhttps://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid" + } + } + }, + "v1ObjectMeta": { + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects\nusers must create.", + "type": "object", + "properties": { + "annotations": { + "type": "object", + "title": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations\n+optional", + "additionalProperties": { + "type": "string" + } + }, + "creationTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "deletionGracePeriodSeconds": { + "type": "integer", + "format": "int64", + "title": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only.\n+optional" + }, + "deletionTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "finalizers": { + "type": "array", + "title": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+optional\n+patchStrategy=merge\n+listType=set", + "items": { + "type": "string" + } + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will return a 409.\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency\n+optional", + "type": "string" + }, + "generation": { + "type": "integer", + "format": "int64", + "title": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only.\n+optional" + }, + "labels": { + "type": "object", + "title": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels\n+optional", + "additionalProperties": { + "type": "string" + } + }, + "managedFields": { + "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n\n+optional\n+listType=atomic", + "type": "array", + "items": { + "$ref": "#/definitions/v1ManagedFieldsEntry" + } + }, + "name": { + "type": "string", + "title": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names\n+optional" + }, + "namespace": { + "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces\n+optional", + "type": "string" + }, + "ownerReferences": { + "type": "array", + "title": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+optional\n+patchMergeKey=uid\n+patchStrategy=merge\n+listType=map\n+listMapKey=uid", + "items": { + "$ref": "#/definitions/v1OwnerReference" + } + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional", + "type": "string" + }, + "selfLink": { + "type": "string", + "title": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.\n+optional" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids\n+optional", + "type": "string" + } + } + }, + "v1ObjectReference": { + "description": "ObjectReference contains enough information to let you inspect or modify the referred object.\n---\nNew uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.\n 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.\n 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular\n restrictions like, \"must refer only to types A and B\" or \"UID not honored\" or \"name must be restricted\".\n Those cannot be well described when embedded.\n 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.\n 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity\n during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple\n and the version of the actual struct is irrelevant.\n 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type\n will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.\n\nInstead of using this type, create a locally provided and used type that is well-focused on your reference.\nFor example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+structType=atomic", + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "title": "API version of the referent.\n+optional" + }, + "fieldPath": { + "type": "string", + "title": "If referring to a piece of an object instead of an entire object, this string\nshould contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].\nFor example, if the object reference is to a container within a pod, this would take on a value like:\n\"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered\nthe event) or if no container name is specified \"spec.containers[2]\" (container with\nindex 2 in this pod). This syntax is chosen only to have some well-defined way of\nreferencing a part of an object.\nTODO: this design is not final and this field is subject to change in the future.\n+optional" + }, + "kind": { + "type": "string", + "title": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional" + }, + "name": { + "type": "string", + "title": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\n+optional" + }, + "namespace": { + "type": "string", + "title": "Namespace of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\n+optional" + }, + "resourceVersion": { + "type": "string", + "title": "Specific resourceVersion to which this reference is made, if any.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional" + }, + "uid": { + "type": "string", + "title": "UID of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids\n+optional" + } + } + }, + "v1OwnerReference": { + "type": "object", + "title": "OwnerReference contains enough information to let you identify an owning\nobject. An owning object must be in the same namespace as the dependent, or\nbe cluster-scoped, so there is no namespace field.\n+structType=atomic", + "properties": { + "apiVersion": { + "description": "API version of the referent.", + "type": "string" + }, + "blockOwnerDeletion": { + "type": "boolean", + "title": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then\nthe owner cannot be deleted from the key-value store until this\nreference is removed.\nSee https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion\nfor how the garbage collector interacts with this field and enforces the foreground deletion.\nDefaults to false.\nTo set this field, a user needs \"delete\" permission of the owner,\notherwise 422 (Unprocessable Entity) will be returned.\n+optional" + }, + "controller": { + "type": "boolean", + "title": "If true, this reference points to the managing controller.\n+optional" + }, + "kind": { + "type": "string", + "title": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "name": { + "type": "string", + "title": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names" + }, + "uid": { + "type": "string", + "title": "UID of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids" + } + } + }, + "v1PortStatus": { + "type": "object", + "title": "PortStatus represents the error condition of a service port", + "properties": { + "error": { + "type": "string", + "title": "Error is to record the problem with the service port\nThe format of the error shall comply with the following rules:\n- built-in error values shall be specified in this file and those shall use\n CamelCase names\n- cloud provider specific error values must have names that comply with the\n format foo.example.com/CamelCase.\n---\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)\n+optional\n+kubebuilder:validation:Required\n+kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$`\n+kubebuilder:validation:MaxLength=316" + }, + "port": { + "type": "integer", + "format": "int32", + "title": "Port is the port number of the service port of which status is recorded here" + }, + "protocol": { + "type": "string", + "title": "Protocol is the protocol of the service port of which status is recorded here\nThe supported values are: \"TCP\", \"UDP\", \"SCTP\"" + } + } + }, + "v1Time": { + "description": "Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON. Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false", + "type": "string", + "format": "date-time" + }, + "v1alpha1AWSAuthConfig": { + "type": "object", + "title": "AWSAuthConfig is an AWS IAM authentication configuration", + "properties": { + "clusterName": { + "type": "string", + "title": "ClusterName contains AWS cluster name" + }, + "profile": { + "description": "Profile contains optional role ARN. If set then AWS IAM Authenticator uses the profile to perform cluster operations instead of the default AWS credential provider chain.", + "type": "string" + }, + "roleARN": { + "description": "RoleARN contains optional role ARN. If set then AWS IAM Authenticator assume a role to perform cluster operations instead of the default AWS credential provider chain.", + "type": "string" + } + } + }, + "v1alpha1AppHealthStatus": { + "type": "object", + "title": "AppHealthStatus contains information about the currently observed health state of an application", + "properties": { + "lastTransitionTime": { + "$ref": "#/definitions/v1Time" + }, + "message": { + "description": "Deprecated: this field is not used and will be removed in a future release.", + "type": "string", + "title": "Message is a human-readable informational message describing the health status" + }, + "status": { + "type": "string", + "title": "Status holds the status code of the application" + } + } + }, + "v1alpha1AppProject": { + "type": "object", + "title": "AppProject provides a logical grouping of applications, providing controls for:\n* where the apps may deploy to (cluster whitelist)\n* what may be deployed (repository whitelist, resource whitelist/blacklist)\n* who can access these applications (roles, OIDC group claims bindings)\n* and what they can do (RBAC policies)\n* automation access to these roles (JWT tokens)\n+genclient\n+genclient:noStatus\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+kubebuilder:resource:path=appprojects,shortName=appproj;appprojs", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1alpha1AppProjectSpec" + }, + "status": { + "$ref": "#/definitions/v1alpha1AppProjectStatus" + } + } + }, + "v1alpha1AppProjectList": { + "type": "object", + "title": "AppProjectList is list of AppProject resources\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1AppProject" + } + }, + "metadata": { + "$ref": "#/definitions/v1ListMeta" + } + } + }, + "v1alpha1AppProjectSpec": { + "type": "object", + "title": "AppProjectSpec is the specification of an AppProject", + "properties": { + "clusterResourceBlacklist": { + "type": "array", + "title": "ClusterResourceBlacklist contains list of blacklisted cluster level resources", + "items": { + "$ref": "#/definitions/v1GroupKind" + } + }, + "clusterResourceWhitelist": { + "type": "array", + "title": "ClusterResourceWhitelist contains list of whitelisted cluster level resources", + "items": { + "$ref": "#/definitions/v1GroupKind" + } + }, + "description": { + "type": "string", + "title": "Description contains optional project description\n+kubebuilder:validation:MaxLength=255" + }, + "destinationServiceAccounts": { + "description": "DestinationServiceAccounts holds information about the service accounts to be impersonated for the application sync operation for each destination.", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1ApplicationDestinationServiceAccount" + } + }, + "destinations": { + "type": "array", + "title": "Destinations contains list of destinations available for deployment", + "items": { + "$ref": "#/definitions/v1alpha1ApplicationDestination" + } + }, + "namespaceResourceBlacklist": { + "type": "array", + "title": "NamespaceResourceBlacklist contains list of blacklisted namespace level resources", + "items": { + "$ref": "#/definitions/v1GroupKind" + } + }, + "namespaceResourceWhitelist": { + "type": "array", + "title": "NamespaceResourceWhitelist contains list of whitelisted namespace level resources", + "items": { + "$ref": "#/definitions/v1GroupKind" + } + }, + "orphanedResources": { + "$ref": "#/definitions/v1alpha1OrphanedResourcesMonitorSettings" + }, + "permitOnlyProjectScopedClusters": { + "type": "boolean", + "title": "PermitOnlyProjectScopedClusters determines whether destinations can only reference clusters which are project-scoped" + }, + "roles": { + "type": "array", + "title": "Roles are user defined RBAC roles associated with this project", + "items": { + "$ref": "#/definitions/v1alpha1ProjectRole" + } + }, + "signatureKeys": { + "type": "array", + "title": "SignatureKeys contains a list of PGP key IDs that commits in Git must be signed with in order to be allowed for sync", + "items": { + "$ref": "#/definitions/v1alpha1SignatureKey" + } + }, + "sourceNamespaces": { + "type": "array", + "title": "SourceNamespaces defines the namespaces application resources are allowed to be created in", + "items": { + "type": "string" + } + }, + "sourceRepos": { + "type": "array", + "title": "SourceRepos contains list of repository URLs which can be used for deployment", + "items": { + "type": "string" + } + }, + "syncWindows": { + "type": "array", + "title": "SyncWindows controls when syncs can be run for apps in this project", + "items": { + "$ref": "#/definitions/v1alpha1SyncWindow" + } + } + } + }, + "v1alpha1AppProjectStatus": { + "type": "object", + "title": "AppProjectStatus contains status information for AppProject CRs", + "properties": { + "jwtTokensByRole": { + "type": "object", + "title": "JWTTokensByRole contains a list of JWT tokens issued for a given role", + "additionalProperties": { + "$ref": "#/definitions/v1alpha1JWTTokens" + } + } + } + }, + "v1alpha1Application": { + "type": "object", + "title": "Application is a definition of Application resource.\n+genclient\n+genclient:noStatus\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+kubebuilder:resource:path=applications,shortName=app;apps\n+kubebuilder:printcolumn:name=\"Sync Status\",type=string,JSONPath=`.status.sync.status`\n+kubebuilder:printcolumn:name=\"Health Status\",type=string,JSONPath=`.status.health.status`\n+kubebuilder:printcolumn:name=\"Revision\",type=string,JSONPath=`.status.sync.revision`,priority=10\n+kubebuilder:printcolumn:name=\"Project\",type=string,JSONPath=`.spec.project`,priority=10", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "operation": { + "$ref": "#/definitions/v1alpha1Operation" + }, + "spec": { + "$ref": "#/definitions/v1alpha1ApplicationSpec" + }, + "status": { + "$ref": "#/definitions/v1alpha1ApplicationStatus" + } + } + }, + "v1alpha1ApplicationCondition": { + "type": "object", + "title": "ApplicationCondition contains details about an application condition, which is usually an error or warning", + "properties": { + "lastTransitionTime": { + "$ref": "#/definitions/v1Time" + }, + "message": { + "type": "string", + "title": "Message contains human-readable message indicating details about condition" + }, + "type": { + "type": "string", + "title": "Type is an application condition type" + } + } + }, + "v1alpha1ApplicationDestination": { + "type": "object", + "title": "ApplicationDestination holds information about the application's destination", + "properties": { + "name": { + "description": "Name is an alternate way of specifying the target cluster by its symbolic name. This must be set if Server is not set.", + "type": "string" + }, + "namespace": { + "type": "string", + "title": "Namespace specifies the target namespace for the application's resources.\nThe namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace" + }, + "server": { + "description": "Server specifies the URL of the target cluster's Kubernetes control plane API. This must be set if Name is not set.", + "type": "string" + } + } + }, + "v1alpha1ApplicationDestinationServiceAccount": { + "description": "ApplicationDestinationServiceAccount holds information about the service account to be impersonated for the application sync operation.", + "type": "object", + "properties": { + "defaultServiceAccount": { + "type": "string", + "title": "DefaultServiceAccount to be used for impersonation during the sync operation" + }, + "namespace": { + "description": "Namespace specifies the target namespace for the application's resources.", + "type": "string" + }, + "server": { + "description": "Server specifies the URL of the target cluster's Kubernetes control plane API.", + "type": "string" + } + } + }, + "v1alpha1ApplicationList": { + "type": "object", + "title": "ApplicationList is list of Application resources\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1Application" + } + }, + "metadata": { + "$ref": "#/definitions/v1ListMeta" + } + } + }, + "v1alpha1ApplicationMatchExpression": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1alpha1ApplicationPreservedFields": { + "type": "object", + "properties": { + "annotations": { + "type": "array", + "items": { + "type": "string" + } + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1alpha1ApplicationSet": { + "type": "object", + "title": "ApplicationSet is a set of Application resources\n+genclient\n+genclient:noStatus\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+kubebuilder:resource:path=applicationsets,shortName=appset;appsets\n+kubebuilder:subresource:status", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1alpha1ApplicationSetSpec" + }, + "status": { + "$ref": "#/definitions/v1alpha1ApplicationSetStatus" + } + } + }, + "v1alpha1ApplicationSetApplicationStatus": { + "type": "object", + "title": "ApplicationSetApplicationStatus contains details about each Application managed by the ApplicationSet", + "properties": { + "application": { + "type": "string", + "title": "Application contains the name of the Application resource" + }, + "lastTransitionTime": { + "$ref": "#/definitions/v1Time" + }, + "message": { + "type": "string", + "title": "Message contains human-readable message indicating details about the status" + }, + "status": { + "type": "string", + "title": "Status contains the AppSet's perceived status of the managed Application resource: (Waiting, Pending, Progressing, Healthy)" + }, + "step": { + "type": "string", + "title": "Step tracks which step this Application should be updated in" + }, + "targetrevisions": { + "description": "TargetRevision tracks the desired revisions the Application should be synced to.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1alpha1ApplicationSetCondition": { + "type": "object", + "title": "ApplicationSetCondition contains details about an applicationset condition, which is usually an error or warning", + "properties": { + "lastTransitionTime": { + "$ref": "#/definitions/v1Time" + }, + "message": { + "type": "string", + "title": "Message contains human-readable message indicating details about condition" + }, + "reason": { + "type": "string", + "title": "Single word camelcase representing the reason for the status eg ErrorOccurred" + }, + "status": { + "type": "string", + "title": "True/False/Unknown" + }, + "type": { + "type": "string", + "title": "Type is an applicationset condition type" + } + } + }, + "v1alpha1ApplicationSetGenerator": { + "description": "ApplicationSetGenerator represents a generator at the top level of an ApplicationSet.", + "type": "object", + "properties": { + "clusterDecisionResource": { + "$ref": "#/definitions/v1alpha1DuckTypeGenerator" + }, + "clusters": { + "$ref": "#/definitions/v1alpha1ClusterGenerator" + }, + "git": { + "$ref": "#/definitions/v1alpha1GitGenerator" + }, + "list": { + "$ref": "#/definitions/v1alpha1ListGenerator" + }, + "matrix": { + "$ref": "#/definitions/v1alpha1MatrixGenerator" + }, + "merge": { + "$ref": "#/definitions/v1alpha1MergeGenerator" + }, + "plugin": { + "$ref": "#/definitions/v1alpha1PluginGenerator" + }, + "pullRequest": { + "$ref": "#/definitions/v1alpha1PullRequestGenerator" + }, + "scmProvider": { + "$ref": "#/definitions/v1alpha1SCMProviderGenerator" + }, + "selector": { + "$ref": "#/definitions/v1LabelSelector" + } + } + }, + "v1alpha1ApplicationSetList": { + "type": "object", + "title": "ApplicationSetList contains a list of ApplicationSet\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+kubebuilder:object:root=true", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1ApplicationSet" + } + }, + "metadata": { + "$ref": "#/definitions/v1ListMeta" + } + } + }, + "v1alpha1ApplicationSetNestedGenerator": { + "description": "ApplicationSetNestedGenerator represents a generator nested within a combination-type generator (MatrixGenerator or\nMergeGenerator).", + "type": "object", + "properties": { + "clusterDecisionResource": { + "$ref": "#/definitions/v1alpha1DuckTypeGenerator" + }, + "clusters": { + "$ref": "#/definitions/v1alpha1ClusterGenerator" + }, + "git": { + "$ref": "#/definitions/v1alpha1GitGenerator" + }, + "list": { + "$ref": "#/definitions/v1alpha1ListGenerator" + }, + "matrix": { + "$ref": "#/definitions/v1JSON" + }, + "merge": { + "$ref": "#/definitions/v1JSON" + }, + "plugin": { + "$ref": "#/definitions/v1alpha1PluginGenerator" + }, + "pullRequest": { + "$ref": "#/definitions/v1alpha1PullRequestGenerator" + }, + "scmProvider": { + "$ref": "#/definitions/v1alpha1SCMProviderGenerator" + }, + "selector": { + "$ref": "#/definitions/v1LabelSelector" + } + } + }, + "v1alpha1ApplicationSetResourceIgnoreDifferences": { + "description": "ApplicationSetResourceIgnoreDifferences configures how the ApplicationSet controller will ignore differences in live\napplications when applying changes from generated applications.", + "type": "object", + "properties": { + "jqPathExpressions": { + "description": "JQPathExpressions is a list of JQ path expressions to fields to ignore differences for.", + "type": "array", + "items": { + "type": "string" + } + }, + "jsonPointers": { + "description": "JSONPointers is a list of JSON pointers to fields to ignore differences for.", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "description": "Name is the name of the application to ignore differences for. If not specified, the rule applies to all applications.", + "type": "string" + } + } + }, + "v1alpha1ApplicationSetRolloutStep": { + "type": "object", + "properties": { + "matchExpressions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1ApplicationMatchExpression" + } + }, + "maxUpdate": { + "$ref": "#/definitions/intstrIntOrString" + } + } + }, + "v1alpha1ApplicationSetRolloutStrategy": { + "type": "object", + "properties": { + "steps": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1ApplicationSetRolloutStep" + } + } + } + }, + "v1alpha1ApplicationSetSpec": { + "description": "ApplicationSetSpec represents a class of application set state.", + "type": "object", + "properties": { + "applyNestedSelectors": { + "description": "ApplyNestedSelectors enables selectors defined within the generators of two level-nested matrix or merge generators\nDeprecated: This field is ignored, and the behavior is always enabled. The field will be removed in a future\nversion of the ApplicationSet CRD.", + "type": "boolean" + }, + "generators": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1ApplicationSetGenerator" + } + }, + "goTemplate": { + "type": "boolean" + }, + "goTemplateOptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "ignoreApplicationDifferences": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1ApplicationSetResourceIgnoreDifferences" + } + }, + "preservedFields": { + "$ref": "#/definitions/v1alpha1ApplicationPreservedFields" + }, + "strategy": { + "$ref": "#/definitions/v1alpha1ApplicationSetStrategy" + }, + "syncPolicy": { + "$ref": "#/definitions/v1alpha1ApplicationSetSyncPolicy" + }, + "template": { + "$ref": "#/definitions/v1alpha1ApplicationSetTemplate" + }, + "templatePatch": { + "type": "string" + } + } + }, + "v1alpha1ApplicationSetStatus": { + "type": "object", + "title": "ApplicationSetStatus defines the observed state of ApplicationSet", + "properties": { + "applicationStatus": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1ApplicationSetApplicationStatus" + } + }, + "conditions": { + "type": "array", + "title": "INSERT ADDITIONAL STATUS FIELD - define observed state of cluster\nImportant: Run \"make\" to regenerate code after modifying this file", + "items": { + "$ref": "#/definitions/v1alpha1ApplicationSetCondition" + } + }, + "resources": { + "description": "Resources is a list of Applications resources managed by this application set.", + "type": "array", + "items": { + "$ref": "#/definitions/applicationv1alpha1ResourceStatus" + } + } + } + }, + "v1alpha1ApplicationSetStrategy": { + "description": "ApplicationSetStrategy configures how generated Applications are updated in sequence.", + "type": "object", + "properties": { + "rollingSync": { + "$ref": "#/definitions/v1alpha1ApplicationSetRolloutStrategy" + }, + "type": { + "type": "string" + } + } + }, + "v1alpha1ApplicationSetSyncPolicy": { + "description": "ApplicationSetSyncPolicy configures how generated Applications will relate to their\nApplicationSet.", + "type": "object", + "properties": { + "applicationsSync": { + "type": "string", + "title": "ApplicationsSync represents the policy applied on the generated applications. Possible values are create-only, create-update, create-delete, sync\n+kubebuilder:validation:Optional\n+kubebuilder:validation:Enum=create-only;create-update;create-delete;sync" + }, + "preserveResourcesOnDeletion": { + "description": "PreserveResourcesOnDeletion will preserve resources on deletion. If PreserveResourcesOnDeletion is set to true, these Applications will not be deleted.", + "type": "boolean" + } + } + }, + "v1alpha1ApplicationSetTemplate": { + "type": "object", + "title": "ApplicationSetTemplate represents argocd ApplicationSpec", + "properties": { + "metadata": { + "$ref": "#/definitions/v1alpha1ApplicationSetTemplateMeta" + }, + "spec": { + "$ref": "#/definitions/v1alpha1ApplicationSpec" + } + } + }, + "v1alpha1ApplicationSetTemplateMeta": { + "type": "object", + "title": "ApplicationSetTemplateMeta represents the Argo CD application fields that may\nbe used for Applications generated from the ApplicationSet (based on metav1.ObjectMeta)", + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "finalizers": { + "type": "array", + "items": { + "type": "string" + } + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + } + }, + "v1alpha1ApplicationSetTree": { + "type": "object", + "title": "ApplicationSetTree holds nodes which belongs to the application\nUsed to build a tree of an ApplicationSet and its children", + "properties": { + "nodes": { + "type": "array", + "title": "Nodes contains list of nodes which are directly managed by the applicationset", + "items": { + "$ref": "#/definitions/v1alpha1ResourceNode" + } + } + } + }, + "v1alpha1ApplicationSource": { + "type": "object", + "title": "ApplicationSource contains all required information about the source of an application", + "properties": { + "chart": { + "description": "Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo.", + "type": "string" + }, + "directory": { + "$ref": "#/definitions/v1alpha1ApplicationSourceDirectory" + }, + "helm": { + "$ref": "#/definitions/v1alpha1ApplicationSourceHelm" + }, + "kustomize": { + "$ref": "#/definitions/v1alpha1ApplicationSourceKustomize" + }, + "name": { + "description": "Name is used to refer to a source and is displayed in the UI. It is used in multi-source Applications.", + "type": "string" + }, + "path": { + "description": "Path is a directory path within the Git repository, and is only valid for applications sourced from Git.", + "type": "string" + }, + "plugin": { + "$ref": "#/definitions/v1alpha1ApplicationSourcePlugin" + }, + "ref": { + "description": "Ref is reference to another source within sources field. This field will not be used if used with a `source` tag.", + "type": "string" + }, + "repoURL": { + "type": "string", + "title": "RepoURL is the URL to the repository (Git or Helm) that contains the application manifests" + }, + "targetRevision": { + "description": "TargetRevision defines the revision of the source to sync the application to.\nIn case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD.\nIn case of Helm, this is a semver tag for the Chart's version.", + "type": "string" + } + } + }, + "v1alpha1ApplicationSourceDirectory": { + "type": "object", + "title": "ApplicationSourceDirectory holds options for applications of type plain YAML or Jsonnet", + "properties": { + "exclude": { + "type": "string", + "title": "Exclude contains a glob pattern to match paths against that should be explicitly excluded from being used during manifest generation" + }, + "include": { + "type": "string", + "title": "Include contains a glob pattern to match paths against that should be explicitly included during manifest generation" + }, + "jsonnet": { + "$ref": "#/definitions/v1alpha1ApplicationSourceJsonnet" + }, + "recurse": { + "type": "boolean", + "title": "Recurse specifies whether to scan a directory recursively for manifests" + } + } + }, + "v1alpha1ApplicationSourceHelm": { + "type": "object", + "title": "ApplicationSourceHelm holds helm specific options", + "properties": { + "apiVersions": { + "description": "APIVersions specifies the Kubernetes resource API versions to pass to Helm when templating manifests. By default,\nArgo CD uses the API versions of the target cluster. The format is [group/]version/kind.", + "type": "array", + "items": { + "type": "string" + } + }, + "fileParameters": { + "type": "array", + "title": "FileParameters are file parameters to the helm template", + "items": { + "$ref": "#/definitions/v1alpha1HelmFileParameter" + } + }, + "ignoreMissingValueFiles": { + "type": "boolean", + "title": "IgnoreMissingValueFiles prevents helm template from failing when valueFiles do not exist locally by not appending them to helm template --values" + }, + "kubeVersion": { + "description": "KubeVersion specifies the Kubernetes API version to pass to Helm when templating manifests. By default, Argo CD\nuses the Kubernetes version of the target cluster.", + "type": "string" + }, + "namespace": { + "description": "Namespace is an optional namespace to template with. If left empty, defaults to the app's destination namespace.", + "type": "string" + }, + "parameters": { + "type": "array", + "title": "Parameters is a list of Helm parameters which are passed to the helm template command upon manifest generation", + "items": { + "$ref": "#/definitions/v1alpha1HelmParameter" + } + }, + "passCredentials": { + "type": "boolean", + "title": "PassCredentials pass credentials to all domains (Helm's --pass-credentials)" + }, + "releaseName": { + "type": "string", + "title": "ReleaseName is the Helm release name to use. If omitted it will use the application name" + }, + "skipCrds": { + "type": "boolean", + "title": "SkipCrds skips custom resource definition installation step (Helm's --skip-crds)" + }, + "skipSchemaValidation": { + "type": "boolean", + "title": "SkipSchemaValidation skips JSON schema validation (Helm's --skip-schema-validation)" + }, + "skipTests": { + "description": "SkipTests skips test manifest installation step (Helm's --skip-tests).", + "type": "boolean" + }, + "valueFiles": { + "type": "array", + "title": "ValuesFiles is a list of Helm value files to use when generating a template", + "items": { + "type": "string" + } + }, + "values": { + "type": "string", + "title": "Values specifies Helm values to be passed to helm template, typically defined as a block. ValuesObject takes precedence over Values, so use one or the other.\n+patchStrategy=replace" + }, + "valuesObject": { + "$ref": "#/definitions/runtimeRawExtension" + }, + "version": { + "type": "string", + "title": "Version is the Helm version to use for templating (\"3\")" + } + } + }, + "v1alpha1ApplicationSourceJsonnet": { + "type": "object", + "title": "ApplicationSourceJsonnet holds options specific to applications of type Jsonnet", + "properties": { + "extVars": { + "type": "array", + "title": "ExtVars is a list of Jsonnet External Variables", + "items": { + "$ref": "#/definitions/v1alpha1JsonnetVar" + } + }, + "libs": { + "type": "array", + "title": "Additional library search dirs", + "items": { + "type": "string" + } + }, + "tlas": { + "type": "array", + "title": "TLAS is a list of Jsonnet Top-level Arguments", + "items": { + "$ref": "#/definitions/v1alpha1JsonnetVar" + } + } + } + }, + "v1alpha1ApplicationSourceKustomize": { + "type": "object", + "title": "ApplicationSourceKustomize holds options specific to an Application source specific to Kustomize", + "properties": { + "apiVersions": { + "description": "APIVersions specifies the Kubernetes resource API versions to pass to Helm when templating manifests. By default,\nArgo CD uses the API versions of the target cluster. The format is [group/]version/kind.", + "type": "array", + "items": { + "type": "string" + } + }, + "commonAnnotations": { + "type": "object", + "title": "CommonAnnotations is a list of additional annotations to add to rendered manifests", + "additionalProperties": { + "type": "string" + } + }, + "commonAnnotationsEnvsubst": { + "type": "boolean", + "title": "CommonAnnotationsEnvsubst specifies whether to apply env variables substitution for annotation values" + }, + "commonLabels": { + "type": "object", + "title": "CommonLabels is a list of additional labels to add to rendered manifests", + "additionalProperties": { + "type": "string" + } + }, + "components": { + "type": "array", + "title": "Components specifies a list of kustomize components to add to the kustomization before building", + "items": { + "type": "string" + } + }, + "forceCommonAnnotations": { + "type": "boolean", + "title": "ForceCommonAnnotations specifies whether to force applying common annotations to resources for Kustomize apps" + }, + "forceCommonLabels": { + "type": "boolean", + "title": "ForceCommonLabels specifies whether to force applying common labels to resources for Kustomize apps" + }, + "ignoreMissingComponents": { + "type": "boolean", + "title": "IgnoreMissingComponents prevents kustomize from failing when components do not exist locally by not appending them to kustomization file" + }, + "images": { + "type": "array", + "title": "Images is a list of Kustomize image override specifications", + "items": { + "type": "string" + } + }, + "kubeVersion": { + "description": "KubeVersion specifies the Kubernetes API version to pass to Helm when templating manifests. By default, Argo CD\nuses the Kubernetes version of the target cluster.", + "type": "string" + }, + "labelIncludeTemplates": { + "type": "boolean", + "title": "LabelIncludeTemplates specifies whether to apply common labels to resource templates or not" + }, + "labelWithoutSelector": { + "type": "boolean", + "title": "LabelWithoutSelector specifies whether to apply common labels to resource selectors or not" + }, + "namePrefix": { + "type": "string", + "title": "NamePrefix is a prefix appended to resources for Kustomize apps" + }, + "nameSuffix": { + "type": "string", + "title": "NameSuffix is a suffix appended to resources for Kustomize apps" + }, + "namespace": { + "type": "string", + "title": "Namespace sets the namespace that Kustomize adds to all resources" + }, + "patches": { + "type": "array", + "title": "Patches is a list of Kustomize patches", + "items": { + "$ref": "#/definitions/v1alpha1KustomizePatch" + } + }, + "replicas": { + "type": "array", + "title": "Replicas is a list of Kustomize Replicas override specifications", + "items": { + "$ref": "#/definitions/v1alpha1KustomizeReplica" + } + }, + "version": { + "type": "string", + "title": "Version controls which version of Kustomize to use for rendering manifests" + } + } + }, + "v1alpha1ApplicationSourcePlugin": { + "type": "object", + "title": "ApplicationSourcePlugin holds options specific to config management plugins", + "properties": { + "env": { + "type": "array", + "items": { + "$ref": "#/definitions/applicationv1alpha1EnvEntry" + } + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1ApplicationSourcePluginParameter" + } + } + } + }, + "v1alpha1ApplicationSourcePluginParameter": { + "type": "object", + "properties": { + "array": { + "description": "Array is the value of an array type parameter.", + "type": "array", + "items": { + "type": "string" + } + }, + "map": { + "description": "Map is the value of a map type parameter.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "Name is the name identifying a parameter.", + "type": "string" + }, + "string": { + "description": "String_ is the value of a string type parameter.", + "type": "string" + } + } + }, + "v1alpha1ApplicationSpec": { + "description": "ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision.", + "type": "object", + "properties": { + "destination": { + "$ref": "#/definitions/v1alpha1ApplicationDestination" + }, + "ignoreDifferences": { + "type": "array", + "title": "IgnoreDifferences is a list of resources and their fields which should be ignored during comparison", + "items": { + "$ref": "#/definitions/v1alpha1ResourceIgnoreDifferences" + } + }, + "info": { + "type": "array", + "title": "Info contains a list of information (URLs, email addresses, and plain text) that relates to the application", + "items": { + "$ref": "#/definitions/v1alpha1Info" + } + }, + "project": { + "description": "Project is a reference to the project this application belongs to.\nThe empty string means that application belongs to the 'default' project.", + "type": "string" + }, + "revisionHistoryLimit": { + "description": "RevisionHistoryLimit limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions.\nThis should only be changed in exceptional circumstances.\nSetting to zero will store no history. This will reduce storage used.\nIncreasing will increase the space used to store the history, so we do not recommend increasing it.\nDefault is 10.", + "type": "integer", + "format": "int64" + }, + "source": { + "$ref": "#/definitions/v1alpha1ApplicationSource" + }, + "sourceHydrator": { + "$ref": "#/definitions/v1alpha1SourceHydrator" + }, + "sources": { + "type": "array", + "title": "Sources is a reference to the location of the application's manifests or chart", + "items": { + "$ref": "#/definitions/v1alpha1ApplicationSource" + } + }, + "syncPolicy": { + "$ref": "#/definitions/v1alpha1SyncPolicy" + } + } + }, + "v1alpha1ApplicationStatus": { + "type": "object", + "title": "ApplicationStatus contains status information for the application", + "properties": { + "conditions": { + "type": "array", + "title": "Conditions is a list of currently observed application conditions", + "items": { + "$ref": "#/definitions/v1alpha1ApplicationCondition" + } + }, + "controllerNamespace": { + "type": "string", + "title": "ControllerNamespace indicates the namespace in which the application controller is located" + }, + "health": { + "$ref": "#/definitions/v1alpha1AppHealthStatus" + }, + "history": { + "type": "array", + "title": "History contains information about the application's sync history", + "items": { + "$ref": "#/definitions/v1alpha1RevisionHistory" + } + }, + "observedAt": { + "$ref": "#/definitions/v1Time" + }, + "operationState": { + "$ref": "#/definitions/v1alpha1OperationState" + }, + "reconciledAt": { + "$ref": "#/definitions/v1Time" + }, + "resourceHealthSource": { + "type": "string", + "title": "ResourceHealthSource indicates where the resource health status is stored: inline if not set or appTree" + }, + "resources": { + "type": "array", + "title": "Resources is a list of Kubernetes resources managed by this application", + "items": { + "$ref": "#/definitions/applicationv1alpha1ResourceStatus" + } + }, + "sourceHydrator": { + "$ref": "#/definitions/v1alpha1SourceHydratorStatus" + }, + "sourceType": { + "type": "string", + "title": "SourceType specifies the type of this application" + }, + "sourceTypes": { + "type": "array", + "title": "SourceTypes specifies the type of the sources included in the application", + "items": { + "type": "string" + } + }, + "summary": { + "$ref": "#/definitions/v1alpha1ApplicationSummary" + }, + "sync": { + "$ref": "#/definitions/v1alpha1SyncStatus" + } + } + }, + "v1alpha1ApplicationSummary": { + "type": "object", + "title": "ApplicationSummary contains information about URLs and container images used by an application", + "properties": { + "externalURLs": { + "description": "ExternalURLs holds all external URLs of application child resources.", + "type": "array", + "items": { + "type": "string" + } + }, + "images": { + "description": "Images holds all images of application child resources.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1alpha1ApplicationTree": { + "description": "ApplicationTree represents the hierarchical structure of resources associated with an Argo CD application.", + "type": "object", + "properties": { + "hosts": { + "description": "Hosts provides a list of Kubernetes nodes that are running pods related to the application.", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1HostInfo" + } + }, + "nodes": { + "description": "Nodes contains a list of resources that are either directly managed by the application\nor are children of directly managed resources.", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1ResourceNode" + } + }, + "orphanedNodes": { + "description": "OrphanedNodes contains resources that exist in the same namespace as the application\nbut are not managed by it. This list is populated only if orphaned resource tracking\nis enabled in the application's project settings.", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1ResourceNode" + } + }, + "shardsCount": { + "description": "ShardsCount represents the total number of shards the application tree is split into.\nThis is used to distribute resource processing across multiple shards.", + "type": "integer", + "format": "int64" + } + } + }, + "v1alpha1ApplicationWatchEvent": { + "description": "ApplicationWatchEvent contains information about application change.", + "type": "object", + "properties": { + "application": { + "$ref": "#/definitions/v1alpha1Application" + }, + "type": { + "type": "string" + } + } + }, + "v1alpha1Backoff": { + "type": "object", + "title": "Backoff is the backoff strategy to use on subsequent retries for failing syncs", + "properties": { + "duration": { + "type": "string", + "title": "Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. \"2m\", \"1h\")" + }, + "factor": { + "type": "integer", + "format": "int64", + "title": "Factor is a factor to multiply the base duration after each failed retry" + }, + "maxDuration": { + "type": "string", + "title": "MaxDuration is the maximum amount of time allowed for the backoff strategy" + } + } + }, + "v1alpha1BasicAuthBitbucketServer": { + "description": "BasicAuthBitbucketServer defines the username/(password or personal access token) for Basic auth.", + "type": "object", + "properties": { + "passwordRef": { + "$ref": "#/definitions/v1alpha1SecretRef" + }, + "username": { + "type": "string", + "title": "Username for Basic auth" + } + } + }, + "v1alpha1BearerTokenBitbucket": { + "description": "BearerTokenBitbucket defines the Bearer token for BitBucket AppToken auth.", + "type": "object", + "properties": { + "tokenRef": { + "$ref": "#/definitions/v1alpha1SecretRef" + } + } + }, + "v1alpha1BearerTokenBitbucketCloud": { + "description": "BearerTokenBitbucketCloud defines the Bearer token for BitBucket AppToken auth.", + "type": "object", + "properties": { + "tokenRef": { + "$ref": "#/definitions/v1alpha1SecretRef" + } + } + }, + "v1alpha1ChartDetails": { + "type": "object", + "title": "ChartDetails contains helm chart metadata for a specific version", + "properties": { + "description": { + "type": "string" + }, + "home": { + "type": "string", + "title": "The URL of this projects home page, e.g. \"http://example.com\"" + }, + "maintainers": { + "type": "array", + "title": "List of maintainer details, name and email, e.g. [\"John Doe \"]", + "items": { + "type": "string" + } + } + } + }, + "v1alpha1Cluster": { + "type": "object", + "title": "Cluster is the definition of a cluster resource", + "properties": { + "annotations": { + "type": "object", + "title": "Annotations for cluster secret metadata", + "additionalProperties": { + "type": "string" + } + }, + "clusterResources": { + "description": "Indicates if cluster level resources should be managed. This setting is used only if cluster is connected in a namespaced mode.", + "type": "boolean" + }, + "config": { + "$ref": "#/definitions/v1alpha1ClusterConfig" + }, + "connectionState": { + "$ref": "#/definitions/v1alpha1ConnectionState" + }, + "info": { + "$ref": "#/definitions/v1alpha1ClusterInfo" + }, + "labels": { + "type": "object", + "title": "Labels for cluster secret metadata", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string", + "title": "Name of the cluster. If omitted, will use the server address" + }, + "namespaces": { + "description": "Holds list of namespaces which are accessible in that cluster. Cluster level resources will be ignored if namespace list is not empty.", + "type": "array", + "items": { + "type": "string" + } + }, + "project": { + "type": "string", + "title": "Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity" + }, + "refreshRequestedAt": { + "$ref": "#/definitions/v1Time" + }, + "server": { + "type": "string", + "title": "Server is the API server URL of the Kubernetes cluster" + }, + "serverVersion": { + "type": "string", + "title": "Deprecated: use Info.ServerVersion field instead.\nThe server version" + }, + "shard": { + "description": "Shard contains optional shard number. Calculated on the fly by the application controller if not specified.", + "type": "integer", + "format": "int64" + } + } + }, + "v1alpha1ClusterCacheInfo": { + "type": "object", + "title": "ClusterCacheInfo contains information about the cluster cache", + "properties": { + "apisCount": { + "type": "integer", + "format": "int64", + "title": "APIsCount holds number of observed Kubernetes API count" + }, + "lastCacheSyncTime": { + "$ref": "#/definitions/v1Time" + }, + "resourcesCount": { + "type": "integer", + "format": "int64", + "title": "ResourcesCount holds number of observed Kubernetes resources" + } + } + }, + "v1alpha1ClusterConfig": { + "description": "ClusterConfig is the configuration attributes. This structure is subset of the go-client\nrest.Config with annotations added for marshalling.", + "type": "object", + "properties": { + "awsAuthConfig": { + "$ref": "#/definitions/v1alpha1AWSAuthConfig" + }, + "bearerToken": { + "description": "Server requires Bearer authentication. This client will not attempt to use\nrefresh tokens for an OAuth2 flow.\nTODO: demonstrate an OAuth2 compatible client.", + "type": "string" + }, + "disableCompression": { + "description": "DisableCompression bypasses automatic GZip compression requests to the server.", + "type": "boolean" + }, + "execProviderConfig": { + "$ref": "#/definitions/v1alpha1ExecProviderConfig" + }, + "password": { + "type": "string" + }, + "proxyUrl": { + "type": "string", + "title": "ProxyURL is the URL to the proxy to be used for all requests send to the server" + }, + "tlsClientConfig": { + "$ref": "#/definitions/v1alpha1TLSClientConfig" + }, + "username": { + "type": "string", + "title": "Server requires Basic authentication" + } + } + }, + "v1alpha1ClusterGenerator": { + "description": "ClusterGenerator defines a generator to match against clusters registered with ArgoCD.", + "type": "object", + "properties": { + "flatList": { + "type": "boolean", + "title": "returns the clusters a single 'clusters' value in the template" + }, + "selector": { + "$ref": "#/definitions/v1LabelSelector" + }, + "template": { + "$ref": "#/definitions/v1alpha1ApplicationSetTemplate" + }, + "values": { + "type": "object", + "title": "Values contains key/value pairs which are passed directly as parameters to the template", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1alpha1ClusterInfo": { + "type": "object", + "title": "ClusterInfo contains information about the cluster", + "properties": { + "apiVersions": { + "type": "array", + "title": "APIVersions contains list of API versions supported by the cluster", + "items": { + "type": "string" + } + }, + "applicationsCount": { + "type": "integer", + "format": "int64", + "title": "ApplicationsCount is the number of applications managed by Argo CD on the cluster" + }, + "cacheInfo": { + "$ref": "#/definitions/v1alpha1ClusterCacheInfo" + }, + "connectionState": { + "$ref": "#/definitions/v1alpha1ConnectionState" + }, + "serverVersion": { + "type": "string", + "title": "ServerVersion contains information about the Kubernetes version of the cluster" + } + } + }, + "v1alpha1ClusterList": { + "description": "ClusterList is a collection of Clusters.", + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1Cluster" + } + }, + "metadata": { + "$ref": "#/definitions/v1ListMeta" + } + } + }, + "v1alpha1Command": { + "type": "object", + "title": "Command holds binary path and arguments list", + "properties": { + "args": { + "type": "array", + "items": { + "type": "string" + } + }, + "command": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1alpha1ComparedTo": { + "type": "object", + "title": "ComparedTo contains application source and target which was used for resources comparison", + "properties": { + "destination": { + "$ref": "#/definitions/v1alpha1ApplicationDestination" + }, + "ignoreDifferences": { + "type": "array", + "title": "IgnoreDifferences is a reference to the application's ignored differences used for comparison", + "items": { + "$ref": "#/definitions/v1alpha1ResourceIgnoreDifferences" + } + }, + "source": { + "$ref": "#/definitions/v1alpha1ApplicationSource" + }, + "sources": { + "type": "array", + "title": "Sources is a reference to the application's multiple sources used for comparison", + "items": { + "$ref": "#/definitions/v1alpha1ApplicationSource" + } + } + } + }, + "v1alpha1ConfigManagementPlugin": { + "type": "object", + "title": "ConfigManagementPlugin contains config management plugin configuration", + "properties": { + "generate": { + "$ref": "#/definitions/v1alpha1Command" + }, + "init": { + "$ref": "#/definitions/v1alpha1Command" + }, + "lockRepo": { + "type": "boolean" + }, + "name": { + "type": "string" + } + } + }, + "v1alpha1ConfigMapKeyRef": { + "description": "Utility struct for a reference to a configmap key.", + "type": "object", + "properties": { + "configMapName": { + "type": "string" + }, + "key": { + "type": "string" + } + } + }, + "v1alpha1ConnectionState": { + "type": "object", + "title": "ConnectionState contains information about remote resource connection state, currently used for clusters and repositories", + "properties": { + "attemptedAt": { + "$ref": "#/definitions/v1Time" + }, + "message": { + "type": "string", + "title": "Message contains human readable information about the connection status" + }, + "status": { + "type": "string", + "title": "Status contains the current status indicator for the connection" + } + } + }, + "v1alpha1DrySource": { + "description": "DrySource specifies a location for dry \"don't repeat yourself\" manifest source information.", + "type": "object", + "properties": { + "path": { + "type": "string", + "title": "Path is a directory path within the Git repository where the manifests are located" + }, + "repoURL": { + "type": "string", + "title": "RepoURL is the URL to the git repository that contains the application manifests" + }, + "targetRevision": { + "type": "string", + "title": "TargetRevision defines the revision of the source to hydrate" + } + } + }, + "v1alpha1DuckTypeGenerator": { + "description": "DuckType defines a generator to match against clusters registered with ArgoCD.", + "type": "object", + "properties": { + "configMapRef": { + "type": "string", + "title": "ConfigMapRef is a ConfigMap with the duck type definitions needed to retrieve the data\n this includes apiVersion(group/version), kind, matchKey and validation settings\nName is the resource name of the kind, group and version, defined in the ConfigMapRef\nRequeueAfterSeconds is how long before the duckType will be rechecked for a change" + }, + "labelSelector": { + "$ref": "#/definitions/v1LabelSelector" + }, + "name": { + "type": "string" + }, + "requeueAfterSeconds": { + "type": "integer", + "format": "int64" + }, + "template": { + "$ref": "#/definitions/v1alpha1ApplicationSetTemplate" + }, + "values": { + "type": "object", + "title": "Values contains key/value pairs which are passed directly as parameters to the template", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1alpha1ExecProviderConfig": { + "type": "object", + "title": "ExecProviderConfig is config used to call an external command to perform cluster authentication\nSee: https://godoc.org/k8s.io/client-go/tools/clientcmd/api#ExecConfig", + "properties": { + "apiVersion": { + "type": "string", + "title": "Preferred input version of the ExecInfo" + }, + "args": { + "type": "array", + "title": "Arguments to pass to the command when executing it", + "items": { + "type": "string" + } + }, + "command": { + "type": "string", + "title": "Command to execute" + }, + "env": { + "type": "object", + "title": "Env defines additional environment variables to expose to the process", + "additionalProperties": { + "type": "string" + } + }, + "installHint": { + "type": "string", + "title": "This text is shown to the user when the executable doesn't seem to be present" + } + } + }, + "v1alpha1GitDirectoryGeneratorItem": { + "type": "object", + "properties": { + "exclude": { + "type": "boolean" + }, + "path": { + "type": "string" + } + } + }, + "v1alpha1GitFileGeneratorItem": { + "type": "object", + "properties": { + "exclude": { + "type": "boolean" + }, + "path": { + "type": "string" + } + } + }, + "v1alpha1GitGenerator": { + "type": "object", + "properties": { + "directories": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1GitDirectoryGeneratorItem" + } + }, + "files": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1GitFileGeneratorItem" + } + }, + "pathParamPrefix": { + "type": "string" + }, + "repoURL": { + "type": "string" + }, + "requeueAfterSeconds": { + "type": "integer", + "format": "int64" diff --git a/src/ArgoCD/Api/AbstractApi.php b/src/ArgoCD/Api/AbstractApi.php new file mode 100644 index 00000000000..de44f1e687f --- /dev/null +++ b/src/ArgoCD/Api/AbstractApi.php @@ -0,0 +1,211 @@ +client = $client; + } + + /** + * Get the client instance. + * + * @return Client + */ + protected function getClient(): Client + { + return $this->client; + } + + /** + * @return $this + */ + public function configure() + { + // Kept as a no-op or simple method returning $this + return $this; + } + + /** + * Send a GET request with query parameters. + * + * @param string $path Request path. + * @param array $parameters GET parameters. + * @param array $requestHeaders Request Headers. + * + * @return array|string + */ + protected function get(string $path, array $parameters = [], array $requestHeaders = []) + { + // Removed $perPage logic + // Removed 'ref' parameter logic as it's GitHub specific + + if (count($parameters) > 0) { + $path .= '?'.http_build_query($parameters, '', '&', PHP_QUERY_RFC3986); + } + + $response = $this->client->getHttpClient()->get($path, $requestHeaders); + + return ResponseMediator::getContent($response); + } + + /** + * Send a HEAD request with query parameters. + * + * @param string $path Request path. + * @param array $parameters HEAD parameters. + * @param array $requestHeaders Request headers. + * + * @return ResponseInterface + */ + protected function head(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface + { + // Removed 'ref' parameter logic + $queryString = ''; + if (count($parameters) > 0) { + $queryString = '?'.http_build_query($parameters, '', '&', PHP_QUERY_RFC3986); + } + return $this->client->getHttpClient()->head($path.$queryString, $requestHeaders); + } + + /** + * Send a POST request with JSON-encoded parameters. + * + * @param string $path Request path. + * @param array $parameters POST parameters to be JSON encoded. + * @param array $requestHeaders Request headers. + * + * @return array|string + */ + protected function post(string $path, array $parameters = [], array $requestHeaders = []) + { + return $this->postRaw( + $path, + $this->createJsonBody($parameters), + $requestHeaders + ); + } + + /** + * Send a POST request with raw data. + * + * @param string $path Request path. + * @param string|null $body Request body. + * @param array $requestHeaders Request headers. + * + * @return array|string + */ + protected function postRaw(string $path, $body, array $requestHeaders = []) + { + $response = $this->client->getHttpClient()->post( + $path, + $requestHeaders, + $body + ); + + return ResponseMediator::getContent($response); + } + + /** + * Send a PATCH request with JSON-encoded parameters. + * + * @param string $path Request path. + * @param array $parameters POST parameters to be JSON encoded. + * @param array $requestHeaders Request headers. + * + * @return array|string + */ + protected function patch(string $path, array $parameters = [], array $requestHeaders = []) + { + $response = $this->client->getHttpClient()->patch( + $path, + $requestHeaders, + $this->createJsonBody($parameters) + ); + + return ResponseMediator::getContent($response); + } + + /** + * Send a PUT request with JSON-encoded parameters. + * + * @param string $path Request path. + * @param array $parameters POST parameters to be JSON encoded. + * @param array $requestHeaders Request headers. + * + * @return array|string + */ + protected function put(string $path, array $parameters = [], array $requestHeaders = []) + { + $response = $this->client->getHttpClient()->put( + $path, + $requestHeaders, + $this->createJsonBody($parameters) + ); + + return ResponseMediator::getContent($response); + } + + /** + * Send a DELETE request with JSON-encoded parameters. + * + * @param string $path Request path. + * @param array $parameters POST parameters to be JSON encoded. + * @param array $requestHeaders Request headers. + * + * @return array|string + */ + protected function delete(string $path, array $parameters = [], array $requestHeaders = []) + { + // ArgoCD DELETE requests might not always have a body. + // If parameters are provided, assume they are for the body. + // If not, send null as the body. + $body = null; + if (count($parameters) > 0) { + $body = $this->createJsonBody($parameters); + } + + $response = $this->client->getHttpClient()->delete( + $path, + $requestHeaders, + $body + ); + + return ResponseMediator::getContent($response); + } + + /** + * Create a JSON encoded version of an array of parameters. + * + * @param array $parameters Request parameters + * + * @return string|null + */ + protected function createJsonBody(array $parameters): ?string + { + // Ensure empty array results in null, not "[]" for some ArgoCD endpoints if they expect no body. + // However, for POST/PUT/PATCH, an empty JSON object "{}" might be valid. + // The original behavior is to return null for empty arrays, which is generally fine. + return (count($parameters) === 0) ? null : json_encode($parameters, empty($parameters) ? JSON_FORCE_OBJECT : 0); + } +} diff --git a/src/ArgoCD/Api/AccountService.php b/src/ArgoCD/Api/AccountService.php new file mode 100644 index 00000000000..b48f83d3cba --- /dev/null +++ b/src/ArgoCD/Api/AccountService.php @@ -0,0 +1,124 @@ +get('/api/v1/account'); + return new AccountAccountsList($responseArray); + } + + /** + * Corresponds to AccountService_CanI + * Checks if the current account has permission to perform an action. + * + * @param string $resource + * @param string $action + * @param string $subresource + * @return AccountCanIResponse + * @throws \ArgoCD\Exception\RuntimeException + */ + public function canI(string $resource, string $action, string $subresource): AccountCanIResponse + { + // The response for can-i is typically a raw string "yes" or "no". + // The AbstractApi::get method expects JSON. + // We need to handle this: either get() should allow raw responses, + // or this method needs to handle potential JSON decode errors if the response isn't JSON. + // For now, assuming get() returns the raw string if not JSON, + // and AccountCanIResponse constructor can handle it. + $response = $this->get(sprintf("/api/v1/account/can-i/%s/%s/%s", rawurlencode($resource), rawurlencode($action), rawurlencode($subresource))); + + // If $response is a string from get(), AccountCanIResponse constructor is designed to handle it. + // If $response is an array (e.g. {'value': 'yes'}), it also handles it. + return new AccountCanIResponse(is_array($response) ? $response : ['value' => $response]); + } + + /** + * Corresponds to AccountService_UpdatePassword + * Updates the password for the current account or a specified account. + * + * @param string $name The name of the account to update. If updating the current user's password, this might be the username. + * @param string $currentPassword The current password. + * @param string $newPassword The new password. + * @return AccountUpdatePasswordResponse + * @throws \ArgoCD\Exception\RuntimeException + */ + public function updatePassword(string $name, string $currentPassword, string $newPassword): AccountUpdatePasswordResponse + { + $requestModel = new AccountUpdatePasswordRequest(); + $requestModel->setName($name); // Name of the account being updated + $requestModel->setCurrentPassword($currentPassword); + $requestModel->setNewPassword($newPassword); + + $responseArray = $this->put('/api/v1/account/password', $requestModel->toArray()); + return new AccountUpdatePasswordResponse($responseArray ?: []); // Response might be empty + } + + /** + * Corresponds to AccountService_GetAccount + * Gets information about a specific account. + * + * @param string $name The name of the account. + * @return AccountAccount + * @throws \ArgoCD\Exception\RuntimeException + */ + public function getAccount(string $name): AccountAccount + { + $responseArray = $this->get(sprintf("/api/v1/account/%s", rawurlencode($name))); + return new AccountAccount($responseArray); + } + + /** + * Corresponds to AccountService_CreateToken + * Creates a new token for the specified account. + * + * @param string $accountName The name of the account. + * @param string $tokenId The desired ID/name for the token. + * @param string $tokenDescription A description for the token. + * @param string|null $expiresIn Duration string for token expiration (e.g., "30d", "24h", "0" for non-expiring). + * @return AccountCreateTokenResponse + * @throws \ArgoCD\Exception\RuntimeException + */ + public function createToken(string $accountName, string $tokenId, string $tokenDescription, ?string $expiresIn = "0"): AccountCreateTokenResponse + { + $requestModel = new AccountCreateTokenRequest(); + $requestModel->setId($tokenId); // This 'id' is the token's identifier + $requestModel->setName($tokenDescription); // This 'name' is the token's description + $requestModel->setExpiresIn($expiresIn); + + $responseArray = $this->post(sprintf("/api/v1/account/%s/token", rawurlencode($accountName)), $requestModel->toArray()); + return new AccountCreateTokenResponse($responseArray); + } + + /** + * Corresponds to AccountService_DeleteToken + * Deletes a token for the specified account. + * + * @param string $accountName The name of the account. + * @param string $tokenId The ID of the token to delete. + * @return AccountEmptyResponse + * @throws \ArgoCD\Exception\RuntimeException + */ + public function deleteToken(string $accountName, string $tokenId): AccountEmptyResponse + { + $responseArray = $this->delete(sprintf("/api/v1/account/%s/token/%s", rawurlencode($accountName), rawurlencode($tokenId))); + return new AccountEmptyResponse($responseArray ?: []); // Response is typically empty + } +} diff --git a/src/ArgoCD/Api/ApplicationService.php b/src/ArgoCD/Api/ApplicationService.php new file mode 100644 index 00000000000..1ca5658228b --- /dev/null +++ b/src/ArgoCD/Api/ApplicationService.php @@ -0,0 +1,7 @@ +setUsername($username); + $requestModel->setPassword($password); + + $responseArray = $this->post('/api/v1/session', $requestModel->toArray()); + + return new SessionSessionResponse($responseArray); + } + + /** + * Corresponds to SessionService_Delete + * Deletes the current session. + * + * @return SessionSessionResponse + * @throws \ArgoCD\Exception\RuntimeException + */ + public function delete(): SessionSessionResponse + { + // The OpenAPI spec for delete /api/v1/session indicates a 200 response with sessionSessionResponse. + // This is unusual for a DELETE operation (typically 204 No Content or an empty body), + // but we will follow the spec. + $responseArray = $this->delete('/api/v1/session'); + + // If the response is truly empty (which is more typical for DELETE), + // instantiating SessionSessionResponse with an empty array will result in a model with a null token. + return new SessionSessionResponse($responseArray ?: []); + } + + /** + * Corresponds to SessionService_GetUserInfo + * Gets information about the current user. + * + * @return SessionGetUserInfoResponse + * @throws \ArgoCD\Exception\RuntimeException + */ + public function getUserInfo(): SessionGetUserInfoResponse + { + $responseArray = $this->get('/api/v1/session/userinfo'); + + return new SessionGetUserInfoResponse($responseArray); + } +} diff --git a/src/ArgoCD/AuthMethod.php b/src/ArgoCD/AuthMethod.php new file mode 100644 index 00000000000..dc2ceb0c38b --- /dev/null +++ b/src/ArgoCD/AuthMethod.php @@ -0,0 +1,7 @@ +responseHistory = new History(); + $this->httpClientBuilder = $builder = $httpClientBuilder ?? new Builder(); + + $builder->addPlugin(new ExceptionThrower()); + $builder->addPlugin(new Plugin\HistoryPlugin($this->responseHistory)); + $builder->addPlugin(new Plugin\RedirectPlugin()); + + if (null === $serverUrl) { + throw new InvalidArgumentException('Server URL is required to instantiate the ArgoCD client.'); + } + + $uri = Psr17FactoryDiscovery::findUriFactory()->createUri($serverUrl); + $builder->addPlugin(new Plugin\AddHostPlugin($uri)); + $builder->addPlugin(new Plugin\PathPrepend('/api/v1')); + + $builder->addPlugin(new Plugin\HeaderDefaultsPlugin([ + 'User-Agent' => 'argocd-php-client (https://github.com/your-vendor/argocd-php-client)', + 'Accept' => 'application/json', + ])); + } + + /** + * Create a ArgoCD\Client using a HTTP client. + * + * @param ClientInterface $httpClient + * @param string|null $serverUrl + * @return Client + */ + public static function createWithHttpClient(ClientInterface $httpClient, ?string $serverUrl = null): self + { + $builder = new Builder($httpClient); + // Allow serverUrl to be passed here for consistency, or ensure it's set later. + if ($serverUrl === null) { + // Or throw an exception if serverUrl is strictly required at this point + // For now, assuming it can be null and might be set via constructor or setServerUrl + } + return new self($serverUrl, $builder); + } + + /** + * @param string $name + * + * @throws InvalidArgumentException + * + * @return AbstractApi + */ + public function api($name): AbstractApi + { + switch (strtolower($name)) { + case 'session': + case 'sessionservice': + $api = new Api\SessionService($this); + break; + case 'application': + case 'applicationservice': + $api = new Api\ApplicationService($this); + break; + case 'account': + case 'accountservice': + $api = new Api\AccountService($this); + break; + default: + throw new InvalidArgumentException(sprintf('Undefined api instance called: "%s"', $name)); + } + + return $api; + } + + /** + * Authenticate a user for all next requests. + * + * @param string $usernameOrToken ArgoCD username or a pre-existing Bearer token + * @param string|null $password ArgoCD password (if username is provided) + * + * @throws InvalidArgumentException If username/password authentication fails or token is invalid. + * @throws \ArgoCD\Exception\RuntimeException For API errors. + * + * @return void + */ + public function authenticate(string $usernameOrToken, ?string $password = null): void + { + $this->getHttpClientBuilder()->removePlugin(Authentication::class); // Remove any existing auth plugin + + if ($password !== null) { + // Username/password authentication + $sessionService = new SessionService($this); + $sessionResponse = $sessionService->create($usernameOrToken, $password); + $this->token = $sessionResponse->getToken(); + + if (empty($this->token)) { + throw new InvalidArgumentException('Authentication failed: Could not retrieve token with the provided username and password.'); + } + } else { + // Direct token authentication + $this->token = $usernameOrToken; + } + + if (empty($this->token)) { + throw new InvalidArgumentException('Authentication failed: Token cannot be empty.'); + } + + $this->getHttpClientBuilder()->addPlugin(new Authentication($this->token, AuthMethod::BEARER_TOKEN)); + } + + /** + * Get the currently stored token. + * + * @return string|null + */ + public function getToken(): ?string + { + return $this->token; + } + + /** + * Sets the URL of your ArgoCD API server instance. + * + * @param string $serverUrl URL of the API in the form of http(s)://hostname or http(s)://hostname/api/v1 + * + * @return void + */ + public function setServerUrl(string $serverUrl): void + { + $builder = $this->getHttpClientBuilder(); + $builder->removePlugin(Plugin\AddHostPlugin::class); + $builder->removePlugin(Plugin\PathPrepend::class); + + $uri = Psr17FactoryDiscovery::findUriFactory()->createUri($serverUrl); + $builder->addPlugin(new Plugin\AddHostPlugin($uri)); + + if (strpos($serverUrl, '/api/v1') === false) { + $builder->addPlugin(new Plugin\PathPrepend('/api/v1')); + } + } + + /** + * @param string $name + * @param array $args + * + * @return AbstractApi + */ + public function __call($name, $args): AbstractApi + { + try { + return $this->api($name); + } catch (InvalidArgumentException $e) { + throw new BadMethodCallException(sprintf('Undefined method called: "%s"', $name)); + } + } + + /** + * @return null|ResponseInterface + */ + public function getLastResponse(): ?ResponseInterface + { + return $this->responseHistory->getLastResponse(); + } + + /** + * @return HttpMethodsClientInterface + */ + public function getHttpClient(): HttpMethodsClientInterface + { + return $this->getHttpClientBuilder()->getHttpClient(); + } + + /** + * @return Builder + */ + protected function getHttpClientBuilder(): Builder + { + return $this->httpClientBuilder; + } +} diff --git a/src/ArgoCD/Exception/BadMethodCallException.php b/src/ArgoCD/Exception/BadMethodCallException.php new file mode 100644 index 00000000000..1a34b298614 --- /dev/null +++ b/src/ArgoCD/Exception/BadMethodCallException.php @@ -0,0 +1,4 @@ +errors = $errors; + } + + public function getErrors(): array + { + return $this->errors; + } +} diff --git a/src/ArgoCD/HttpClient/Builder.php b/src/ArgoCD/HttpClient/Builder.php new file mode 100644 index 00000000000..83e245018bf --- /dev/null +++ b/src/ArgoCD/HttpClient/Builder.php @@ -0,0 +1,176 @@ +httpClient = $httpClient ?? Psr18ClientDiscovery::find(); + $this->requestFactory = $requestFactory ?? Psr17FactoryDiscovery::findRequestFactory(); + $this->streamFactory = $streamFactory ?? Psr17FactoryDiscovery::findStreamFactory(); + } + + /** + * @return HttpMethodsClientInterface + */ + public function getHttpClient(): HttpMethodsClientInterface + { + if ($this->httpClientModified) { + $this->httpClientModified = false; + + $plugins = $this->plugins; + // Removed cache plugin logic + + $this->pluginClient = new HttpMethodsClient( + (new PluginClientFactory())->createClient($this->httpClient, $plugins), + $this->requestFactory, + $this->streamFactory + ); + } + + return $this->pluginClient; + } + + /** + * Add a new plugin to the end of the plugin chain. + * + * @param Plugin $plugin + * + * @return void + */ + public function addPlugin(Plugin $plugin): void + { + $this->plugins[] = $plugin; + $this->httpClientModified = true; + } + + /** + * Remove a plugin by its fully qualified class name (FQCN). + * + * @param string $fqcn + * + * @return void + */ + public function removePlugin(string $fqcn): void + { + foreach ($this->plugins as $idx => $plugin) { + if ($plugin instanceof $fqcn) { + unset($this->plugins[$idx]); + $this->httpClientModified = true; + } + } + } + + /** + * Clears used headers. + * + * @return void + */ + public function clearHeaders(): void + { + $this->headers = []; + + $this->removePlugin(Plugin\HeaderAppendPlugin::class); + // Ensure HeaderAppendPlugin is added only if there are headers to append. + // Or, rely on HeaderDefaultsPlugin in Client.php for default headers. + // For now, mimicking the original behavior of always adding it. + $this->addPlugin(new Plugin\HeaderAppendPlugin($this->headers)); + } + + /** + * @param array $headers + * + * @return void + */ + public function addHeaders(array $headers): void + { + $this->headers = array_merge($this->headers, $headers); + + $this->removePlugin(Plugin\HeaderAppendPlugin::class); + $this->addPlugin(new Plugin\HeaderAppendPlugin($this->headers)); + } + + /** + * @param string $header + * @param string $headerValue + * + * @return void + */ + public function addHeaderValue(string $header, string $headerValue): void + { + if (!isset($this->headers[$header])) { + $this->headers[$header] = $headerValue; + } else { + $this->headers[$header] = array_merge((array) $this->headers[$header], [$headerValue]); + } + + $this->removePlugin(Plugin\HeaderAppendPlugin::class); + $this->addPlugin(new Plugin\HeaderAppendPlugin($this->headers)); + } +} diff --git a/src/ArgoCD/HttpClient/Message/ResponseMediator.php b/src/ArgoCD/HttpClient/Message/ResponseMediator.php new file mode 100644 index 00000000000..37c6147ebb4 --- /dev/null +++ b/src/ArgoCD/HttpClient/Message/ResponseMediator.php @@ -0,0 +1,47 @@ +getBody()->__toString(); + // ArgoCD API primarily uses JSON. + if (strpos($response->getHeaderLine('Content-Type'), 'application/json') === 0) { + $content = json_decode($body, true); + if (JSON_ERROR_NONE === json_last_error()) { + return $content; + } + } + + return $body; // Return raw body if not JSON or if JSON decoding fails + } + + /** + * Get the value for a single header. + * (Kept as it might be useful, though ArgoCD pagination is typically cursor-based or not via Link headers) + * + * @param ResponseInterface $response + * @param string $name + * + * @return string|null + */ + public static function getHeader(ResponseInterface $response, string $name): ?string + { + $headers = $response->getHeader($name); + + return array_shift($headers); + } + + // Removed getPagination() and getApiLimit() as they are GitHub specific. + // ArgoCD error handling and rate limiting (if any) will be handled differently. +} diff --git a/src/ArgoCD/HttpClient/Plugin/ArgoCdExceptionThrower.php b/src/ArgoCD/HttpClient/Plugin/ArgoCdExceptionThrower.php new file mode 100644 index 00000000000..3f15abcfc27 --- /dev/null +++ b/src/ArgoCD/HttpClient/Plugin/ArgoCdExceptionThrower.php @@ -0,0 +1,38 @@ +then(function (ResponseInterface $response) { + if ($response->getStatusCode() < 400) { + return $response; + } + + $content = ResponseMediator::getContent($response); + + if (is_array($content) && isset($content['error'])) { + $errorMessage = $content['message'] ?? ($content['error'] ?? $response->getReasonPhrase()); + $errorCode = $content['code'] ?? $response->getStatusCode(); + + // Example: Check for a specific type of error if ArgoCD provides such details + // For instance, if a 400 error with a specific 'error' field means validation failed + if ($response->getStatusCode() == 400 && str_contains(strtolower($errorMessage), 'validation')) { + throw new ValidationFailedException('Validation Failed: ' . $errorMessage, $response->getStatusCode(), null, $content['details'] ?? []); + } + + throw new RuntimeException(sprintf('Error %s: %s', $errorCode, $errorMessage), $response->getStatusCode()); + } + + throw new RuntimeException(sprintf('HTTP error %d: %s', $response->getStatusCode(), $response->getReasonPhrase()), $response->getStatusCode()); + }); + } +} diff --git a/src/ArgoCD/HttpClient/Plugin/Authentication.php b/src/ArgoCD/HttpClient/Plugin/Authentication.php new file mode 100644 index 00000000000..5472f950473 --- /dev/null +++ b/src/ArgoCD/HttpClient/Plugin/Authentication.php @@ -0,0 +1,28 @@ +token = $token; + $this->authMethod = $method; + } + + public function handleRequest(\Psr\Http\Message\RequestInterface $request, callable $next, callable $first): \Http\Promise\Promise + { + if ($this->authMethod === AuthMethod::BEARER_TOKEN) { + $request = $request->withHeader('Authorization', 'Bearer ' . $this->token); + } + // Potentially add other auth methods here if ArgoCD supports them + + return $next($request); + } +} diff --git a/src/ArgoCD/Model/AccountAccount.php b/src/ArgoCD/Model/AccountAccount.php new file mode 100644 index 00000000000..cf035792435 --- /dev/null +++ b/src/ArgoCD/Model/AccountAccount.php @@ -0,0 +1,55 @@ +capabilities = $data['capabilities']; + } + $this->enabled = isset($data['enabled']) ? (bool)$data['enabled'] : null; + $this->name = $data['name'] ?? null; + + if (isset($data['tokens']) && is_array($data['tokens'])) { + foreach ($data['tokens'] as $tokenData) { + if (is_array($tokenData)) { + $this->tokens[] = new AccountToken($tokenData); + } + } + } + } + + /** + * @return string[]|null + */ + public function getCapabilities(): ?array + { + return $this->capabilities; + } + + public function isEnabled(): ?bool + { + return $this->enabled; + } + + public function getName(): ?string + { + return $this->name; + } + + /** + * @return AccountToken[] + */ + public function getTokens(): array + { + return $this->tokens; + } +} diff --git a/src/ArgoCD/Model/AccountAccountsList.php b/src/ArgoCD/Model/AccountAccountsList.php new file mode 100644 index 00000000000..bca0a47f53f --- /dev/null +++ b/src/ArgoCD/Model/AccountAccountsList.php @@ -0,0 +1,39 @@ +items[] = new AccountAccount($accountData); + } + } + } + // Initialize metadata if present, e.g.: + // if (isset($data['metadata'])) { + // $this->metadata = new V1ListMeta($data['metadata']); + // } + } + + /** + * @return AccountAccount[] + */ + public function getItems(): array + { + return $this->items; + } + + // Getter for metadata if added + // public function getMetadata(): ?V1ListMeta + // { + // return $this->metadata; + // } +} diff --git a/src/ArgoCD/Model/AccountCanIResponse.php b/src/ArgoCD/Model/AccountCanIResponse.php new file mode 100644 index 00000000000..52b96bb77f9 --- /dev/null +++ b/src/ArgoCD/Model/AccountCanIResponse.php @@ -0,0 +1,28 @@ + 'the_string_response'] or the direct string. + if (isset($data['value'])) { + $this->value = (string)$data['value']; + } elseif (is_string($data)) { // Handle direct string response + $this->value = $data; + } else if (count($data) === 1 && is_string(current($data))) { // Handle if wrapped in an array with one string value + $this->value = current($data); + } + + } + + public function getValue(): ?string + { + return $this->value; + } +} diff --git a/src/ArgoCD/Model/AccountCreateTokenRequest.php b/src/ArgoCD/Model/AccountCreateTokenRequest.php new file mode 100644 index 00000000000..bde59a97eb0 --- /dev/null +++ b/src/ArgoCD/Model/AccountCreateTokenRequest.php @@ -0,0 +1,82 @@ +expiresIn = $data['expiresIn'] ?? null; + $this->id = $data['id'] ?? null; + $this->name = $data['name'] ?? null; + } + + public function setExpiresIn(?string $expiresIn): self + { + $this->expiresIn = $expiresIn; + return $this; + } + + public function setId(string $id): self + { + $this->id = $id; + return $this; + } + + public function setName(string $name): self + { + $this->name = $name; + return $this; + } + + public function getExpiresIn(): ?string + { + return $this->expiresIn; + } + + public function getId(): ?string + { + return $this->id; + } + + public function getName(): ?string + { + return $this->name; + } + + public function toArray(): array + { + $payload = []; + // According to typical ArgoCD API usage for creating tokens, + // 'name' in the path is the account name. + // 'id' in the body is the token's identifier/name. + // 'expiresIn' in the body is the token's expiration duration. + // The 'name' field in the body for this request is often used as the token's description or friendly name. + // The OpenAPI spec has 'name' in the body, which is slightly ambiguous. + // Let's assume 'id' is the token's unique ID, and 'name' (body) is a display name. + // If 'name' from the constructor is meant for the account, it shouldn't be in this payload. + // The method signature for createToken in service will have $accountName for the path. + + if ($this->id !== null) { + // This 'id' in the request body is often used as the token's name or identifier. + // The API might also have a 'name' field for a description. + // The OpenAPI spec is: properties: { expiresIn, id, name } + // Let's assume 'id' is the desired token ID, and 'name' is its description. + $payload['id'] = $this->id; + } + if ($this->name !== null) { + // This 'name' field is for the token's display name/description. + $payload['name'] = $this->name; + } + if ($this->expiresIn !== null) { + $payload['expiresIn'] = $this->expiresIn; + } else { + // Default to non-expiring if not specified, or API might require it + $payload['expiresIn'] = "0"; + } + return $payload; + } +} diff --git a/src/ArgoCD/Model/AccountCreateTokenResponse.php b/src/ArgoCD/Model/AccountCreateTokenResponse.php new file mode 100644 index 00000000000..2dd368342cc --- /dev/null +++ b/src/ArgoCD/Model/AccountCreateTokenResponse.php @@ -0,0 +1,17 @@ +token = $data['token'] ?? null; + } + + public function getToken(): ?string + { + return $this->token; + } +} diff --git a/src/ArgoCD/Model/AccountEmptyResponse.php b/src/ArgoCD/Model/AccountEmptyResponse.php new file mode 100644 index 00000000000..c871dbf8db9 --- /dev/null +++ b/src/ArgoCD/Model/AccountEmptyResponse.php @@ -0,0 +1,15 @@ +expiresAt = $data['expiresAt'] ?? null; + $this->id = $data['id'] ?? null; + $this->issuedAt = $data['issuedAt'] ?? null; + } + + public function getExpiresAt(): ?string + { + return $this->expiresAt; + } + + public function getId(): ?string + { + return $this->id; + } + + public function getIssuedAt(): ?string + { + return $this->issuedAt; + } + + // Optional: Convert expiresAt to DateTimeImmutable + public function getExpiresAtDateTime(): ?\DateTimeImmutable + { + if ($this->expiresAt === null) { + return null; + } + $dateTime = new \DateTimeImmutable(); + return $dateTime->setTimestamp((int)$this->expiresAt); + } + + // Optional: Convert issuedAt to DateTimeImmutable + public function getIssuedAtDateTime(): ?\DateTimeImmutable + { + if ($this->issuedAt === null) { + return null; + } + $dateTime = new \DateTimeImmutable(); + return $dateTime->setTimestamp((int)$this->issuedAt); + } +} diff --git a/src/ArgoCD/Model/AccountUpdatePasswordRequest.php b/src/ArgoCD/Model/AccountUpdatePasswordRequest.php new file mode 100644 index 00000000000..4b01a32297c --- /dev/null +++ b/src/ArgoCD/Model/AccountUpdatePasswordRequest.php @@ -0,0 +1,64 @@ +currentPassword = $data['currentPassword'] ?? null; + $this->name = $data['name'] ?? null; + $this->newPassword = $data['newPassword'] ?? null; + } + + public function setCurrentPassword(string $currentPassword): self + { + $this->currentPassword = $currentPassword; + return $this; + } + + public function setName(string $name): self + { + $this->name = $name; + return $this; + } + + public function setNewPassword(string $newPassword): self + { + $this->newPassword = $newPassword; + return $this; + } + + public function getCurrentPassword(): ?string + { + return $this->currentPassword; + } + + public function getName(): ?string + { + return $this->name; + } + + public function getNewPassword(): ?string + { + return $this->newPassword; + } + + public function toArray(): array + { + $payload = []; + if ($this->currentPassword !== null) { + $payload['currentPassword'] = $this->currentPassword; + } + if ($this->name !== null) { + $payload['name'] = $this->name; + } + if ($this->newPassword !== null) { + $payload['newPassword'] = $this->newPassword; + } + return $payload; + } +} diff --git a/src/ArgoCD/Model/AccountUpdatePasswordResponse.php b/src/ArgoCD/Model/AccountUpdatePasswordResponse.php new file mode 100644 index 00000000000..f3765e1166e --- /dev/null +++ b/src/ArgoCD/Model/AccountUpdatePasswordResponse.php @@ -0,0 +1,16 @@ +code = isset($data['code']) ? (int)$data['code'] : null; + $this->error = $data['error'] ?? null; + $this->message = $data['message'] ?? null; + $this->details = $data['details'] ?? null; + } + + public function getCode(): ?int + { + return $this->code; + } + + public function getError(): ?string + { + return $this->error; + } + + public function getMessage(): ?string + { + return $this->message; + } + + public function getDetails(): ?array + { + return $this->details; + } +} diff --git a/src/ArgoCD/Model/SessionGetUserInfoResponse.php b/src/ArgoCD/Model/SessionGetUserInfoResponse.php new file mode 100644 index 00000000000..4e5cebaaef2 --- /dev/null +++ b/src/ArgoCD/Model/SessionGetUserInfoResponse.php @@ -0,0 +1,44 @@ +groups = $data['groups']; + } + $this->iss = $data['iss'] ?? null; + $this->loggedIn = isset($data['loggedIn']) ? (bool)$data['loggedIn'] : null; + $this->username = $data['username'] ?? null; + } + + /** + * @return string[]|null + */ + public function getGroups(): ?array + { + return $this->groups; + } + + public function getIss(): ?string + { + return $this->iss; + } + + public function isLoggedIn(): ?bool + { + return $this->loggedIn; + } + + public function getUsername(): ?string + { + return $this->username; + } +} diff --git a/src/ArgoCD/Model/SessionSessionCreateRequest.php b/src/ArgoCD/Model/SessionSessionCreateRequest.php new file mode 100644 index 00000000000..9ca171dacea --- /dev/null +++ b/src/ArgoCD/Model/SessionSessionCreateRequest.php @@ -0,0 +1,66 @@ +password = $data['password'] ?? null; + $this->token = $data['token'] ?? null; + $this->username = $data['username'] ?? null; + } + + public function getPassword(): ?string + { + return $this->password; + } + + public function getToken(): ?string + { + return $this->token; + } + + public function getUsername(): ?string + { + return $this->username; + } + + // It might be useful to have setters for a request object + // or a method to convert to array for the request body. + public function setPassword(string $password): self + { + $this->password = $password; + return $this; + } + + public function setToken(string $token): self + { + $this->token = $token; + return $this; + } + + public function setUsername(string $username): self + { + $this->username = $username; + return $this; + } + + public function toArray(): array + { + $payload = []; + if ($this->username !== null) { + $payload['username'] = $this->username; + } + if ($this->password !== null) { + $payload['password'] = $this->password; + } + if ($this->token !== null) { + $payload['token'] = $this->token; + } + return $payload; + } +} diff --git a/src/ArgoCD/Model/SessionSessionResponse.php b/src/ArgoCD/Model/SessionSessionResponse.php new file mode 100644 index 00000000000..146d6ab7328 --- /dev/null +++ b/src/ArgoCD/Model/SessionSessionResponse.php @@ -0,0 +1,17 @@ +token = $data['token'] ?? null; + } + + public function getToken(): ?string + { + return $this->token; + } +} diff --git a/src/ArgoCD/Model/V1Time.php b/src/ArgoCD/Model/V1Time.php new file mode 100644 index 00000000000..a9d069325d3 --- /dev/null +++ b/src/ArgoCD/Model/V1Time.php @@ -0,0 +1,35 @@ +seconds = $data['seconds'] ?? null; + $this->nanos = isset($data['nanos']) ? (int)$data['nanos'] : null; + } + + public function getSeconds(): ?string + { + return $this->seconds; + } + + public function getNanos(): ?int + { + return $this->nanos; + } + + public function toDateTime(): ?\DateTimeImmutable + { + if ($this->seconds === null) { + return null; + } + // Assuming seconds is a string that can be cast to int for setTimestamp + $dateTime = new \DateTimeImmutable(); + return $dateTime->setTimestamp((int)$this->seconds); + // Note: Nanos are not easily representable in standard DateTime + } +}