diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index dfa9b5e4..2bc4f664 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -21,7 +21,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - - name: Set up runtime + - name: Set up runtime - Php ${{ env.PRIMARY_PHP_VERSION }} uses: shivammathur/setup-php@v2 with: php-version: ${{ env.PRIMARY_PHP_VERSION }} @@ -33,7 +33,7 @@ jobs: - name: Install dependencies run: composer run install:ci - - name: Run PHP lint (phpcs, rector, php-cs-fixer) + - name: Run PHP lint (phpcs, php-cs-fixer, rector) id: lint continue-on-error: true run: composer run lint:all diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 801a5b22..1ba75f50 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -54,7 +54,7 @@ jobs: run: composer validate --strict - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-interaction + run: composer run install:ci - name: Run unit tests run: vendor/bin/phpunit --testdox diff --git a/docs/php-alignment-node-prompt.md b/docs/php-alignment-node-prompt.md new file mode 100644 index 00000000..5537a1bb --- /dev/null +++ b/docs/php-alignment-node-prompt.md @@ -0,0 +1,290 @@ +# PHP SDK — Alignment with Node.js SDK + +## Context + +The PHP SDK (`upsun-sdk-php`) must be aligned with the Node.js SDK (`upsun-sdk-node`) on three +points that were recently fixed in Node.js. The changes are **backward-compatible** and must not +break any existing consumer of the SDK. + +--- + +## CRITICAL RULE — Generated files vs. templates + +Before touching any PHP file, determine whether it is generated or custom: + +| File | Status | How to edit | +|---|---|---| +| `src/Api/AbstractApi.php` | **Generated** — listed in `.openapi-generator/FILES` | Edit `templates/php/abstract_api.mustache`, then regenerate | +| `src/Core/OAuthProvider.php` | **Generated** — listed in `.openapi-generator/FILES` | Edit `templates/php/oauth_provider.mustache`, then regenerate | +| `src/UpsunClient.php` | **Custom** — NOT in `.openapi-generator/FILES` | Edit directly | +| `src/UpsunConfig.php` | **Custom** — NOT in `.openapi-generator/FILES` | Edit directly | + +**Regeneration command:** +```bash +npx openapi-generator-cli generate -c templates/config.yaml +``` + +**Template → generated file mapping** (from `templates/config.yaml`): +``` +templates/php/abstract_api.mustache → src/Api/AbstractApi.php +templates/php/oauth_provider.mustache → src/Core/OAuthProvider.php +``` + +After every change to a mustache template, run the generator and verify the generated output +matches the template intent exactly. + +--- + +## Change 1 — Bearer-only mode (`setBearerToken`) + +### Goal + +Allow a consumer to bypass OAuth2 entirely and inject a static bearer token, exactly as in +Node.js: + +```typescript +// Node.js — src/upsun.ts +setBearerToken(token: string): void { + this.accessToken = token; +} + +public async getToken(name?: string, scopes?: string[]): Promise { + if (this.auth) { + return await this.auth.getAuthorization(); // OAuth2 path + } else if (this.accessToken) { + return `${this.accessToken}`; // Bearer path + } else { + throw new Error('No authentication method available...'); + } +} +``` + +### Files to change + +#### `src/UpsunClient.php` (custom — edit directly) + +1. Add a nullable `?string $bearerToken` property (default `null`). +2. Add a `setBearerToken(string $token): void` public method that sets it. +3. Make the `$auth` property nullable (`?OAuthProvider`) — only instantiated when `$upsunConfig->apiToken` is not the default empty value. +4. Update `getToken()` (currently returns `$this->upsunConfig->apiToken`) to implement the three-way logic: + +```php +public function getToken(): string +{ + if ($this->auth !== null) { + return $this->auth->getAuthorization(); // OAuth2 path + } + + if ($this->bearerToken !== null) { + return 'Bearer ' . $this->bearerToken; // Bearer-only path + } + + throw new \RuntimeException( + 'No authentication method available. Provide an API key or call setBearerToken().' + ); +} +``` + +5. Pass `$this->auth` (which may now be `null`) down to all API class constructors. The + `AbstractApi` and each concrete API must accept `?OAuthProvider`. + +#### `src/Api/AbstractApi.php` + `templates/php/abstract_api.mustache` (generated — edit template) + +- Accept `?OAuthProvider $oauthProvider` in the constructor. +- In `getAuthorizationHeader()`, delegate to `$this->oauthProvider->getAuthorization()` only when + `$oauthProvider !== null`, otherwise call `$this->upsunClient->getToken()`. + + Simpler alternative (avoids circular dependency): inject a `callable $tokenProvider` instead of + `OAuthProvider` directly, so the auth strategy is resolved at call time: + +```php +// In AbstractApi constructor, replace OAuthProvider with a callable +public function __construct( + private readonly \Closure $tokenProvider, // () => string + ... +) + +// In getAuthorizationHeader() +protected function getAuthorizationHeader(): string +{ + return ($this->tokenProvider)(); +} +``` + + In `UpsunClient.php`, pass the closure when building task params: +```php +$tokenProvider = fn(): string => $this->getToken(); +$taskParams = [$tokenProvider, $this->apiClient, $requestFactory, $this->apiConfig]; +``` + +- **Also update `templates/php/abstract_api.mustache`** with the same change before regenerating. + +--- + +## Change 2 — Thundering-herd protection with PHP Fibers + +### Goal + +The current guard in `OAuthProvider::ensureValidToken()` is a simple boolean: + +```php +if ($this->acquiringToken) { + return; // ← caller returns with NO valid token — bug in concurrent Fiber contexts +} +``` + +This is safe for FPM (mono-thread per request) but incorrect when multiple `Fiber`s within the +same PHP process call `ensureValidToken()` concurrently: the second Fiber returns immediately +with `$accessToken = null`. + +The Node.js equivalent shares a single in-flight `Promise`: +```typescript +if (!this.pendingToken) { + this.pendingToken = this.doAcquireToken().finally(() => { this.pendingToken = null; }); +} +await this.pendingToken; // ALL concurrent callers wait for the same result +``` + +### PHP Fiber implementation + +Replace the boolean guard with a `?Fiber` reference that all concurrent callers can join: + +```php +/** @var \Fiber|null */ +private ?\Fiber $acquiringFiber = null; + +public function ensureValidToken(): void +{ + $buffer = 120; + + if ($this->accessToken && time() <= ($this->tokenExpiry - $buffer)) { + return; // token still valid — fast path + } + + if ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { + // Another Fiber is already acquiring — suspend until it completes, + // then check if the token is now valid (it should be). + while (!$this->acquiringFiber->isTerminated()) { + \Fiber::getCurrent()?->suspend(); + } + // After the acquiring Fiber finishes, the token is valid. + return; + } + + // This Fiber takes ownership of the acquisition. + $this->acquiringFiber = \Fiber::getCurrent(); + try { + $this->doAcquireToken(); + } finally { + $this->acquiringFiber = null; + } +} +``` + +> **Note for the agent**: `\Fiber::getCurrent()` returns `null` when called outside a Fiber +> (e.g., standard FPM synchronous code). Add a null-guard so the method still works in sync +> contexts: +> +> ```php +> $currentFiber = \Fiber::getCurrent(); +> $this->acquiringFiber = $currentFiber; // may be null in sync FPM context +> ``` +> +> When `$acquiringFiber` is `null` (sync context), no other Fiber can join — which is correct +> because FPM is inherently single-threaded per request. + +### Files to change + +- **`templates/php/oauth_provider.mustache`** — replace `private bool $acquiringToken` + the + boolean guard with the `?Fiber` implementation above. +- **`src/Core/OAuthProvider.php`** — regenerated output of the template; verify after generation. +- Remove the `private bool $acquiringToken = false;` property. + +--- + +## Change 3 — 401 retry guard in async/Fiber mode + +### Goal + +In Node.js, the middleware uses a `__upsunRetry` flag on the request `init` object to prevent +double-retry: + +```typescript +if (retryInit.__upsunRetry) return response; // guard: no double-retry +retryInit.__upsunRetry = true; +``` + +The current PHP implementation in `AbstractApi::sendAuthenticatedRequest()` has no such guard: + +```php +if ($response->getStatusCode() === 401) { + $this->oauthProvider->forceRefresh(); + $request = $this->createAuthenticatedRequest(...); + $response = $this->httpClient->sendRequest($request); + // ← if the second response is also 401, we silently fall through to ApiException + // ← in Fiber mode with concurrent requests, two Fibers could both trigger forceRefresh() +} +``` + +In synchronous FPM this is harmless (only one request in flight). In Fiber async mode, two +concurrent 401s could each call `forceRefresh()` back-to-back, causing two token re-acquisitions. + +### PHP implementation + +Add an instance-level retry guard (per-request correlation via a local flag): + +```php +protected function sendAuthenticatedRequest( + string $method, + string $uri, + array $headers = [], + string|StreamInterface|null $body = null, + bool $_retried = false, // ← internal guard, not part of public API +): ResponseInterface { + try { + $this->refreshToken(); + $request = $this->createAuthenticatedRequest($method, $uri, $headers, $body); + $response = $this->httpClient->sendRequest($request); + + if ($response->getStatusCode() === 401 && !$_retried) { + // RFC 6750 §3.1 — retry once with a fresh token. + // The $_retried=true guard prevents infinite loops in Fiber contexts. + $this->oauthProvider->forceRefresh(); + return $this->sendAuthenticatedRequest($method, $uri, $headers, $body, true); + } + + if ($response->getStatusCode() >= 400) { + throw new ApiException(...); + } + + return $response; + } catch (...) { ... } +} +``` + +> The recursive self-call with `$_retried = true` mirrors the `__upsunRetry` flag in Node.js +> without modifying the PSR-7 request object. + +### Files to change + +- **`templates/php/abstract_api.mustache`** — update `sendAuthenticatedRequest()` signature and + body as above. +- **`src/Api/AbstractApi.php`** — regenerated; verify after generation. + +--- + +## Validation checklist + +After all changes: + +- [ ] `composer run spec:generate` runs without error +- [ ] `src/Api/AbstractApi.php` matches `templates/php/abstract_api.mustache` (no drift) +- [ ] `src/Core/OAuthProvider.php` matches `templates/php/oauth_provider.mustache` (no drift) +- [ ] `composer run lint:phpcs` passes +- [ ] `composer run test` — all existing unit tests pass +- [ ] New unit tests added for: + - `setBearerToken()` — bearer path returns `Bearer ` without calling `OAuthProvider` + - `getToken()` throws when neither API key nor bearer is set + - `ensureValidToken()` — two concurrent Fiber callers only trigger one HTTP request + - `sendAuthenticatedRequest()` — 401 retry guard prevents double `forceRefresh()` in Fiber mode +- [ ] PHP 8.1+ minimum (Fiber requires 8.1) diff --git a/phpunit.xml b/phpunit.xml index 03fff270..9b903c69 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -16,6 +16,7 @@ src/Core + src/Api/AbstractApi.php diff --git a/schema/openapispec-upsun-processed.json b/schema/openapispec-upsun-processed.json new file mode 100644 index 00000000..363d808a --- /dev/null +++ b/schema/openapispec-upsun-processed.json @@ -0,0 +1,36374 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Upsun.com Rest API", + "version": "1.0", + "contact": { + "name": "Support", + "url": "https://upsun.com/contact-us/" + }, + "termsOfService": "https://upsun.com/trust-center/legal/tos/", + "description": "# Introduction\n\nUpsun, formerly Platform.sh, is a container-based Platform-as-a-Service. Our main API\nis simply Git. With a single `git push` and a couple of YAML files in\nyour repository you can deploy an arbitrarily complex cluster.\nEvery [**Project**](#tag/Project) can have multiple applications (PHP,\nNode.js, Python, Ruby, Go, etc.) and managed, automatically\nprovisioned services (databases, message queues, etc.).\n\nEach project also comes with multiple concurrent\nlive staging/development [**Environments**](#tag/Environment).\nThese ephemeral development environments\nare automatically created every time you push a new branch or create a\npull request, and each has a full copy of the data of its parent branch,\nwhich is created on-the-fly in seconds.\n\nOur Git implementation supports integrations with third party Git\nproviders such as GitHub, Bitbucket, or GitLab, allowing you to simply\nintegrate Upsun into your existing workflow.\n\n## Using the REST API\n\nIn addition to the Git API, we also offer a REST API that allows you to manage\nevery aspect of the platform, from managing projects and environments,\nto accessing accounts and subscriptions, to creating robust workflows\nand integrations with your CI systems and internal services.\n\nThese API docs are generated from a standard **OpenAPI (Swagger)** Specification document\nwhich you can find here in [YAML](openapispec-upsun.yaml) and in [JSON](openapispec-upsun.json) formats.\n\nThis RESTful API consumes and produces HAL-style JSON over HTTPS,\nand any REST library can be used to access it. On GitHub, we also host\na few API libraries that you can use to make API access easier, such as our\n[PHP API client](https://github.com/upsun/upsun-sdk-php).\n\nIn order to use the API you will first need to have an [Upsun account](https://auth.upsun.com/register/) \nand [create an API Token](https://docs.upsun.com/anchors/cli/api-token/).\n\n# Authentication\n\n## OAuth2\n\nAPI authentication is done with OAuth2 access tokens.\n\n### API tokens\n\nYou can use an API token as one way to get an OAuth2 access token. This\nis particularly useful in scripts, e.g. for CI pipelines.\n\nTo create an API token, go to the \"API Tokens\" section\nof the \"Account Settings\" tab on the [Console](https://console.upsun.com).\n\nTo exchange this API token for an access token, a `POST` request\nmust be made to `https://auth.upsun.com/oauth2/token`.\n\nThe request will look like this in cURL:\n\n
\ncurl -u platform-api-user: \\\n    -d 'grant_type=api_token&api_token=API_TOKEN' \\\n    https://auth.upsun.com/oauth2/token\n
\n\nThis will return a \"Bearer\" access token that\ncan be used to authenticate further API requests, for example:\n\n
\n{\n    \"access_token\": \"abcdefghij1234567890\",\n    \"expires_in\": 900,\n    \"token_type\": \"bearer\"\n}\n
\n\n### Using the Access Token\n\nTo authenticate further API requests, include this returned bearer token\nin the `Authorization` header. For example, to retrieve a list of\n[Projects](#tag/Project)\naccessible by the current user, you can make the following request\n(substituting the dummy token for your own):\n\n
\ncurl -H \"Authorization: Bearer abcdefghij1234567890\" \\\n    https://api.upsun.com/projects\n
\n\n# HAL Links\n\nMost endpoints in the API return fields which defines a HAL\n(Hypertext Application Language) schema for the requested endpoint.\nThe particular objects returns and their contents can vary by endpoint.\nThe payload examples we give here for the requests do not show these\nelements. These links can allow you to create a fully dynamic API client\nthat does not need to hardcode any method or schema.\n\nUnless they are used for pagination we do not show the HAL links in the\npayload examples in this documentation for brevity and as their content\nis contextual (based on the permissions of the user).\n\n## _links Objects\n\nMost endpoints that respond to `GET` requests will include a `_links` object\nin their response. The `_links` object contains a key-object pair labelled `self`, which defines\ntwo further key-value pairs:\n\n* `href` - A URL string referring to the fully qualified name of the returned object. For many endpoints, this will be the direct link to the API endpoint on the region gateway, rather than on the general API gateway. This means it may reference a host of, for example, `eu-2.platform.sh` rather than `api.upsun.com`.\n* `meta` - An object defining the OpenAPI Specification (OAS) [schema object](https://swagger.io/specification/#schemaObject) of the component returned by the endpoint.\n\nThere may be zero or more other fields in the `_links` object resembling fragment identifiers\nbeginning with a hash mark, e.g. `#edit` or `#delete`. Each of these keys\nrefers to a JSON object containing two key-value pairs:\n\n* `href` - A URL string referring to the path name of endpoint which can perform the action named in the key.\n* `meta` - An object defining the OAS schema of the endpoint. This consists of a key-value pair, with the key defining an HTTP method and the value defining the [operation object](https://swagger.io/specification/#operationObject) of the endpoint.\n\nTo use one of these HAL links, you must send a new request to the URL defined\nin the `href` field which contains a body defined the schema object in the `meta` field.\n\nFor example, if you make a request such as `GET /projects/abcdefghij1234567890`, the `_links`\nobject in the returned response will include the key `#delete`. That object\nwill look something like this fragment:\n\n```\n\"#delete\": {\n \"href\": \"/api/projects/abcdefghij1234567890\",\n \"meta\": {\n \"delete\": {\n \"responses\": {\n . . . // Response definition omitted for space\n },\n \"parameters\": []\n }\n }\n}\n```\n\nTo use this information to delete a project, you would then send a `DELETE`\nrequest to the endpoint `https://api.upsun.com/api/projects/abcdefghij1234567890`\nwith no body or parameters to delete the project that was originally requested.\n\n## _embedded Objects\n\nRequests to endpoints which create or modify objects, such as `POST`, `PATCH`, or `DELETE`\nrequests, will include an `_embedded` key in their response. The object\nrepresented by this key will contain the created or modified object. This\nobject is identical to what would be returned by a subsequent `GET` request\nfor the object referred to by the endpoint.\n", + "x-logo": { + "url": "https://docs.upsun.com/images/upsun-api.svg", + "href": "https://upsun.com/#section/Introduction", + "altText": "Upsun logo" + } + }, + "servers": [ + { + "url": "{schemes}://api.upsun.com", + "description": "The Upsun.com API gateway", + "variables": { + "schemes": { + "default": "https" + } + } + } + ], + "security": [ + { + "OAuth2": {} + } + ], + "tags": [ + { + "name": "Cert Management", + "description": "User-supplied SSL/TLS certificates can be managed using these\nendpoints. For more information, see our\n[Third-party TLS certificate](https://docs.upsun.com/anchors/domains/custom/custom-certificates/)\ndocumentation. These endpoints are not for managing certificates\nthat are automatically supplied by Upsun via Let's Encrypt.\n" + }, + { + "name": "Environment", + "description": "On Upsun, an environment encompasses a single instance of your\nentire application stack, the services used by the application,\nthe application's data storage, and the environment's backups.\n\nIn general, an environment represents a single branch or merge request\nin the Git repository backing a project. It is a virtual cluster\nof read-only application and service containers with read-write\nmounts for application and service data.\n\nOn Upsun, the default branch is your production environment\u2014thus,\nmerging changes to this branch will put those changes to production.\n" + }, + { + "name": "Environment Type", + "description": "Environment Types is the way Upsun manages access. We currently have 3 environment types:\n* Development\n* Staging\n* Production\n\nEach environment type will contain a group of users and their accesses. We manage access,\nadding, updating and removing users and their roles, here.\n\nEach environment will have a type, pointing to one of these 3 environment types.\nSee `type` in [Environments](#tag/Environment).\n\nIn general:\n* Production will be reserved for the default branch, and cannot be set manually.\n* An environment can be set to be type `staging` or development manually and when branching.\n\nDedicated Generation 2 projects have different rules for environment types. If your project\ncontains at least one of those Dedicated Generation 2 environments, the rules are slightly different:\n* All non-dedicated environments in your project can be `development` or `staging`, but never `production`.\n* Dedicated Generation 2 environments can be set either to `staging` or `production`, but never `development`.\n* The default branch is not considered to be a special case.\n" + }, + { + "name": "Environment Backups", + "description": "A snapshot is a complete backup of an environment, including all the\npersistent data from all services running in an environment and all\nfiles present in mounted volumes.\n\nThese endpoints can be used to trigger the creation of new backups,\nget information about existing backups, delete existing backups or\nrestore a backup.\nMore information about backups can be found in our\n[documentation](https://docs.upsun.com/anchors/environments/backup/).\n" + }, + { + "name": "Environment Variables", + "description": "These endpoints manipulate user-defined variables which are bound to a\nspecific environment, as well as (optionally) the children of an\nenvironment. These variables can be made available at both build time\nand runtime. For more information on environment variables,\nsee the [Variables](https://docs.upsun.com/anchors/variables/set/environment/create/)\nsection of the documentation.\n" + }, + { + "name": "Project", + "description": "## Project Overview\n\nOn Upsun, a Project is backed by a single Git repository\nand encompasses your entire application stack, the services\nused by your application, the application's data storage,\nthe production and staging environments, and the backups of those\nenvironments.\n\nWhen you create a new project, you start with a single\n[Environment](#tag/Environment) called *Master*,\ncorresponding to the master branch in the Git repository of\nthe project\u2014this will be your production environment.\n\nIf you connect your project to an external Git repo\nusing one of our [Third-Party Integrations](#tag/Third-Party-Integrations)\na new development environment can be created for each branch\nor pull request created in the repository. When a new development\nenvironment is created, the production environment's data\nwill be cloned on-the-fly, giving you an isolated, production-ready\ntest environment.\n\nThis set of API endpoints can be used to retrieve a list of projects\nassociated with an API key, as well as create and update the parameters\nof existing projects.\n\n> **Note**:\n>\n> To list projects or to create a new project, use [`/subscriptions`](#tag/Subscriptions).\n" + }, + { + "name": "Project Variables", + "description": "These endpoints manipulate user-defined variables which are bound to an\nentire project. These variables are accessible to all environments\nwithin a single project, and they can be made available at both build\ntime and runtime. For more information on project variables,\nsee the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)\nsection of the documentation.\n" + }, + { + "name": "Project Settings", + "description": "These endpoints can be used to retrieve and manipulate project-level\nsettings. Only the `initialize` property can be set by end users. It is used\nto initialize a project from an existing Git repository.\n\nThe other properties can only be set by a privileged user.\n" + }, + { + "name": "Repository", + "description": "The Git repository backing projects hosted on Upsun can be\naccessed in a **read-only** manner through the `/projects/{projectId}/git/*`\nfamily of endpoints. With these endpoints, you can retrieve objects from\nthe Git repository in the same way that you would in a local environment.\n" + }, + { + "name": "Domain Management", + "description": "These endpoints can be used to add, modify, or remove domains from\na project. For more information on how domains function on\nUpsun, see the [Domains](https://docs.upsun.com/anchors/domains/custom/)\nsection of our documentation.\n" + }, + { + "name": "Routing", + "description": "These endpoints access an environment's `routes:` section of the `.upsun/config.yaml` file.\nFor routes to propagate to child environments, the child environments\nmust be synchronized with their parent.\n\nMore information about routing can be found in the [Routes](https://docs.upsun.com/anchors/routes/)\nsection of the documentation.\n" + }, + { + "name": "Source Operations", + "description": "These endpoints interact with source code operations as defined in the `source.operations`\nkey in a project's `.upsun/config.yaml` configuration. More information\non source code operations is\n[available in our user documentation](https://docs.upsun.com/anchors/app/source-operations/).\n" + }, + { + "name": "Deployment Target", + "description": "Upsun is capable of deploying the production environments of\nprojects in multiple topologies: both in clusters of containers, and\nas dedicated virtual machines. This is an internal API that can\nonly be used by privileged users.\n" + }, + { + "name": "Deployments", + "description": "The deployments endpoints gives detailed information about the actual\ndeployment of an active environment. Currently, it returns the _current_\ndeployment with information about the different apps, services, and\nroutes contained within.\n" + }, + { + "name": "Third-Party Integrations", + "description": "Upsun can easily integrate with many third-party services, including\nGit hosting services (GitHub, GitLab, and Bitbucket),\nhealth notification services (email, Slack, PagerDuty),\nperformance analytics platforms (New Relic, Blackfire, Tideways),\nand webhooks.\n\nFor clarification about what information each field requires, see the\n[External Integrations](https://docs.upsun.com/anchors/integrations/)\ndocumentation. NOTE: The names of the CLI arguments listed in the\ndocumentation are not always named exactly the same as the\nrequired body fields in the API request.\n" + }, + { + "name": "MFA", + "description": "Multi-factor authentication (MFA) requires the user to present two (or more) types of evidence (or factors) to prove their identity.\n\nFor example, the evidence might be a password and a device-generated code, which show the user has the knowledge factor (\"something you know\") \nas well as the possession factor (\"something you have\"). In this way MFA offers good protection against the compromise of any single factor, \nsuch as a stolen password.\n\nUsing the MFA API you can set up time-based one-time passcodes (TOTP), which can be generated on a single registered device (\"something you have\") such as a mobile phone.\n" + }, + { + "name": "Subscriptions", + "description": "Each project is represented by a subscription that holds the plan information.\nThese endpoints can be used to go to a larger plan, add more storage, or subscribe to\noptional features.\n" + }, + { + "name": "Orders", + "description": "These endpoints can be used to retrieve order information from our billing\nsystem. Here you can view information about your bill for our services,\ninclude the billed amount and a link to a PDF of the bill.\n" + }, + { + "name": "Invoices", + "description": "These endpoints can be used to retrieve invoices from our billing system.\nAn invoice of type \"invoice\" is generated automatically every month, if the customer has active projects.\nInvoices of type \"credit_memo\" are a result of manual action when there was a refund or an invoice correction.\n" + }, + { + "name": "Vouchers", + "description": "These endpoints can be used to retrieve vouchers associated with a particular\nuser as well as apply a voucher to a particular user.\n" + }, + { + "name": "Records", + "description": "These endpoints retrieve information about which plans were assigned to a particular\nproject at which time.\n" + }, + { + "name": "Support", + "description": "These endpoints can be used to retrieve information about support ticket priority\nand allow you to submit new ticket to the Upsun Support Team.\n" + }, + { + "name": "System Information", + "description": "These endpoints can be used to retrieve low-level information and interact with the\ncore component of Upsun infrastructure.\n\nThis is an internal API that can only be used by privileged users.\n" + } + ], + "paths": { + "/alerts/subscriptions/{subscriptionId}/usage": { + "get": { + "tags": [ + "Alerts" + ], + "summary": "Get usage alerts for a subscription", + "operationId": "get-usage-alerts", + "parameters": [ + { + "$ref": "#/components/parameters/subscription_id" + } + ], + "responses": { + "200": { + "description": "The list of current and available alerts for the subscription.", + "content": { + "application/json": { + "schema": { + "properties": { + "available": { + "description": "The list of available usage alerts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + }, + "current": { + "description": "The list of the current usage alerts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "get-usage-alerts", + "x-tag-id-kebab": "Alerts", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + }, + "patch": { + "tags": [ + "Alerts" + ], + "summary": "Update usage alerts.", + "operationId": "update-usage-alerts", + "parameters": [ + { + "$ref": "#/components/parameters/subscription_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "alerts": { + "description": "The list of usage alerts to create or update.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "The list of current and available alerts for the subscription.", + "content": { + "application/json": { + "schema": { + "properties": { + "available": { + "description": "The list of available usage alerts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + }, + "current": { + "description": "The list of the current usage alerts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "update-usage-alerts", + "x-tag-id-kebab": "Alerts", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + } + }, + "/orders/download": { + "get": { + "tags": [ + "Orders" + ], + "summary": "Download an invoice.", + "operationId": "download-invoice", + "parameters": [ + { + "name": "token", + "in": "query", + "description": "JWT for invoice.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "An invoice PDF.", + "content": { + "application/pdf": {} + } + } + }, + "x-property-id-kebab": "download-invoice", + "x-tag-id-kebab": "Orders", + "x-return-types-displayReturn": false, + "x-return-types": [ + "string" + ], + "x-return-types-union": "string", + "x-phpdoc": { + "return": false + }, + "x-returnable": true + } + }, + "/discounts/{id}": { + "get": { + "tags": [ + "Discounts" + ], + "summary": "Get an organization discount", + "operationId": "get-discount", + "parameters": [ + { + "$ref": "#/components/parameters/discountId" + } + ], + "responses": { + "200": { + "description": "A discount object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Discount" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "get-discount", + "x-tag-id-kebab": "Discounts", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Discount" + ], + "x-return-types-union": "\\Upsun\\Model\\Discount", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Discount" + }, + "x-returnable": true + } + }, + "/discounts/types/allowance": { + "get": { + "tags": [ + "Discounts" + ], + "summary": "Get the value of the First Project Incentive discount", + "operationId": "get-type-allowance", + "responses": { + "200": { + "description": "A discount object", + "content": { + "application/json": { + "schema": { + "properties": { + "currencies": { + "description": "Discount values per currency.", + "properties": { + "EUR": { + "description": "Discount value in EUR.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + }, + "USD": { + "description": "Discount value in USD.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + }, + "GBP": { + "description": "Discount value in GBP.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + }, + "AUD": { + "description": "Discount value in AUD.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + }, + "CAD": { + "description": "Discount value in CAD.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "get-type-allowance", + "x-tag-id-kebab": "Discounts", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + } + }, + "/me": { + "get": { + "tags": [ + "Users" + ], + "summary": "Get current logged-in user info", + "description": "Retrieve information about the currently logged-in user (the user associated with the access token).", + "operationId": "get-current-user-deprecated", + "responses": { + "200": { + "description": "The user object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CurrentUser" + } + } + } + } + }, + "x-deprecated": true, + "x-property-id-kebab": "get-current-user-deprecated", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\CurrentUser" + ], + "x-return-types-union": "\\Upsun\\Model\\CurrentUser", + "x-phpdoc": { + "return": "\\Upsun\\Model\\CurrentUser" + }, + "x-returnable": true, + "x-description": [ + "Retrieve information about the currently logged-in user (the user associated with the access token)." + ] + } + }, + "/ssh_keys/{key_id}": { + "get": { + "tags": [ + "Ssh Keys" + ], + "summary": "Get an SSH key", + "operationId": "get-ssh-key", + "parameters": [ + { + "name": "key_id", + "in": "path", + "description": "The ID of the ssh key.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "A single SSH public key record.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SshKey" + } + } + } + } + }, + "x-property-id-kebab": "get-ssh-key", + "x-tag-id-kebab": "Ssh-Keys", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\SshKey" + ], + "x-return-types-union": "\\Upsun\\Model\\SshKey", + "x-phpdoc": { + "return": "\\Upsun\\Model\\SshKey" + }, + "x-returnable": true + }, + "delete": { + "tags": [ + "Ssh Keys" + ], + "summary": "Delete an SSH key", + "operationId": "delete-ssh-key", + "parameters": [ + { + "name": "key_id", + "in": "path", + "description": "The ID of the ssh key.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Success." + } + }, + "x-property-id-kebab": "delete-ssh-key", + "x-tag-id-kebab": "Ssh-Keys", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false + } + }, + "/ssh_keys": { + "post": { + "tags": [ + "Ssh Keys" + ], + "summary": "Add a new public SSH key to a user", + "operationId": "create-ssh-key", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "value" + ], + "properties": { + "value": { + "description": "The value of the ssh key.", + "type": "string" + }, + "title": { + "description": "The title of the ssh key.", + "type": "string" + }, + "uuid": { + "description": "The uuid of the user.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "The newly created ssh key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SshKey" + } + } + } + } + }, + "x-property-id-kebab": "create-ssh-key", + "x-tag-id-kebab": "Ssh-Keys", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\SshKey" + ], + "x-return-types-union": "\\Upsun\\Model\\SshKey", + "x-phpdoc": { + "return": "\\Upsun\\Model\\SshKey" + }, + "x-returnable": true + } + }, + "/me/phone": { + "post": { + "tags": [ + "Users" + ], + "summary": "Check if phone verification is required", + "description": "Find out if the current logged in user requires phone verification to create projects.", + "operationId": "get-current-user-verification-status", + "responses": { + "200": { + "description": "The information pertinent to determine if the account requires phone verification before project creation.", + "content": { + "application/json": { + "schema": { + "properties": { + "verify_phone": { + "description": "Does this user need to verify their phone number for project creation.", + "type": "boolean" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "get-current-user-verification-status", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Find out if the current logged in user requires phone verification to create projects." + ] + } + }, + "/me/verification": { + "post": { + "tags": [ + "Users" + ], + "summary": "Check if verification is required", + "description": "Find out if the current logged in user requires verification (phone or staff) to create projects.", + "operationId": "get-current-user-verification-status-full", + "responses": { + "200": { + "description": "The information pertinent to determine if the account requires any type of verification before project creation.", + "content": { + "application/json": { + "schema": { + "properties": { + "state": { + "description": "Does this user need verification for project creation.", + "type": "boolean" + }, + "type": { + "description": "What type of verification is needed (phone or ticket)", + "type": "string" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "get-current-user-verification-status-full", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Find out if the current logged in user requires verification (phone or staff) to create projects." + ] + } + }, + "/plans": { + "get": { + "tags": [ + "Plans" + ], + "summary": "List available plans", + "description": "Retrieve information about plans and pricing on Platform.sh.", + "operationId": "list-plans", + "responses": { + "200": { + "description": "The list of plans.", + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "description": "Total number of plans.", + "type": "integer" + }, + "plans": { + "description": "Array of plans.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Plan" + } + }, + "_links": { + "$ref": "#/components/schemas/HalLinks" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "list-plans", + "x-tag-id-kebab": "Plans", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieve information about plans and pricing on Platform.sh." + ] + } + }, + "/subscriptions/{subscriptionId}/can-update": { + "get": { + "tags": [ + "Subscriptions" + ], + "summary": "Checks if the user is able to update a project.", + "operationId": "can-update-subscription", + "parameters": [ + { + "$ref": "#/components/parameters/subscription_id" + }, + { + "$ref": "#/components/parameters/subscription_plan" + }, + { + "$ref": "#/components/parameters/subscription_environments" + }, + { + "$ref": "#/components/parameters/subscription_storage" + }, + { + "$ref": "#/components/parameters/subscription_user_licenses" + } + ], + "responses": { + "200": { + "description": "Check result with error message if presented", + "content": { + "application/json": { + "schema": { + "properties": { + "can_update": { + "description": "Boolean result of the check.", + "type": "boolean" + }, + "message": { + "description": "Details in case of negative check result.", + "type": "string" + }, + "required_action": { + "description": "Required action impeding project update.", + "type": "object" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "can-update-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + } + }, + "/profiles": { + "get": { + "tags": [ + "User Profiles" + ], + "summary": "List user profiles", + "operationId": "list-profiles", + "responses": { + "200": { + "description": "The list of user profiles.", + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "description": "Total number of results.", + "type": "integer" + }, + "profiles": { + "description": "Array of user profiles.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Profile" + } + }, + "_links": { + "$ref": "#/components/schemas/HalLinks" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "list-profiles", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + } + }, + "/profiles/{userId}": { + "get": { + "tags": [ + "User Profiles" + ], + "summary": "Get a single user profile", + "operationId": "get-profile", + "parameters": [ + { + "$ref": "#/components/parameters/user_id" + } + ], + "responses": { + "200": { + "description": "A User profile object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + } + } + }, + "x-property-id-kebab": "get-profile", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Profile" + ], + "x-return-types-union": "\\Upsun\\Model\\Profile", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Profile" + }, + "x-returnable": true + }, + "patch": { + "tags": [ + "User Profiles" + ], + "summary": "Update a user profile", + "description": "Update a user profile, supplying one or more key/value pairs to to change.", + "operationId": "update-profile", + "parameters": [ + { + "$ref": "#/components/parameters/user_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "display_name": { + "description": "The user's display name.", + "type": "string" + }, + "username": { + "description": "The user's username.", + "type": "string" + }, + "current_password": { + "description": "The user's current password.", + "type": "string" + }, + "password": { + "description": "The user's new password.", + "type": "string" + }, + "company_type": { + "description": "The company type.", + "type": "string" + }, + "company_name": { + "description": "The name of the company.", + "type": "string" + }, + "vat_number": { + "description": "The vat number of the user.", + "type": "string" + }, + "company_role": { + "description": "The role of the user in the company.", + "type": "string" + }, + "marketing": { + "description": "Flag if the user agreed to receive marketing communication.", + "type": "boolean" + }, + "ui_colorscheme": { + "description": "The user's chosen color scheme for user interfaces. Available values are 'light' and 'dark'.", + "type": "string" + }, + "default_catalog": { + "description": "The URL of a catalog file which overrides the default.", + "type": "string" + }, + "project_options_url": { + "description": "The URL of an account-wide project options file.", + "type": "string" + }, + "picture": { + "description": "Url of the user's picture.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "A User profile object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + } + } + }, + "x-property-id-kebab": "update-profile", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Profile" + ], + "x-return-types-union": "\\Upsun\\Model\\Profile", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Profile" + }, + "x-returnable": true, + "x-description": [ + "Update a user profile, supplying one or more key/value pairs to to change." + ] + } + }, + "/profiles/{userId}/address": { + "get": { + "tags": [ + "User Profiles" + ], + "summary": "Get a user address", + "operationId": "get-address", + "parameters": [ + { + "$ref": "#/components/parameters/user_id" + } + ], + "responses": { + "200": { + "description": "A user Address object extended with field metadata", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Address" + }, + { + "$ref": "#/components/schemas/AddressMetadata" + } + ] + } + } + } + } + }, + "x-property-id-kebab": "get-address", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": {}, + "x-phpdoc": {}, + "x-returnable": true + }, + "patch": { + "tags": [ + "User Profiles" + ], + "summary": "Update a user address", + "description": "Update a user address, supplying one or more key/value pairs to to change.", + "operationId": "update-address", + "parameters": [ + { + "$ref": "#/components/parameters/user_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "responses": { + "200": { + "description": "A user Address object extended with field metadata.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Address" + }, + { + "$ref": "#/components/schemas/AddressMetadata" + } + ] + } + } + } + } + }, + "x-property-id-kebab": "update-address", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": {}, + "x-phpdoc": {}, + "x-returnable": true, + "x-description": [ + "Update a user address, supplying one or more key/value pairs to to change." + ] + } + }, + "/profile/{uuid}/picture": { + "post": { + "tags": [ + "User Profiles" + ], + "summary": "Create a user profile picture", + "operationId": "create-profile-picture", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The uuid of the user", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "file": { + "description": "The image file to upload.", + "type": "string", + "format": "binary" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "The new picture url.", + "content": { + "application/json": { + "schema": { + "properties": { + "url": { + "description": "The relative url of the picture.", + "type": "string" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "create-profile-picture", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + }, + "delete": { + "tags": [ + "User Profiles" + ], + "summary": "Delete a user profile picture", + "operationId": "delete-profile-picture", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The uuid of the user", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "No Content success." + } + }, + "x-property-id-kebab": "delete-profile-picture", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false + } + }, + "/tickets": { + "get": { + "summary": "List support tickets", + "operationId": "list-tickets", + "parameters": [ + { + "$ref": "#/components/parameters/filter_ticket_id" + }, + { + "$ref": "#/components/parameters/filter_created" + }, + { + "$ref": "#/components/parameters/filter_updated" + }, + { + "$ref": "#/components/parameters/filter_type" + }, + { + "$ref": "#/components/parameters/filter_priority" + }, + { + "$ref": "#/components/parameters/filter_ticket_status" + }, + { + "$ref": "#/components/parameters/filter_requester_id" + }, + { + "$ref": "#/components/parameters/filter_submitter_id" + }, + { + "$ref": "#/components/parameters/filter_assignee_id" + }, + { + "$ref": "#/components/parameters/filter_has_incidents" + }, + { + "$ref": "#/components/parameters/filter_due" + }, + { + "name": "search", + "in": "query", + "description": "Search string for the ticket subject and description.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "The list of tickets.", + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "description": "Total number of results.", + "type": "integer" + }, + "tickets": { + "description": "Array of support tickets.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Ticket" + } + }, + "_links": { + "$ref": "#/components/schemas/HalLinks" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "list-tickets", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + }, + "post": { + "tags": [ + "Support" + ], + "summary": "Create a new support ticket", + "operationId": "create-ticket", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "subject", + "description" + ], + "properties": { + "subject": { + "description": "A title of the ticket.", + "type": "string" + }, + "description": { + "description": "The description body of the support ticket.", + "type": "string" + }, + "requester_id": { + "description": "UUID of the ticket requester. Converted from the ZID value.", + "type": "string", + "format": "uuid" + }, + "priority": { + "description": "A priority of the ticket.", + "type": "string", + "enum": [ + "low", + "normal", + "high", + "urgent" + ] + }, + "subscription_id": { + "description": "see create()", + "type": "string" + }, + "organization_id": { + "description": "see create()", + "type": "string" + }, + "affected_url": { + "description": "see create().", + "type": "string", + "format": "url" + }, + "followup_tid": { + "description": "The unique ID of the ticket which this ticket is a follow-up to.", + "type": "string" + }, + "category": { + "description": "The category of the support ticket.", + "type": "string", + "enum": [ + "access", + "billing_question", + "complaint", + "compliance_question", + "configuration_change", + "general_question", + "incident_outage", + "bug_report", + "report_a_gui_bug", + "onboarding", + "close_my_account" + ] + }, + "attachments": { + "description": "A list of attachments for the ticket.", + "type": "array", + "items": { + "properties": { + "filename": { + "description": "The filename to be used in storage.", + "type": "string" + }, + "data": { + "description": "the base64 encoded file.", + "type": "string" + } + }, + "type": "object" + } + }, + "collaborator_ids": { + "description": "A list of collaborators uuids for the ticket.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "A Support Ticket object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Ticket" + } + } + } + } + }, + "x-property-id-kebab": "create-ticket", + "x-tag-id-kebab": "Support", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Ticket" + ], + "x-return-types-union": "\\Upsun\\Model\\Ticket", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Ticket" + }, + "x-returnable": true + } + }, + "/tickets/{ticket_id}": { + "patch": { + "tags": [ + "Support" + ], + "summary": "Update a ticket", + "operationId": "update-ticket", + "parameters": [ + { + "name": "ticket_id", + "in": "path", + "description": "The ID of the ticket", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "The status of the support ticket.", + "type": "string", + "enum": [ + "open", + "solved" + ] + }, + "collaborator_ids": { + "description": "A list of collaborators uuids for the ticket.", + "type": "array", + "items": { + "type": "string" + } + }, + "collaborators_replace": { + "description": "Whether or not should replace ticket collaborators with the provided values. If false, the collaborators will be appended.", + "type": "boolean", + "default": null + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Ticket" + } + } + } + }, + "204": { + "description": "The ticket was not updated." + } + }, + "x-property-id-kebab": "update-ticket", + "x-tag-id-kebab": "Support", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Ticket", + "null" + ], + "x-return-types-union": "\\Upsun\\Model\\Ticket|null", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Ticket" + }, + "x-returnable": true + } + }, + "/tickets/priority": { + "get": { + "tags": [ + "Support" + ], + "summary": "List support ticket priorities", + "operationId": "list-ticket-priorities", + "parameters": [ + { + "name": "subscription_id", + "in": "query", + "description": "The ID of the subscription the ticket should be related to", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "category", + "in": "query", + "description": "The category of the support ticket.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "An array of available priorities for that license.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "id": { + "description": "Machine name of the priority.", + "type": "string" + }, + "label": { + "description": "The human-readable label of the priority.", + "type": "string" + }, + "short_description": { + "description": "The short description of the priority.", + "type": "string" + }, + "description": { + "description": "The long description of the priority.", + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + }, + "x-property-id-kebab": "list-ticket-priorities", + "x-tag-id-kebab": "Support", + "x-return-types-displayReturn": true, + "x-return-types": [ + "object[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "object[]" + }, + "x-returnable": true + } + }, + "/tickets/category": { + "get": { + "tags": [ + "Support" + ], + "summary": "List support ticket categories", + "operationId": "list-ticket-categories", + "parameters": [ + { + "name": "subscription_id", + "in": "query", + "description": "The ID of the subscription the ticket should be related to", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "organization_id", + "in": "query", + "description": "The ID of the organization the ticket should be related to", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "An array of available categories for a ticket.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "id": { + "description": "Machine name of the category as is listed in zendesk.", + "type": "string" + }, + "label": { + "description": "The human-readable label of the category.", + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + }, + "x-property-id-kebab": "list-ticket-categories", + "x-tag-id-kebab": "Support", + "x-return-types-displayReturn": true, + "x-return-types": [ + "object[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "object[]" + }, + "x-returnable": true + } + }, + "/organizations/{organization_id}/invitations": { + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "post": { + "summary": "Invite user to an organization by email", + "description": "Creates an invitation to an organization for a user with the specified email address.", + "operationId": "create-org-invite", + "tags": [ + "Organization Invitations" + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationInvitation" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict when there already is a pending invitation for the invitee", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "description": "The email address of the invitee." + }, + "permissions": { + "$ref": "#/components/schemas/OrganizationPermissions" + }, + "force": { + "type": "boolean", + "description": "Whether to cancel any pending invitation for the specified invitee, and create a new invitation." + } + }, + "required": [ + "email", + "permissions" + ] + } + } + } + }, + "x-property-id-kebab": "create-org-invite", + "x-tag-id-kebab": "Organization-Invitations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationInvitation" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationInvitation", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationInvitation" + }, + "x-returnable": true, + "x-description": [ + "Creates an invitation to an organization for a user with the specified email address." + ] + }, + "get": { + "summary": "List invitations to an organization", + "description": "Returns a list of invitations to an organization.", + "operationId": "list-org-invites", + "tags": [ + "Organization Invitations" + ], + "parameters": [ + { + "in": "query", + "name": "filter[state]", + "description": "Allows filtering by `state` of the invtations: \"pending\" (default), \"error\".", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "updated_at", + "-updated_at" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationInvitation" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-invites", + "x-tag-id-kebab": "Organization-Invitations", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationInvitation[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationInvitation[]" + }, + "x-returnable": true, + "x-description": [ + "Returns a list of invitations to an organization." + ] + } + }, + "/organizations/{organization_id}/invitations/{invitation_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/InvitationID" + } + ], + "delete": { + "summary": "Cancel a pending invitation to an organization", + "description": "Cancels the specified invitation.", + "operationId": "cancel-org-invite", + "tags": [ + "Organization Invitations" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "cancel-org-invite", + "x-tag-id-kebab": "Organization-Invitations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Cancels the specified invitation." + ] + } + }, + "/projects/{project_id}/invitations": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "post": { + "summary": "Invite user to a project by email", + "description": "Creates an invitation to a project for a user with the specified email address.", + "operationId": "create-project-invite", + "tags": [ + "Project Invitations" + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectInvitation" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "402": { + "description": "Payment Required when the number of users exceeds the subscription limit", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict when there already is a pending invitation for the invitee", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "admin", + "viewer" + ], + "description": "The role the invitee should be given on the project.", + "default": null + }, + "email": { + "type": "string", + "format": "email", + "description": "The email address of the invitee." + }, + "permissions": { + "type": "array", + "description": "Specifying the role on each environment type.", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "production", + "staging", + "development" + ], + "description": "The environment type." + }, + "role": { + "type": "string", + "enum": [ + "admin", + "viewer", + "contributor" + ], + "description": "The role the invitee should be given on the environment type." + } + } + } + }, + "environments": { + "deprecated": true, + "type": "array", + "description": "(Deprecated, use permissions instead) Specifying the role on each environment.", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the environment." + }, + "role": { + "type": "string", + "enum": [ + "admin", + "viewer", + "contributor" + ], + "description": "The role the invitee should be given on the environment." + } + } + } + }, + "force": { + "type": "boolean", + "description": "Whether to cancel any pending invitation for the specified invitee, and create a new invitation." + } + }, + "required": [ + "email" + ] + } + } + } + }, + "x-property-id-kebab": "create-project-invite", + "x-tag-id-kebab": "Project-Invitations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ProjectInvitation" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectInvitation", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectInvitation" + }, + "x-returnable": true, + "x-description": [ + "Creates an invitation to a project for a user with the specified email address." + ] + }, + "get": { + "summary": "List invitations to a project", + "description": "Returns a list of invitations to a project.", + "operationId": "list-project-invites", + "tags": [ + "Project Invitations" + ], + "parameters": [ + { + "in": "query", + "name": "filter[state]", + "description": "Allows filtering by `state` of the invtations: \"pending\" (default), \"error\".", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "updated_at", + "-updated_at" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProjectInvitation" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-project-invites", + "x-tag-id-kebab": "Project-Invitations", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\ProjectInvitation[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectInvitation[]" + }, + "x-returnable": true, + "x-description": [ + "Returns a list of invitations to a project." + ] + } + }, + "/projects/{project_id}/invitations/{invitation_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + }, + { + "$ref": "#/components/parameters/InvitationID" + } + ], + "delete": { + "summary": "Cancel a pending invitation to a project", + "description": "Cancels the specified invitation.", + "operationId": "cancel-project-invite", + "tags": [ + "Project Invitations" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "cancel-project-invite", + "x-tag-id-kebab": "Project-Invitations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Cancels the specified invitation." + ] + } + }, + "/ref/users": { + "get": { + "summary": "List referenced users", + "description": "Retrieves a list of users referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:users:0.", + "operationId": "list-referenced-users", + "tags": [ + "References" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A map of referenced users indexed by the user ID.", + "additionalProperties": { + "$ref": "#/components/schemas/UserReference" + } + }, + "examples": { + "example-1": { + "value": { + "497f6eca-6276-4993-bfeb-53cbbbba6f08": { + "email": "user@example.com", + "first_name": "string", + "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", + "last_name": "string", + "picture": "https://accounts.platform.sh/profiles/blimp_profile/themes/platformsh_theme/images/mail/logo.png", + "username": "string", + "mfa_enabled": false, + "sso_enabled": false + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "in", + "description": "The list of comma-separated user IDs generated by a trusted service.", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sig", + "description": "The signature of this request generated by a trusted service.", + "required": true + } + ], + "x-property-id-kebab": "list-referenced-users", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "array" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of users referenced by a trusted service. Clients cannot construct the URL themselves. The", + "correct URL will be provided in the HAL links of another API response, in the _links object with a", + "key like ref:users:0." + ] + } + }, + "/ref/teams": { + "get": { + "summary": "List referenced teams", + "description": "Retrieves a list of teams referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:teams:0.", + "operationId": "list-referenced-teams", + "tags": [ + "References" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A map of referenced teams indexed by the team ID.", + "additionalProperties": { + "$ref": "#/components/schemas/TeamReference" + } + }, + "examples": { + "example-1": { + "value": { + "01FVMKN9KHVWWVY488AVKDWHR3": { + "id": "01FVMKN9KHVWWVY488AVKDWHR3", + "label": "Contractors" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "in", + "description": "The list of comma-separated team IDs generated by a trusted service.", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sig", + "description": "The signature of this request generated by a trusted service.", + "required": true + } + ], + "x-property-id-kebab": "list-referenced-teams", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "array" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of teams referenced by a trusted service. Clients cannot construct the URL themselves. The", + "correct URL will be provided in the HAL links of another API response, in the _links object with a", + "key like ref:teams:0." + ] + } + }, + "/teams": { + "get": { + "summary": "List teams", + "description": "Retrieves a list of teams.", + "operationId": "list-teams", + "tags": [ + "Teams" + ], + "parameters": [ + { + "in": "query", + "name": "filter[organization_id]", + "description": "Allows filtering by `organization_id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[id]", + "description": "Allows filtering by `id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "label", + "-label", + "created_at", + "-created_at", + "updated_at", + "-updated_at" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Team" + } + }, + "count": { + "type": "integer", + "description": "Total count of all the teams." + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-teams", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of teams." + ] + }, + "post": { + "summary": "Create team", + "description": "Creates a new team.", + "operationId": "create-team", + "tags": [ + "Teams" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "organization_id", + "label" + ], + "properties": { + "organization_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the parent organization." + }, + "label": { + "type": "string", + "description": "The human-readable label of the team." + }, + "project_permissions": { + "type": "array", + "description": "Project permissions that are granted to the team.", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-team", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Team" + ], + "x-return-types-union": "\\Upsun\\Model\\Team", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Team" + }, + "x-returnable": true, + "x-description": [ + "Creates a new team." + ] + } + }, + "/teams/{team_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + } + ], + "get": { + "summary": "Get team", + "description": "Retrieves the specified team.", + "operationId": "get-team", + "tags": [ + "Teams" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-team", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Team" + ], + "x-return-types-union": "\\Upsun\\Model\\Team", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Team" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified team." + ] + }, + "patch": { + "summary": "Update team", + "description": "Updates the specified team.", + "operationId": "update-team", + "tags": [ + "Teams" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "The human-readable label of the team." + }, + "project_permissions": { + "type": "array", + "description": "Project permissions that are granted to the team.", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-team", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Team" + ], + "x-return-types-union": "\\Upsun\\Model\\Team", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Team" + }, + "x-returnable": true, + "x-description": [ + "Updates the specified team." + ] + }, + "delete": { + "summary": "Delete team", + "description": "Deletes the specified team.", + "operationId": "delete-team", + "tags": [ + "Teams" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-team", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes the specified team." + ] + } + }, + "/teams/{team_id}/members": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + } + ], + "get": { + "summary": "List team members", + "description": "Retrieves a list of users associated with a single team.", + "operationId": "list-team-members", + "tags": [ + "Teams" + ], + "parameters": [ + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "created_at", + "-created_at", + "updated_at", + "-updated_at" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamMember" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-team-members", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of users associated with a single team." + ] + }, + "post": { + "summary": "Create team member", + "description": "Creates a new team member.", + "operationId": "create-team-member", + "tags": [ + "Teams" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "user_id" + ], + "properties": { + "user_id": { + "type": "string", + "format": "uuid", + "description": "ID of the user." + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamMember" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-team-member", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\TeamMember" + ], + "x-return-types-union": "\\Upsun\\Model\\TeamMember", + "x-phpdoc": { + "return": "\\Upsun\\Model\\TeamMember" + }, + "x-returnable": true, + "x-description": [ + "Creates a new team member." + ] + } + }, + "/teams/{team_id}/members/{user_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "Get team member", + "description": "Retrieves the specified team member.", + "operationId": "get-team-member", + "tags": [ + "Teams" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamMember" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-team-member", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\TeamMember" + ], + "x-return-types-union": "\\Upsun\\Model\\TeamMember", + "x-phpdoc": { + "return": "\\Upsun\\Model\\TeamMember" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified team member." + ] + }, + "delete": { + "summary": "Delete team member", + "description": "Deletes the specified team member.", + "operationId": "delete-team-member", + "tags": [ + "Teams" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-team-member", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes the specified team member." + ] + } + }, + "/users/{user_id}/extended-access": { + "get": { + "summary": "List extended access of a user", + "description": "List extended access of the given user, which includes both individual and team access to project and organization.", + "operationId": "list-user-extended-access", + "tags": [ + "Grants" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + }, + { + "in": "query", + "name": "filter[resource_type]", + "description": "Allows filtering by `resource_type` (project or organization) using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[organization_id]", + "description": "Allows filtering by `organization_id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[permissions]", + "description": "Allows filtering by `permissions` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "x-examples": { + "example-1": { + "user_id": "ff9c8376-0227-4928-9b52-b08bc5426689", + "resource_id": "an3sjsfwfbgkm", + "resource_type": "project", + "organization_id": "01H2X80DMRDZWR6CX753YQHTND", + "granted_at": "2022-04-01T10:11:30.783289Z", + "updated_at": "2022-04-03T22:12:59.937864Z", + "permissions": [ + "viewer", + "staging:contributor" + ] + } + }, + "properties": { + "user_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user." + }, + "resource_id": { + "type": "string", + "description": "The ID of the resource." + }, + "resource_type": { + "type": "string", + "description": "The type of the resource access to which is granted.", + "enum": [ + "project", + "organization" + ] + }, + "organization_id": { + "type": "string", + "description": "The ID of the organization owning the resource." + }, + "permissions": { + "type": "array", + "description": "List of project permissions.", + "items": { + "type": "string" + } + }, + "granted_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was granted." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was updated." + } + } + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-user-extended-access", + "x-tag-id-kebab": "Grants", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "List extended access of the given user, which includes both individual and team access to project and", + "organization." + ] + } + }, + "/users/me": { + "get": { + "summary": "Get the current user", + "description": "Retrieves the current user, determined from the used access token.", + "operationId": "get-current-user", + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "get-current-user", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\User" + ], + "x-return-types-union": "\\Upsun\\Model\\User", + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the current user, determined from the used access token." + ] + } + }, + "/users/email={email}": { + "parameters": [ + { + "schema": { + "type": "string", + "format": "email", + "example": "hello@example.com" + }, + "name": "email", + "in": "path", + "required": true, + "description": "The user's email address." + } + ], + "get": { + "summary": "Get a user by email", + "description": "Retrieves a user matching the specified email address.", + "operationId": "get-user-by-email-address", + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "get-user-by-email-address", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\User" + ], + "x-return-types-union": "\\Upsun\\Model\\User", + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a user matching the specified email address." + ] + } + }, + "/users/username={username}": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "platform-sh" + }, + "name": "username", + "in": "path", + "required": true, + "description": "The user's username." + } + ], + "get": { + "summary": "Get a user by username", + "description": "Retrieves a user matching the specified username.", + "operationId": "get-user-by-username", + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + }, + "examples": {} + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "get-user-by-username", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\User" + ], + "x-return-types-union": "\\Upsun\\Model\\User", + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a user matching the specified username." + ] + } + }, + "/users/{user_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "Get a user", + "description": "Retrieves the specified user.", + "operationId": "get-user", + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "get-user", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\User" + ], + "x-return-types-union": "\\Upsun\\Model\\User", + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified user." + ] + }, + "patch": { + "summary": "Update a user", + "description": "Updates the specified user.", + "operationId": "update-user", + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "", + "type": "object", + "properties": { + "username": { + "type": "string", + "description": "The user's username." + }, + "first_name": { + "type": "string", + "description": "The user's first name." + }, + "last_name": { + "type": "string", + "description": "The user's last name." + }, + "picture": { + "type": "string", + "format": "uri", + "description": "The user's picture." + }, + "company": { + "type": "string", + "description": "The user's company." + }, + "website": { + "type": "string", + "format": "uri", + "description": "The user's website." + }, + "country": { + "type": "string", + "maxLength": 2, + "minLength": 2, + "description": "The user's country (2-letter country code)." + } + }, + "x-examples": { + "example-1": { + "company": "Platform.sh SAS", + "country": "EU", + "first_name": "Hello", + "last_name": "World", + "picture": "https://accounts.platform.sh/profiles/blimp_profile/themes/platformsh_theme/images/mail/logo.png", + "username": "username", + "website": "https://platform.sh" + } + } + } + } + } + }, + "x-property-id-kebab": "update-user", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\User" + ], + "x-return-types-union": "\\Upsun\\Model\\User", + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" + }, + "x-returnable": true, + "x-description": [ + "Updates the specified user." + ] + } + }, + "/users/{user_id}/emailaddress": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Reset email address", + "description": "Requests a reset of the user's email address. A confirmation email will be sent to the new address when the request is accepted.", + "operationId": "reset-email-address", + "tags": [ + "Users" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email_address": { + "type": "string", + "format": "email" + } + }, + "required": [ + "email_address" + ] + } + } + }, + "description": "" + }, + "x-property-id-kebab": "reset-email-address", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Requests a reset of the user's email address. A confirmation email will be sent to the new address when the", + "request is accepted." + ] + } + }, + "/users/{user_id}/resetpassword": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Reset user password", + "description": "Requests a reset of the user's password. A password reset email will be sent to the user when the request is accepted.", + "operationId": "reset-password", + "tags": [ + "Users" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "reset-password", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Requests a reset of the user's password. A password reset email will be sent to the user when the request is", + "accepted." + ] + } + }, + "/users/{user_id}/api-tokens": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "List a user's API tokens", + "description": "Retrieves a list of API tokens associated with a single user.", + "operationId": "list-api-tokens", + "tags": [ + "Api Tokens" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiToken" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-api-tokens", + "x-tag-id-kebab": "Api-Tokens", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\ApiToken[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ApiToken[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of API tokens associated with a single user." + ] + }, + "post": { + "summary": "Create an API token", + "description": "Creates an API token", + "operationId": "create-api-token", + "tags": [ + "Api Tokens" + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The token name." + } + }, + "required": [ + "name" + ] + } + } + } + }, + "x-property-id-kebab": "create-api-token", + "x-tag-id-kebab": "Api-Tokens", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ApiToken" + ], + "x-return-types-union": "\\Upsun\\Model\\ApiToken", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ApiToken" + }, + "x-returnable": true, + "x-description": [ + "Creates an API token" + ] + } + }, + "/users/{user_id}/api-tokens/{token_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + }, + { + "schema": { + "type": "string", + "format": "uuid" + }, + "name": "token_id", + "in": "path", + "required": true, + "description": "The ID of the token." + } + ], + "get": { + "summary": "Get an API token", + "description": "Retrieves the specified API token.", + "operationId": "get-api-token", + "tags": [ + "Api Tokens" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "get-api-token", + "x-tag-id-kebab": "Api-Tokens", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ApiToken" + ], + "x-return-types-union": "\\Upsun\\Model\\ApiToken", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ApiToken" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified API token." + ] + }, + "delete": { + "summary": "Delete an API token", + "description": "Deletes an API token", + "operationId": "delete-api-token", + "tags": [ + "Api Tokens" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "delete-api-token", + "x-tag-id-kebab": "Api-Tokens", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes an API token" + ] + } + }, + "/users/{user_id}/connections": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "List federated login connections", + "description": "Retrieves a list of connections associated with a single user.", + "operationId": "list-login-connections", + "tags": [ + "Connections" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Connection" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-login-connections", + "x-tag-id-kebab": "Connections", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Connection[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Connection[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of connections associated with a single user." + ] + } + }, + "/users/{user_id}/connections/{provider}": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "provider", + "in": "path", + "required": true, + "description": "The name of the federation provider." + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "Get a federated login connection", + "description": "Retrieves the specified connection.", + "operationId": "get-login-connection", + "tags": [ + "Connections" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Connection" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "get-login-connection", + "x-tag-id-kebab": "Connections", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Connection" + ], + "x-return-types-union": "\\Upsun\\Model\\Connection", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Connection" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified connection." + ] + }, + "delete": { + "summary": "Delete a federated login connection", + "description": "Deletes the specified connection.", + "operationId": "delete-login-connection", + "tags": [ + "Connections" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "delete-login-connection", + "x-tag-id-kebab": "Connections", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes the specified connection." + ] + } + }, + "/users/{user_id}/totp": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "Get information about TOTP enrollment", + "description": "Retrieves TOTP enrollment information.", + "operationId": "get-totp-enrollment", + "tags": [ + "Mfa" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "issuer": { + "type": "string", + "format": "uri", + "description": "" + }, + "account_name": { + "type": "string", + "description": "Account name for the enrollment." + }, + "secret": { + "type": "string", + "description": "The secret seed for the enrollment" + }, + "qr_code": { + "type": "string", + "format": "byte", + "description": "Data URI of a PNG QR code image for the enrollment." + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict" + } + }, + "x-property-id-kebab": "get-totp-enrollment", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves TOTP enrollment information." + ] + }, + "post": { + "summary": "Confirm TOTP enrollment", + "description": "Confirms the given TOTP enrollment.", + "operationId": "confirm-totp-enrollment", + "tags": [ + "Mfa" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "recovery_codes": { + "type": "array", + "description": "A list of recovery codes for the MFA enrollment.", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The secret seed for the enrollment" + }, + "passcode": { + "type": "string", + "description": "TOTP passcode for the enrollment" + } + }, + "required": [ + "secret", + "passcode" + ] + } + } + }, + "description": "" + }, + "x-property-id-kebab": "confirm-totp-enrollment", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Confirms the given TOTP enrollment." + ] + }, + "delete": { + "summary": "Withdraw TOTP enrollment", + "description": "Withdraws from the TOTP enrollment.", + "operationId": "withdraw-totp-enrollment", + "tags": [ + "Mfa" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "withdraw-totp-enrollment", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Withdraws from the TOTP enrollment." + ] + } + }, + "/users/{user_id}/codes": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Re-create recovery codes", + "description": "Re-creates recovery codes for the MFA enrollment.", + "operationId": "recreate-recovery-codes", + "tags": [ + "Mfa" + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "recovery_codes": { + "type": "array", + "description": "A list of recovery codes for the MFA enrollment.", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "recreate-recovery-codes", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Re-creates recovery codes for the MFA enrollment." + ] + } + }, + "/users/{user_id}/phonenumber": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Verify phone number", + "description": "Starts a phone number verification session.", + "operationId": "verify-phone-number", + "tags": [ + "PhoneNumber" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sid": { + "type": "string", + "description": "Session ID of the verification." + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "channel": { + "type": "string", + "description": "The channel used to receive the verification code.", + "enum": [ + "sms", + "whatsapp", + "call" + ] + }, + "phone_number": { + "type": "string", + "description": "The phone number used to receive the verification code." + } + }, + "required": [ + "channel", + "phone_number" + ] + } + } + } + }, + "x-property-id-kebab": "verify-phone-number", + "x-tag-id-kebab": "PhoneNumber", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Starts a phone number verification session." + ] + } + }, + "/users/{user_id}/phonenumber/{sid}": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "sid", + "in": "path", + "required": true, + "description": "The session ID obtained from `POST /users/{user_id}/phonenumber`." + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Confirm phone number", + "description": "Confirms phone number using a verification code.", + "operationId": "confirm-phone-number", + "tags": [ + "PhoneNumber" + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The verification code received on your phone." + } + }, + "required": [ + "code" + ] + } + } + } + }, + "x-property-id-kebab": "confirm-phone-number", + "x-tag-id-kebab": "PhoneNumber", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Confirms phone number using a verification code." + ] + } + }, + "/users/{user_id}/teams": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "User teams", + "description": "Retrieves teams that the specified user is a member of.", + "operationId": "list-user-teams", + "tags": [ + "Teams" + ], + "parameters": [ + { + "in": "query", + "name": "filter[organization_id]", + "description": "Allows filtering by `organization_id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "created_at", + "-created_at", + "updated_at", + "-updated_at" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Team" + } + }, + "count": { + "type": "integer", + "description": "Total count of all the teams." + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-user-teams", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves teams that the specified user is a member of." + ] + } + }, + "/projects/{projectId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "get-projects", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + } + }, + "tags": [ + "Project" + ], + "summary": "Get a project", + "description": "Retrieve the details of a single project.", + "x-property-id-kebab": "get-projects", + "x-tag-id-kebab": "Project", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Project" + ], + "x-return-types-union": "\\Upsun\\Model\\Project", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Project" + }, + "x-returnable": true, + "x-description": [ + "Retrieve the details of a single project." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "update-projects", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project" + ], + "summary": "Update a project", + "description": "Update the details of an existing project.", + "x-property-id-kebab": "update-projects", + "x-tag-id-kebab": "Project", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update the details of an existing project." + ] + } + }, + "/projects/{projectId}/activities": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-activities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityCollection" + } + } + } + } + }, + "tags": [ + "Project Activity" + ], + "summary": "Get project activity log", + "description": "Retrieve a project's activity log including logging actions in all\nenvironments within a project. This returns a list of objects\nwith records of actions such as:\n\n- Commits being pushed to the repository\n- A new environment being branched out from the specified environment\n- A snapshot being created of the specified environment\n\nThe object includes a timestamp of when the action occurred\n(`created_at`), when the action concluded (`updated_at`),\nthe current `state` of the action, the action's completion\npercentage (`completion_percent`), the `environments` it\napplies to and when the activity expires (`expires_at`).\n\nThere are other related information in the `payload`.\nThe contents of the `payload` varies based on the `type` of the\nactivity. For example:\n\n- An `environment.branch` action's `payload` can contain objects\nrepresenting the environment's `parent` environment and the\nbranching action's `outcome`.\n\n- An `environment.push` action's `payload` can contain objects\nrepresenting the `environment`, the specific `commits` included in\nthe push, and the `user` who pushed.\n\nExpired activities are removed from the project activity log, except\nthe last 100 expired objects provided they are not of type `environment.cron`\nor `environment.backup`.\n", + "x-property-id-kebab": "list-projects-activities", + "x-tag-id-kebab": "Project-Activity", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Activity[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Activity[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a project's activity log including logging actions in all environments within a project. This returns a", + "list of objects with records of actions such as: - Commits being pushed to the repository - A new environment", + "being branched out from the specified environment - A snapshot being created of the specified environment The", + "object includes a timestamp of when the action occurred (`created_at`), when the action concluded (`updated_at`),", + "the current `state` of the action, the action's completion percentage (`completion_percent`), the `environments`", + "it applies to and when the activity expires (`expires_at`). There are other related information in the `payload`.", + "The contents of the `payload` varies based on the `type` of the activity. For example: - An `environment.branch`", + "action's `payload` can contain objects representing the environment's `parent` environment and the branching", + "action's `outcome`. - An `environment.push` action's `payload` can contain objects representing the", + "`environment`, the specific `commits` included in the push, and the `user` who pushed. Expired activities are", + "removed from the project activity log, except the last 100 expired objects provided they are not of type", + "`environment.cron` or `environment.backup`." + ] + } + }, + "/projects/{projectId}/activities/{activityId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "activityId" + } + ], + "operationId": "get-projects-activities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Activity" + } + } + } + } + }, + "tags": [ + "Project Activity" + ], + "summary": "Get a project activity log entry", + "description": "Retrieve a single activity log entry as specified by an\n`id` returned by the\n[Get project activity log](#tag/Project-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1activities%2Fget)\nendpoint. See the documentation on that endpoint for details about\nthe information this endpoint can return.\n", + "x-property-id-kebab": "get-projects-activities", + "x-tag-id-kebab": "Project-Activity", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Activity" + ], + "x-return-types-union": "\\Upsun\\Model\\Activity", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Activity" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a single activity log entry as specified by an `id` returned by the Get project activity log", + "(https://docs.upsun.com/api/#tag/Project-Activity/paths//projects/{projectId}/activities/get) endpoint. See the", + "documentation on that endpoint for details about the information this endpoint can return." + ] + } + }, + "/projects/{projectId}/activities/{activityId}/cancel": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "activityId" + } + ], + "operationId": "action-projects-activities-cancel", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project Activity" + ], + "summary": "Cancel a project activity", + "description": "Cancel a single activity as specified by an `id` returned by the\n[Get project activity log](#tag/Project-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1activities%2Fget)\nendpoint.\n\nPlease note that not all activities are cancelable.\n", + "x-property-id-kebab": "action-projects-activities-cancel", + "x-tag-id-kebab": "Project-Activity", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Cancel a single activity as specified by an `id` returned by the Get project activity log", + "(https://docs.upsun.com/api/#tag/Project-Activity/paths//projects/{projectId}/activities/get) endpoint. Please", + "note that not all activities are cancelable." + ] + } + }, + "/projects/{projectId}/capabilities": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "get-projects-capabilities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectCapabilities" + } + } + } + } + }, + "tags": [ + "Project" + ], + "summary": "Get a project's capabilities", + "description": "Get a list of capabilities on a project, as defined by the billing system.\nFor instance, one special capability that could be defined on a project is\nlarge development environments.\n", + "x-property-id-kebab": "get-projects-capabilities", + "x-tag-id-kebab": "Project", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ProjectCapabilities" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectCapabilities", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectCapabilities" + }, + "x-returnable": true, + "x-description": [ + "Get a list of capabilities on a project, as defined by the billing system. For instance, one special capability", + "that could be defined on a project is large development environments." + ] + } + }, + "/projects/{projectId}/certificates": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateCollection" + } + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Get list of SSL certificates", + "description": "Retrieve a list of objects representing the SSL certificates\nassociated with a project.\n", + "x-property-id-kebab": "list-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Certificate[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Certificate[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects representing the SSL certificates associated with a project." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateCreateInput" + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Add an SSL certificate", + "description": "Add a single SSL certificate to a project.\n", + "x-property-id-kebab": "create-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Add a single SSL certificate to a project." + ] + } + }, + "/projects/{projectId}/certificates/{certificateId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateId" + } + ], + "operationId": "get-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Certificate" + } + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Get an SSL certificate", + "description": "Retrieve information about a single SSL certificate\nassociated with a project.\n", + "x-property-id-kebab": "get-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Certificate" + ], + "x-return-types-union": "\\Upsun\\Model\\Certificate", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Certificate" + }, + "x-returnable": true, + "x-description": [ + "Retrieve information about a single SSL certificate associated with a project." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificatePatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateId" + } + ], + "operationId": "update-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Update an SSL certificate", + "description": "Update a single SSL certificate associated with a project.\n", + "x-property-id-kebab": "update-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update a single SSL certificate associated with a project." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateId" + } + ], + "operationId": "delete-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Delete an SSL certificate", + "description": "Delete a single SSL certificate associated with a project.\n", + "x-property-id-kebab": "delete-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a single SSL certificate associated with a project." + ] + } + }, + "/projects/{projectId}/clear_build_cache": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "action-projects-clear-build-cache", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project" + ], + "summary": "Clear project build cache", + "description": "On rare occasions, a project's build cache can become corrupted. This\nendpoint will entirely flush the project's build cache. More information\non [clearing the build cache can be found in our user documentation.](https://docs.upsun.com/anchors/troubleshoot/clear-build-cache/)\n", + "x-property-id-kebab": "action-projects-clear-build-cache", + "x-tag-id-kebab": "Project", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "On rare occasions, a project's build cache can become corrupted. This endpoint will entirely flush the project's", + "build cache. More information on [clearing the build cache can be found in our user", + "documentation.](https://docs.upsun.com/anchors/troubleshoot/clear-build-cache/)" + ] + } + }, + "/projects/{projectId}/deployments": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentTargetCollection" + } + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Get project deployment target info", + "description": "The deployment target information for the project.\n", + "x-property-id-kebab": "list-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\DeploymentTarget[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\DeploymentTarget[]" + }, + "x-returnable": true, + "x-description": [ + "The deployment target information for the project." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentTargetCreateInput" + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Create a project deployment target", + "description": "Set the deployment target information for a project.\n", + "x-property-id-kebab": "create-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Set the deployment target information for a project." + ] + } + }, + "/projects/{projectId}/deployments/{deploymentTargetConfigurationId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentTargetConfigurationId" + } + ], + "operationId": "get-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentTarget" + } + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Get a single project deployment target", + "description": "Get a single deployment target configuration of a project.\n", + "x-property-id-kebab": "get-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\DeploymentTarget" + ], + "x-return-types-union": "\\Upsun\\Model\\DeploymentTarget", + "x-phpdoc": { + "return": "\\Upsun\\Model\\DeploymentTarget" + }, + "x-returnable": true, + "x-description": [ + "Get a single deployment target configuration of a project." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentTargetPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentTargetConfigurationId" + } + ], + "operationId": "update-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Update a project deployment", + "x-property-id-kebab": "update-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentTargetConfigurationId" + } + ], + "operationId": "delete-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Delete a single project deployment target", + "description": "Delete a single deployment target configuration associated with a specific project.\n", + "x-property-id-kebab": "delete-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a single deployment target configuration associated with a specific project." + ] + } + }, + "/projects/{projectId}/domains": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainCollection" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Get list of project domains", + "description": "Retrieve a list of objects representing the user-specified domains\nassociated with a project. Note that this does *not* return the\ndomains automatically assigned to a project that appear under\n\"Access site\" on the user interface.\n", + "x-property-id-kebab": "list-projects-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Domain[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Domain[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects representing the user-specified domains associated with a project. Note that this does", + "*not* return the domains automatically assigned to a project that appear under \"Access site\" on the user", + "interface." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainCreateInput" + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Add a project domain", + "description": "Add a single domain to a project.\nIf the `ssl` field is left blank without an object containing\na PEM-encoded SSL certificate, a certificate will\n[be provisioned for you via Let's Encrypt.](https://docs.upsun.com/anchors/routes/https/certificates/)\n", + "x-property-id-kebab": "create-projects-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Add a single domain to a project. If the `ssl` field is left blank without an object containing a PEM-encoded SSL", + "certificate, a certificate will [be provisioned for you via Let's", + "Encrypt.](https://docs.upsun.com/anchors/routes/https/certificates/)" + ] + } + }, + "/projects/{projectId}/domains/{domainId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "get-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Get a project domain", + "description": "Retrieve information about a single user-specified domain\nassociated with a project.\n", + "x-property-id-kebab": "get-projects-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Domain" + ], + "x-return-types-union": "\\Upsun\\Model\\Domain", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Domain" + }, + "x-returnable": true, + "x-description": [ + "Retrieve information about a single user-specified domain associated with a project." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "update-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Update a project domain", + "description": "Update the information associated with a single user-specified\ndomain associated with a project.\n", + "x-property-id-kebab": "update-projects-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update the information associated with a single user-specified domain associated with a project." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "delete-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Delete a project domain", + "description": "Delete a single user-specified domain associated with a project.\n", + "x-property-id-kebab": "delete-projects-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a single user-specified domain associated with a project." + ] + } + }, + "/projects/{projectId}/environment-types": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-environment-types", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentTypeCollection" + } + } + } + } + }, + "tags": [ + "Environment Type" + ], + "summary": "Get environment types", + "description": "List all available environment types", + "x-property-id-kebab": "list-projects-environment-types", + "x-tag-id-kebab": "Environment-Type", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentType[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentType[]" + }, + "x-returnable": true, + "x-description": [ + "List all available environment types" + ] + } + }, + "/projects/{projectId}/environment-types/{environmentTypeId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentTypeId" + } + ], + "operationId": "get-environment-type", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentType" + } + } + } + } + }, + "tags": [ + "Environment Type" + ], + "summary": "Get environment type links", + "description": "Lists the endpoints used to retrieve info about the environment type.", + "x-property-id-kebab": "get-environment-type", + "x-tag-id-kebab": "Environment-Type", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentType" + ], + "x-return-types-union": "\\Upsun\\Model\\EnvironmentType", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentType" + }, + "x-returnable": true, + "x-description": [ + "Lists the endpoints used to retrieve info about the environment type." + ] + } + }, + "/projects/{projectId}/environments": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-environments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentCollection" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Get list of project environments", + "description": "Retrieve a list of a project's existing environments and the\ninformation associated with each environment.\n", + "x-property-id-kebab": "list-projects-environments", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Environment[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Environment[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of a project's existing environments and the information associated with each environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "get-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Environment" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Get an environment", + "description": "Retrieve the details of a single existing environment.", + "x-property-id-kebab": "get-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Environment" + ], + "x-return-types-union": "\\Upsun\\Model\\Environment", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Environment" + }, + "x-returnable": true, + "x-description": [ + "Retrieve the details of a single existing environment." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "update-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Update an environment", + "description": "Update the details of a single existing environment.", + "x-property-id-kebab": "update-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update the details of a single existing environment." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "delete-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Delete an environment", + "description": "Delete a specified environment.", + "x-property-id-kebab": "delete-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a specified environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/activate": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "activate-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentActivateInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Activate an environment", + "description": "Set the specified environment's status to active", + "x-property-id-kebab": "activate-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Set the specified environment's status to active" + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/activities": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-activities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityCollection" + } + } + } + } + }, + "tags": [ + "Environment Activity" + ], + "summary": "Get environment activity log", + "description": "Retrieve an environment's activity log. This returns a list of object\nwith records of actions such as:\n\n- Commits being pushed to the repository\n- A new environment being branched out from the specified environment\n- A snapshot being created of the specified environment\n\nThe object includes a timestamp of when the action occurred\n(`created_at`), when the action concluded (`updated_at`),\nthe current `state` of the action, the action's completion\npercentage (`completion_percent`), and other related information in\nthe `payload`.\n\nThe contents of the `payload` varies based on the `type` of the\nactivity. For example:\n\n- An `environment.branch` action's `payload` can contain objects\nrepresenting the `parent` environment and the branching action's\n`outcome`.\n\n- An `environment.push` action's `payload` can contain objects\nrepresenting the `environment`, the specific `commits` included in\nthe push, and the `user` who pushed.\n", + "x-property-id-kebab": "list-projects-environments-activities", + "x-tag-id-kebab": "Environment-Activity", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Activity[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Activity[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve an environment's activity log. This returns a list of object with records of actions such as: - Commits", + "being pushed to the repository - A new environment being branched out from the specified environment - A snapshot", + "being created of the specified environment The object includes a timestamp of when the action occurred", + "(`created_at`), when the action concluded (`updated_at`), the current `state` of the action, the action's", + "completion percentage (`completion_percent`), and other related information in the `payload`. The contents of the", + "`payload` varies based on the `type` of the activity. For example: - An `environment.branch` action's `payload`", + "can contain objects representing the `parent` environment and the branching action's `outcome`. - An", + "`environment.push` action's `payload` can contain objects representing the `environment`, the specific `commits`", + "included in the push, and the `user` who pushed." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/activities/{activityId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "activityId" + } + ], + "operationId": "get-projects-environments-activities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Activity" + } + } + } + } + }, + "tags": [ + "Environment Activity" + ], + "summary": "Get an environment activity log entry", + "description": "Retrieve a single environment activity entry as specified by an\n`id` returned by the\n[Get environment activities list](#tag/Environment-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1activities%2Fget)\nendpoint. See the documentation on that endpoint for details about\nthe information this endpoint can return.\n", + "x-property-id-kebab": "get-projects-environments-activities", + "x-tag-id-kebab": "Environment-Activity", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Activity" + ], + "x-return-types-union": "\\Upsun\\Model\\Activity", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Activity" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a single environment activity entry as specified by an `id` returned by the Get environment activities", + "list", + "(https://docs.upsun.com/api/#tag/Environment-Activity/paths//projects/{projectId}/environments/{environmentId}/activities/get)", + "endpoint. See the documentation on that endpoint for details about the information this endpoint can return." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/activities/{activityId}/cancel": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "activityId" + } + ], + "operationId": "action-projects-environments-activities-cancel", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment Activity" + ], + "summary": "Cancel an environment activity", + "description": "Cancel a single activity as specified by an `id` returned by the\n[Get environment activities list](#tag/Environment-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1activities%2Fget)\nendpoint.\n\nPlease note that not all activities are cancelable.\n", + "x-property-id-kebab": "action-projects-environments-activities-cancel", + "x-tag-id-kebab": "Environment-Activity", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Cancel a single activity as specified by an `id` returned by the Get environment activities list", + "(https://docs.upsun.com/api/#tag/Environment-Activity/paths//projects/{projectId}/environments/{environmentId}/activities/get)", + "endpoint. Please note that not all activities are cancelable." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/backup": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "backup-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentBackupInput" + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Create backup of environment", + "description": "Trigger a new backup of an environment to be created. See the\n[Backups](https://docs.upsun.com/anchors/environments/backup/)\nsection of the documentation for more information.\n", + "x-property-id-kebab": "backup-environment", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Trigger a new backup of an environment to be created. See the", + "[Backups](https://docs.upsun.com/anchors/environments/backup/) section of the documentation for more information." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/backups": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-backups", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BackupCollection" + } + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Get an environment's backup list", + "description": "Retrieve a list of objects representing backups of this environment.\n", + "x-stability": "EXPERIMENTAL", + "x-property-id-kebab": "list-projects-environments-backups", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Backup[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Backup[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects representing backups of this environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/backups/{backupId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "backupId" + } + ], + "operationId": "get-projects-environments-backups", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Backup" + } + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Get an environment backup's info", + "description": "Get the details of a specific backup from an environment using the `id`\nof the entry retrieved by the\n[Get backups list](#tag/Environment-Backups%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1backups%2Fget)\nendpoint.\n", + "x-stability": "EXPERIMENTAL", + "x-property-id-kebab": "get-projects-environments-backups", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Backup" + ], + "x-return-types-union": "\\Upsun\\Model\\Backup", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Backup" + }, + "x-returnable": true, + "x-description": [ + "Get the details of a specific backup from an environment using the `id` of the entry retrieved by the Get backups", + "list", + "(https://docs.upsun.com/api/#tag/Environment-Backups/paths//projects/{projectId}/environments/{environmentId}/backups/get)", + "endpoint." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "backupId" + } + ], + "operationId": "delete-projects-environments-backups", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Delete an environment backup", + "description": "Delete a specific backup from an environment using the `id`\nof the entry retrieved by the\n[Get backups list](#tag/Environment-Backups%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1backups%2Fget)\nendpoint.\n", + "x-stability": "EXPERIMENTAL", + "x-property-id-kebab": "delete-projects-environments-backups", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a specific backup from an environment using the `id` of the entry retrieved by the Get backups list", + "(https://docs.upsun.com/api/#tag/Environment-Backups/paths//projects/{projectId}/environments/{environmentId}/backups/get)", + "endpoint." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/backups/{backupId}/restore": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "backupId" + } + ], + "operationId": "restore-backup", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentRestoreInput" + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Restore an environment snapshot", + "description": "Restore a specific backup from an environment using the `id`\nof the entry retrieved by the\n[Get backups list](#tag/Environment-Backups%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1backups%2Fget)\nendpoint.\n", + "x-stability": "EXPERIMENTAL", + "x-property-id-kebab": "restore-backup", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Restore a specific backup from an environment using the `id` of the entry retrieved by the Get backups list", + "(https://docs.upsun.com/api/#tag/Environment-Backups/paths//projects/{projectId}/environments/{environmentId}/backups/get)", + "endpoint." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/branch": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "branch-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentBranchInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Branch an environment", + "description": "Create a new environment as a branch of the current environment.\n", + "x-property-id-kebab": "branch-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Create a new environment as a branch of the current environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/deactivate": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "deactivate-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Deactivate an environment", + "description": "Destroy all services and data running on this environment so that\nonly the Git branch remains. The environment can be reactivated\nlater at any time; reactivating an environment will sync data\nfrom the parent environment and redeploy.\n\n**NOTE: ALL DATA IN THIS ENVIRONMENT WILL BE IRREVOCABLY LOST**\n", + "x-property-id-kebab": "deactivate-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Destroy all services and data running on this environment so that only the Git branch remains. The environment", + "can be reactivated later at any time; reactivating an environment will sync data from the parent environment and", + "redeploy. **NOTE: ALL DATA IN THIS ENVIRONMENT WILL BE IRREVOCABLY LOST**" + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/deploy": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "deploy-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentDeployInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Deploy an environment", + "description": "Trigger a controlled [manual deployment](https://docs.upsun.com/learn/overview/build-deploy.html#manual-deployment)\nto release all the staged changes\n", + "x-property-id-kebab": "deploy-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Trigger a controlled [manual", + "deployment](https://docs.upsun.com/learn/overview/build-deploy.html#manual-deployment) to release all the staged", + "changes" + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/deployments": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentCollection" + } + } + } + } + }, + "tags": [ + "Deployment" + ], + "summary": "Get an environment's deployment information", + "description": "Retrieve the read-only configuration of an environment's deployment.\nThe returned information is everything required to\nrecreate a project's current deployment.\n\nMore specifically, the objects\nreturned by this endpoint contain the configuration derived from the\nrepository's YAML configuration file: `.upsun/config.yaml`.\n\nAdditionally, any values deriving from environment variables, the\ndomains attached to a project, project access settings, etc. are\nincluded here.\n\nThis endpoint currently returns a list containing a single deployment\nconfiguration with an `id` of `current`. This may be subject to change\nin the future.\n", + "x-property-id-kebab": "list-projects-environments-deployments", + "x-tag-id-kebab": "Deployment", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Deployment[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Deployment[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve the read-only configuration of an environment's deployment. The returned information is everything", + "required to recreate a project's current deployment. More specifically, the objects returned by this endpoint", + "contain the configuration derived from the repository's YAML configuration file: `.upsun/config.yaml`.", + "Additionally, any values deriving from environment variables, the domains attached to a project, project access", + "settings, etc. are included here. This endpoint currently returns a list containing a single deployment", + "configuration with an `id` of `current`. This may be subject to change in the future." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentId" + } + ], + "operationId": "get-projects-environments-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deployment" + } + } + } + } + }, + "tags": [ + "Deployment" + ], + "summary": "Get a single environment deployment", + "description": "Retrieve a single deployment configuration with an id of `current`. This may be subject to change in the future.\nOnly `current` can be queried.\n", + "x-property-id-kebab": "get-projects-environments-deployments", + "x-tag-id-kebab": "Deployment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Deployment" + ], + "x-return-types-union": "\\Upsun\\Model\\Deployment", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Deployment" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a single deployment configuration with an id of `current`. This may be subject to change in the future.", + "Only `current` can be queried." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}/operations": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentId" + } + ], + "operationId": "run-operation", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentOperationInput" + } + } + } + }, + "tags": [ + "Runtime Operations" + ], + "summary": "Execute a runtime operation", + "description": "Execute a runtime operation on a currently deployed environment. This allows you to run one-off commands, such as rebuilding static assets on demand, by defining an `operations` key in a project's `.upsun/config.yaml` configuration. More information on runtime operations is [available in our user documentation](https://docs.upsun.com/anchors/app/runtime-operations/).", + "x-property-id-kebab": "run-operation", + "x-tag-id-kebab": "Runtime-Operations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Execute a runtime operation on a currently deployed environment. This allows you to run one-off commands, such as", + "rebuilding static assets on demand, by defining an `operations` key in a project's `.upsun/config.yaml`", + "configuration. More information on runtime operations is [available in our user", + "documentation](https://docs.upsun.com/anchors/app/runtime-operations/)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/domains": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainCollection" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Get a list of environment domains", + "description": "Retrieve a list of objects representing the user-specified domains\nassociated with an environment. Note that this does *not* return the\n`.platformsh.site` subdomains, which are automatically assigned to\nthe environment.\n", + "x-property-id-kebab": "list-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Domain[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Domain[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects representing the user-specified domains associated with an environment. Note that this", + "does *not* return the `.platformsh.site` subdomains, which are automatically assigned to the environment." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "create-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainCreateInput" + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Add an environment domain", + "description": "Add a single domain to an environment.\nIf the environment is not production, the `replacement_for` field\nis required, which binds a new domain to an existing one from a\nproduction environment.\nIf the `ssl` field is left blank without an object containing\na PEM-encoded SSL certificate, a certificate will\n[be provisioned for you via Let's Encrypt](https://docs.upsun.com/anchors/routes/https/certificates/).\n", + "x-property-id-kebab": "create-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Add a single domain to an environment. If the environment is not production, the `replacement_for` field is", + "required, which binds a new domain to an existing one from a production environment. If the `ssl` field is left", + "blank without an object containing a PEM-encoded SSL certificate, a certificate will [be provisioned for you via", + "Let's Encrypt](https://docs.upsun.com/anchors/routes/https/certificates/)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/domains/{domainId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "get-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Get an environment domain", + "description": "Retrieve information about a single user-specified domain\nassociated with an environment.\n", + "x-property-id-kebab": "get-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Domain" + ], + "x-return-types-union": "\\Upsun\\Model\\Domain", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Domain" + }, + "x-returnable": true, + "x-description": [ + "Retrieve information about a single user-specified domain associated with an environment." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "update-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Update an environment domain", + "description": "Update the information associated with a single user-specified\ndomain associated with an environment.\n", + "x-property-id-kebab": "update-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update the information associated with a single user-specified domain associated with an environment." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "delete-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Delete an environment domain", + "description": "Delete a single user-specified domain associated with an environment.\n", + "x-property-id-kebab": "delete-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a single user-specified domain associated with an environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/initialize": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "initialize-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentInitializeInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Initialize a new environment", + "description": "Initialize and configure a new environment with an existing repository.\nThe payload is the url of a git repository with a profile name:\n\n```\n{\n \"repository\": \"git@github.com:platformsh/a-project-template.git@master\",\n \"profile\": \"Example Project\",\n \"files\": [\n {\n \"mode\": 0600,\n \"path\": \"config.json\",\n \"contents\": \"XXXXXXXX\"\n }\n ]\n}\n```\nIt can optionally carry additional files that will be committed to the\nrepository, the POSIX file mode to set on each file, and the base64-encoded\ncontents of each file.\n\nThis endpoint can also add a second repository\nURL in the `config` parameter that will be added to the contents of the first.\nThis allows you to put your application in one repository and the Upsun\nYAML configuration files in another.\n", + "x-property-id-kebab": "initialize-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Initialize and configure a new environment with an existing repository. The payload is the url of a git", + "repository with a profile name: ``` { \"repository\": \"git@github.com:platformsh/a-project-template.git@master\",", + "\"profile\": \"Example Project\", \"files\": [ { \"mode\": 0600, \"path\": \"config.json\", \"contents\": \"XXXXXXXX\" } ] } ```", + "It can optionally carry additional files that will be committed to the repository, the POSIX file mode to set on", + "each file, and the base64-encoded contents of each file. This endpoint can also add a second repository URL in", + "the `config` parameter that will be added to the contents of the first. This allows you to put your application", + "in one repository and the Upsun YAML configuration files in another." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/merge": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "merge-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentMergeInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Merge an environment", + "description": "Merge an environment into its parent. This means that code changes\nfrom the branch environment will be merged into the parent branch, and\nthe parent branch will be rebuilt and deployed with the new code changes,\nretaining the existing data in the parent environment.\n", + "x-property-id-kebab": "merge-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Merge an environment into its parent. This means that code changes from the branch environment will be merged", + "into the parent branch, and the parent branch will be rebuilt and deployed with the new code changes, retaining", + "the existing data in the parent environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/pause": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "pause-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Pause an environment", + "description": "Pause an environment, stopping all services and applications (except the router).\n\nDevelopment environments are often used for a limited time and then abandoned.\nTo prevent unnecessary consumption of resources, development environments that\nhaven't been redeployed in 14 days are automatically paused.\n\nYou can pause an environment manually at any time using this endpoint. Further\ninformation is available in our [public documentation](https://docs.upsun.com/anchors/environments/paused/).\n", + "x-property-id-kebab": "pause-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Pause an environment, stopping all services and applications (except the router). Development environments are", + "often used for a limited time and then abandoned. To prevent unnecessary consumption of resources, development", + "environments that haven't been redeployed in 14 days are automatically paused. You can pause an environment", + "manually at any time using this endpoint. Further information is available in our [public", + "documentation](https://docs.upsun.com/anchors/environments/paused/)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/redeploy": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "redeploy-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Redeploy an environment", + "description": "Trigger the redeployment sequence of an environment.", + "x-property-id-kebab": "redeploy-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Trigger the redeployment sequence of an environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/resume": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "resume-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Resume a paused environment", + "description": "Resume a paused environment, restarting all services and applications.\n\nDevelopment environments that haven't been used for 14 days will be paused\nautomatically. They can be resumed via a redeployment or manually using this\nendpoint or the CLI as described in the [public documentation](https://docs.upsun.com/anchors/environments/paused/).\n", + "x-property-id-kebab": "resume-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Resume a paused environment, restarting all services and applications. Development environments that haven't been", + "used for 14 days will be paused automatically. They can be resumed via a redeployment or manually using this", + "endpoint or the CLI as described in the [public", + "documentation](https://docs.upsun.com/anchors/environments/paused/)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/routes": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-routes", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RouteCollection" + } + } + } + } + }, + "tags": [ + "Routing" + ], + "summary": "Get list of routes", + "description": "Retrieve a list of objects containing route definitions for\na specific environment. The definitions returned by this endpoint\nare those present in an environment's `.upsun/config.yaml` file.\n", + "x-property-id-kebab": "list-projects-environments-routes", + "x-tag-id-kebab": "Routing", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Route[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Route[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects containing route definitions for a specific environment. The definitions returned by", + "this endpoint are those present in an environment's `.upsun/config.yaml` file." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/routes/{routeId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "routeId" + } + ], + "operationId": "get-projects-environments-routes", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Route" + } + } + } + } + }, + "tags": [ + "Routing" + ], + "summary": "Get a route's info", + "description": "Get details of a route from an environment using the `id` of the entry\nretrieved by the [Get environment routes list](#tag/Environment-Routes%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1routes%2Fget)\nendpoint.\n", + "x-property-id-kebab": "get-projects-environments-routes", + "x-tag-id-kebab": "Routing", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Route" + ], + "x-return-types-union": "\\Upsun\\Model\\Route", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Route" + }, + "x-returnable": true, + "x-description": [ + "Get details of a route from an environment using the `id` of the entry retrieved by the Get environment routes", + "list", + "(https://docs.upsun.com/api/#tag/Environment-Routes/paths//projects/{projectId}/environments/{environmentId}/routes/get)", + "endpoint." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/source-operation": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "run-source-operation", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentSourceOperationInput" + } + } + } + }, + "tags": [ + "Source Operations" + ], + "summary": "Trigger a source operation", + "description": "This endpoint triggers a source code operation as defined in the `source.operations`\nkey in a project's `.upsun/config.yaml` configuration. More information\non source code operations is\n[available in our user documentation](https://docs.upsun.com/anchors/app/reference/source/operations/).\n", + "x-property-id-kebab": "run-source-operation", + "x-tag-id-kebab": "Source-Operations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "This endpoint triggers a source code operation as defined in the `source.operations` key in a project's", + "`.upsun/config.yaml` configuration. More information on source code operations is [available in our user", + "documentation](https://docs.upsun.com/anchors/app/reference/source/operations/)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/source-operations": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-source-operations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentSourceOperationCollection" + } + } + } + } + }, + "tags": [ + "Source Operations" + ], + "summary": "List source operations", + "description": "Lists all the source operations, defined in `.upsun/config.yaml`, that are available in an environment.\nMore information on source code operations is\n[available in our user documentation](https://docs.upsun.com/anchors/app/reference/source/operations/).\n", + "x-property-id-kebab": "list-projects-environments-source-operations", + "x-tag-id-kebab": "Source-Operations", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentSourceOperation[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentSourceOperation[]" + }, + "x-returnable": true, + "x-description": [ + "Lists all the source operations, defined in `.upsun/config.yaml`, that are available in an environment. More", + "information on source code operations is [available in our user", + "documentation](https://docs.upsun.com/anchors/app/reference/source/operations/)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/synchronize": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "synchronize-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentSynchronizeInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Synchronize a child environment with its parent", + "description": "This synchronizes the code and/or data of an environment with that of\nits parent, then redeploys the environment. Synchronization is only\npossible if a branch has no unmerged commits and it can be fast-forwarded.\n\nIf data synchronization is specified, the data in the environment will\nbe overwritten with that of its parent.\n", + "x-property-id-kebab": "synchronize-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "This synchronizes the code and/or data of an environment with that of its parent, then redeploys the environment.", + "Synchronization is only possible if a branch has no unmerged commits and it can be fast-forwarded. If data", + "synchronization is specified, the data in the environment will be overwritten with that of its parent." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/variables": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableCollection" + } + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Get list of environment variables", + "description": "Retrieve a list of objects representing the user-defined variables\nwithin an environment.\n", + "x-property-id-kebab": "list-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentVariable[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentVariable[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects representing the user-defined variables within an environment." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "create-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableCreateInput" + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Add an environment variable", + "description": "Add a variable to an environment. The `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nAdditionally, the inheritability of an environment variable can be\ndetermined through the `is_inheritable` flag (default: true).\nSee the [Environment Variables](https://docs.upsun.com/anchors/variables/set/environment/create/)\nsection in our documentation for more information.\n", + "x-property-id-kebab": "create-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Add a variable to an environment. The `value` can be either a string or a JSON object (default: string), as", + "specified by the `is_json` boolean flag. Additionally, the inheritability of an environment variable can be", + "determined through the `is_inheritable` flag (default: true). See the [Environment", + "Variables](https://docs.upsun.com/anchors/variables/set/environment/create/) section in our documentation for", + "more information." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/variables/{variableId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "variableId" + } + ], + "operationId": "get-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Get an environment variable", + "description": "Retrieve a single user-defined environment variable.", + "x-property-id-kebab": "get-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentVariable" + ], + "x-return-types-union": "\\Upsun\\Model\\EnvironmentVariable", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentVariable" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a single user-defined environment variable." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariablePatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "variableId" + } + ], + "operationId": "update-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Update an environment variable", + "description": "Update a single user-defined environment variable.\nThe `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nAdditionally, the inheritability of an environment variable can be\ndetermined through the `is_inheritable` flag (default: true).\nSee the [Variables](https://docs.upsun.com/anchors/variables/)\nsection in our documentation for more information.\n", + "x-property-id-kebab": "update-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update a single user-defined environment variable. The `value` can be either a string or a JSON object (default:", + "string), as specified by the `is_json` boolean flag. Additionally, the inheritability of an environment variable", + "can be determined through the `is_inheritable` flag (default: true). See the", + "[Variables](https://docs.upsun.com/anchors/variables/) section in our documentation for more information." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "variableId" + } + ], + "operationId": "delete-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Delete an environment variable", + "description": "Delete a single user-defined environment variable.", + "x-property-id-kebab": "delete-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a single user-defined environment variable." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/versions": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-versions", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionCollection" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "List versions associated with the environment", + "description": "List versions associated with the `{environmentId}` environment.\nAt least one version always exists.\nWhen multiple versions exist, it means that multiple versions of an app are deployed.\nThe deployment target type denotes whether staged deployment is supported.\n", + "x-property-id-kebab": "list-projects-environments-versions", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Version[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Version[]" + }, + "x-returnable": true, + "x-description": [ + "List versions associated with the `{environmentId}` environment. At least one version always exists. When", + "multiple versions exist, it means that multiple versions of an app are deployed. The deployment target type", + "denotes whether staged deployment is supported." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "create-projects-environments-versions", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionCreateInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Create versions associated with the environment", + "description": "Create versions associated with the `{environmentId}` environment.\nAt least one version always exists.\nWhen multiple versions exist, it means that multiple versions of an app are deployed.\nThe deployment target type denotes whether staged deployment is supported.\n", + "x-property-id-kebab": "create-projects-environments-versions", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Create versions associated with the `{environmentId}` environment. At least one version always exists. When", + "multiple versions exist, it means that multiple versions of an app are deployed. The deployment target type", + "denotes whether staged deployment is supported." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/versions/{versionId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "versionId" + } + ], + "operationId": "get-projects-environments-versions", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Version" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "List the version", + "description": "List the `{versionId}` version.\nA routing percentage for this version may be specified for staged rollouts\n(if the deployment target supports it).\n", + "x-property-id-kebab": "get-projects-environments-versions", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Version" + ], + "x-return-types-union": "\\Upsun\\Model\\Version", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Version" + }, + "x-returnable": true, + "x-description": [ + "List the `{versionId}` version. A routing percentage for this version may be specified for staged rollouts (if", + "the deployment target supports it)." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "versionId" + } + ], + "operationId": "update-projects-environments-versions", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Update the version", + "description": "Update the `{versionId}` version.\nA routing percentage for this version may be specified for staged rollouts\n(if the deployment target supports it).\n", + "x-property-id-kebab": "update-projects-environments-versions", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update the `{versionId}` version. A routing percentage for this version may be specified for staged rollouts (if", + "the deployment target supports it)." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "versionId" + } + ], + "operationId": "delete-projects-environments-versions", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Delete the version", + "description": "Delete the `{versionId}` version.\nA routing percentage for this version may be specified for staged rollouts\n(if the deployment target supports it).\n", + "x-property-id-kebab": "delete-projects-environments-versions", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete the `{versionId}` version. A routing percentage for this version may be specified for staged rollouts (if", + "the deployment target supports it)." + ] + } + }, + "/projects/{projectId}/git/blobs/{repositoryBlobId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "repositoryBlobId" + } + ], + "operationId": "get-projects-git-blobs", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Blob" + } + } + } + } + }, + "tags": [ + "Repository" + ], + "summary": "Get a blob object", + "description": "Retrieve, by hash, an object representing a blob in the repository\nbacking a project. This endpoint allows direct read-only access\nto the contents of files in a repo. It returns the file in the\n`content` field of the response object, encoded according to the\nformat in the `encoding` field, e.g. `base64`.\n", + "x-property-id-kebab": "get-projects-git-blobs", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Blob" + ], + "x-return-types-union": "\\Upsun\\Model\\Blob", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Blob" + }, + "x-returnable": true, + "x-description": [ + "Retrieve, by hash, an object representing a blob in the repository backing a project. This endpoint allows direct", + "read-only access to the contents of files in a repo. It returns the file in the `content` field of the response", + "object, encoded according to the format in the `encoding` field, e.g. `base64`." + ] + } + }, + "/projects/{projectId}/git/commits/{repositoryCommitId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "repositoryCommitId" + } + ], + "operationId": "get-projects-git-commits", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Commit" + } + } + } + } + }, + "tags": [ + "Repository" + ], + "summary": "Get a commit object", + "description": "Retrieve, by hash, an object representing a commit in the repository backing\na project. This endpoint functions similarly to `git cat-file -p `.\nThe returned object contains the hash of the Git tree that it\nbelongs to, as well as the ID of parent commits.\n\nThe commit represented by a parent ID can be retrieved using this\nendpoint, while the tree state represented by this commit can\nbe retrieved using the\n[Get a tree object](#tag/Git-Repo%2Fpaths%2F~1projects~1%7BprojectId%7D~1git~1trees~1%7BrepositoryTreeId%7D%2Fget)\nendpoint.\n", + "x-property-id-kebab": "get-projects-git-commits", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Commit" + ], + "x-return-types-union": "\\Upsun\\Model\\Commit", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Commit" + }, + "x-returnable": true, + "x-description": [ + "Retrieve, by hash, an object representing a commit in the repository backing a project. This endpoint functions", + "similarly to `git cat-file -p `. The returned object contains the hash of the Git tree that it belongs", + "to, as well as the ID of parent commits. The commit represented by a parent ID can be retrieved using this", + "endpoint, while the tree state represented by this commit can be retrieved using the Get a tree object", + "(https://docs.upsun.com/api/#tag/Git-Repo/paths//projects/{projectId}/git/trees/{repositoryTreeId}/get) endpoint." + ] + } + }, + "/projects/{projectId}/git/refs": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-git-refs", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefCollection" + } + } + } + } + }, + "tags": [ + "Repository" + ], + "summary": "Get list of repository refs", + "description": "Retrieve a list of `refs/*` in the repository backing a project.\nThis endpoint functions similarly to `git show-ref`, with each\nreturned object containing a `ref` field with the ref's name,\nand an object containing the associated commit ID.\n\nThe returned commit ID can be used with the\n[Get a commit object](#tag/Git-Repo%2Fpaths%2F~1projects~1%7BprojectId%7D~1git~1commits~1%7BrepositoryCommitId%7D%2Fget)\nendpoint to retrieve information about that specific commit.\n", + "x-property-id-kebab": "list-projects-git-refs", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Ref[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Ref[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of `refs/*` in the repository backing a project. This endpoint functions similarly to `git", + "show-ref`, with each returned object containing a `ref` field with the ref's name, and an object containing the", + "associated commit ID. The returned commit ID can be used with the Get a commit object", + "(https://docs.upsun.com/api/#tag/Git-Repo/paths//projects/{projectId}/git/commits/{repositoryCommitId}/get)", + "endpoint to retrieve information about that specific commit." + ] + } + }, + "/projects/{projectId}/git/refs/{repositoryRefId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "repositoryRefId" + } + ], + "operationId": "get-projects-git-refs", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Ref" + } + } + } + } + }, + "tags": [ + "Repository" + ], + "summary": "Get a ref object", + "description": "Retrieve the details of a single `refs` object in the repository\nbacking a project. This endpoint functions similarly to\n`git show-ref `, although the pattern must be a full ref `id`,\nrather than a matching pattern.\n\n*NOTE: The `{repositoryRefId}` must be properly escaped.*\nThat is, the ref `refs/heads/master` is accessible via\n`/projects/{projectId}/git/refs/heads%2Fmaster`.\n", + "x-property-id-kebab": "get-projects-git-refs", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Ref" + ], + "x-return-types-union": "\\Upsun\\Model\\Ref", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Ref" + }, + "x-returnable": true, + "x-description": [ + "Retrieve the details of a single `refs` object in the repository backing a project. This endpoint functions", + "similarly to `git show-ref `, although the pattern must be a full ref `id`, rather than a matching", + "pattern. *NOTE: The `{repositoryRefId}` must be properly escaped.* That is, the ref `refs/heads/master` is", + "accessible via `/projects/{projectId}/git/refs/heads/master`." + ] + } + }, + "/projects/{projectId}/git/trees/{repositoryTreeId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "repositoryTreeId" + } + ], + "operationId": "get-projects-git-trees", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tree" + } + } + } + } + }, + "tags": [ + "Repository" + ], + "summary": "Get a tree object", + "description": "Retrieve, by hash, the tree state represented by a commit.\nThe returned object's `tree` field contains a list of files and\ndirectories present in the tree.\n\nDirectories in the tree can be recursively retrieved by this endpoint\nthrough their hashes. Files in the tree can be retrieved by the\n[Get a blob object](#tag/Git-Repo%2Fpaths%2F~1projects~1%7BprojectId%7D~1git~1blobs~1%7BrepositoryBlobId%7D%2Fget)\nendpoint.\n", + "x-property-id-kebab": "get-projects-git-trees", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Tree" + ], + "x-return-types-union": "\\Upsun\\Model\\Tree", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Tree" + }, + "x-returnable": true, + "x-description": [ + "Retrieve, by hash, the tree state represented by a commit. The returned object's `tree` field contains a list of", + "files and directories present in the tree. Directories in the tree can be recursively retrieved by this endpoint", + "through their hashes. Files in the tree can be retrieved by the Get a blob object", + "(https://docs.upsun.com/api/#tag/Git-Repo/paths//projects/{projectId}/git/blobs/{repositoryBlobId}/get) endpoint." + ] + } + }, + "/projects/{projectId}/integrations": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-integrations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationCollection" + } + } + } + } + }, + "tags": [ + "Third-Party Integrations" + ], + "summary": "Get list of existing integrations for a project", + "x-property-id-kebab": "list-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Integration[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Integration[]" + }, + "x-returnable": true + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-integrations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationCreateInput" + } + } + } + }, + "tags": [ + "Third-Party Integrations" + ], + "summary": "Integrate project with a third-party service", + "x-property-id-kebab": "create-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true + } + }, + "/projects/{projectId}/integrations/{integrationId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "integrationId" + } + ], + "operationId": "get-projects-integrations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } + } + }, + "tags": [ + "Third-Party Integrations" + ], + "summary": "Get information about an existing third-party integration", + "x-property-id-kebab": "get-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Integration" + ], + "x-return-types-union": "\\Upsun\\Model\\Integration", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Integration" + }, + "x-returnable": true + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "integrationId" + } + ], + "operationId": "update-projects-integrations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Third-Party Integrations" + ], + "summary": "Update an existing third-party integration", + "x-property-id-kebab": "update-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "integrationId" + } + ], + "operationId": "delete-projects-integrations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Third-Party Integrations" + ], + "summary": "Delete an existing third-party integration", + "x-property-id-kebab": "delete-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true + } + }, + "/projects/{projectId}/provisioners": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-provisioners", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateProvisionerCollection" + } + } + } + } + }, + "tags": [ + "CertificateProvisioner" + ], + "x-property-id-kebab": "list-projects-provisioners", + "x-tag-id-kebab": "CertificateProvisioner", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\CertificateProvisioner[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\CertificateProvisioner[]" + }, + "x-returnable": true + } + }, + "/projects/{projectId}/provisioners/{certificateProvisionerDocumentId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateProvisionerDocumentId" + } + ], + "operationId": "get-projects-provisioners", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateProvisioner" + } + } + } + } + }, + "tags": [ + "CertificateProvisioner" + ], + "x-property-id-kebab": "get-projects-provisioners", + "x-tag-id-kebab": "CertificateProvisioner", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\CertificateProvisioner" + ], + "x-return-types-union": "\\Upsun\\Model\\CertificateProvisioner", + "x-phpdoc": { + "return": "\\Upsun\\Model\\CertificateProvisioner" + }, + "x-returnable": true + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateProvisionerPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateProvisionerDocumentId" + } + ], + "operationId": "update-projects-provisioners", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "CertificateProvisioner" + ], + "x-property-id-kebab": "update-projects-provisioners", + "x-tag-id-kebab": "CertificateProvisioner", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true + } + }, + "/projects/{projectId}/settings": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "get-projects-settings", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectSettings" + } + } + } + } + }, + "tags": [ + "Project Settings" + ], + "summary": "Get list of project settings", + "description": "Retrieve the global settings for a project.", + "x-property-id-kebab": "get-projects-settings", + "x-tag-id-kebab": "Project-Settings", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ProjectSettings" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectSettings", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectSettings" + }, + "x-returnable": true, + "x-description": [ + "Retrieve the global settings for a project." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectSettingsPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "update-projects-settings", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project Settings" + ], + "summary": "Update a project setting", + "description": "Update one or more project-level settings.", + "x-property-id-kebab": "update-projects-settings", + "x-tag-id-kebab": "Project-Settings", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update one or more project-level settings." + ] + } + }, + "/projects/{projectId}/system": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "get-projects-system", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SystemInformation" + } + } + } + } + }, + "tags": [ + "System Information" + ], + "summary": "Get information about the Git server.", + "description": "Output information for the project.", + "x-property-id-kebab": "get-projects-system", + "x-tag-id-kebab": "System-Information", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\SystemInformation" + ], + "x-return-types-union": "\\Upsun\\Model\\SystemInformation", + "x-phpdoc": { + "return": "\\Upsun\\Model\\SystemInformation" + }, + "x-returnable": true, + "x-description": [ + "Output information for the project." + ] + } + }, + "/projects/{projectId}/system/restart": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "action-projects-system-restart", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "System Information" + ], + "summary": "Restart the Git server", + "description": "Force the Git server to restart.", + "x-property-id-kebab": "action-projects-system-restart", + "x-tag-id-kebab": "System-Information", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Force the Git server to restart." + ] + } + }, + "/projects/{projectId}/variables": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectVariableCollection" + } + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Get list of project variables", + "description": "Retrieve a list of objects representing the user-defined variables\nwithin a project.\n", + "x-property-id-kebab": "list-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\ProjectVariable[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectVariable[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects representing the user-defined variables within a project." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectVariableCreateInput" + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Add a project variable", + "description": "Add a variable to a project. The `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nSee the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)\nsection in our documentation for more information.\n", + "x-property-id-kebab": "create-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Add a variable to a project. The `value` can be either a string or a JSON object (default: string), as specified", + "by the `is_json` boolean flag. See the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)", + "section in our documentation for more information." + ] + } + }, + "/projects/{projectId}/variables/{projectVariableId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectVariableId" + } + ], + "operationId": "get-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectVariable" + } + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Get a project variable", + "description": "Retrieve a single user-defined project variable.", + "x-property-id-kebab": "get-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ProjectVariable" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectVariable", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectVariable" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a single user-defined project variable." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectVariablePatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectVariableId" + } + ], + "operationId": "update-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Update a project variable", + "description": "Update a single user-defined project variable.\nThe `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nSee the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)\nsection in our documentation for more information.\n", + "x-property-id-kebab": "update-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update a single user-defined project variable. The `value` can be either a string or a JSON object (default:", + "string), as specified by the `is_json` boolean flag. See the", + "[Variables](https://docs.upsun.com/anchors/variables/set/project/create/) section in our documentation for more", + "information." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectVariableId" + } + ], + "operationId": "delete-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Delete a project variable", + "description": "Delete a single user-defined project variable.", + "x-property-id-kebab": "delete-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a single user-defined project variable." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/autoscaling/settings": { + "get": { + "tags": [ + "Autoscaling" + ], + "description": "Retrieves Autoscaler settings", + "operationId": "get-autoscaler-settings", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "A string that uniquely identifies the project", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "A string that uniquely identifies the project environment", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Autoscaler settings", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + } + }, + "x-property-id-kebab": "get-autoscaler-settings", + "x-tag-id-kebab": "Autoscaling", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AutoscalerSettings" + ], + "x-return-types-union": "\\Upsun\\Model\\AutoscalerSettings", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AutoscalerSettings" + }, + "x-returnable": true, + "x-description": [ + "Retrieves Autoscaler settings" + ] + }, + "post": { + "tags": [ + "Autoscaling" + ], + "description": "Updates Autoscaler settings", + "operationId": "post-autoscaler-settings", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "A string that uniquely identifies the project", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "A string that uniquely identifies the project environment", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Settings to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + }, + "responses": { + "200": { + "description": "Updated Autoscaler settings", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + } + }, + "x-property-id-kebab": "post-autoscaler-settings", + "x-tag-id-kebab": "Autoscaling", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AutoscalerSettings" + ], + "x-return-types-union": "\\Upsun\\Model\\AutoscalerSettings", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AutoscalerSettings" + }, + "x-returnable": true, + "x-description": [ + "Updates Autoscaler settings" + ] + }, + "patch": { + "tags": [ + "Autoscaling" + ], + "description": "Modifies Autoscaler settings", + "operationId": "patch-autoscaler-settings", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "A string that uniquely identifies the project", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "A string that uniquely identifies the project environment", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Settings to modify", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + }, + "responses": { + "200": { + "description": "Updated Autoscaler settings", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + } + }, + "x-property-id-kebab": "patch-autoscaler-settings", + "x-tag-id-kebab": "Autoscaling", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AutoscalerSettings" + ], + "x-return-types-union": "\\Upsun\\Model\\AutoscalerSettings", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AutoscalerSettings" + }, + "x-returnable": true, + "x-description": [ + "Modifies Autoscaler settings" + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/autoscaling/alerts": { + "post": { + "tags": [ + "Autoscaling" + ], + "description": "Sends an Autoscaler alert for processing", + "operationId": "post-autoscaler-alert", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "A string that uniquely identifies the project", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "A string that uniquely identifies the project environment", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Alert to process", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerAlertPartial" + } + } + } + }, + "responses": { + "202": { + "description": "Alert is accepted for processing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerEmptyBody" + } + } + } + } + }, + "x-property-id-kebab": "post-autoscaler-alert", + "x-tag-id-kebab": "Autoscaling", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AutoscalerEmptyBody" + ], + "x-return-types-union": "\\Upsun\\Model\\AutoscalerEmptyBody", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AutoscalerEmptyBody" + }, + "x-returnable": true, + "x-description": [ + "Sends an Autoscaler alert for processing" + ] + } + }, + "/ref/organizations": { + "get": { + "summary": "List referenced organizations", + "description": "Retrieves a list of organizations referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:organizations:0.", + "operationId": "list-referenced-orgs", + "tags": [ + "References" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "in", + "description": "The list of comma-separated organization IDs generated by a trusted service.", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sig", + "description": "The signature of this request generated by a trusted service.", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A map of referenced organizations indexed by the organization ID.", + "additionalProperties": { + "$ref": "#/components/schemas/OrganizationReference" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-referenced-orgs", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "array" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of organizations referenced by a trusted service. Clients cannot construct the URL themselves.", + "The correct URL will be provided in the HAL links of another API response, in the _links object with", + "a key like ref:organizations:0." + ] + } + }, + "/users/{user_id}/organizations": { + "get": { + "summary": "User organizations", + "description": "Retrieves organizations that the specified user is a member of.", + "operationId": "list-user-orgs", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + }, + { + "in": "query", + "name": "filter[id]", + "description": "Allows filtering by `id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[type]", + "description": "Allows filtering by `type` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[vendor]", + "description": "Allows filtering by `vendor` using one or more operators.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[status]", + "description": "Allows filtering by `status` using one or more operators.
\nDefaults to `filter[status][in]=active,restricted,suspended`.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `name`, `label`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Organization" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-user-orgs", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves organizations that the specified user is a member of." + ] + } + }, + "/organizations": { + "get": { + "summary": "List organizations", + "description": "Non-admin users will only see organizations they are members of.", + "operationId": "list-orgs", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "in": "query", + "name": "filter[id]", + "description": "Allows filtering by `id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[type]", + "description": "Allows filtering by `type` using one or more operators.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[owner_id]", + "description": "Allows filtering by `owner_id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[name]", + "description": "Allows filtering by `name` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[label]", + "description": "Allows filtering by `label` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[vendor]", + "description": "Allows filtering by `vendor` using one or more operators.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[capabilities]", + "description": "Allows filtering by `capabilites` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/ArrayFilter" + } + }, + { + "in": "query", + "name": "filter[status]", + "description": "Allows filtering by `status` using one or more operators.
\nDefaults to `filter[status][in]=active,restricted,suspended`.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `name`, `label`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Total number of items across pages." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Organization" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-orgs", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Non-admin users will only see organizations they are members of." + ] + }, + "post": { + "summary": "Create organization", + "description": "Creates a new organization.", + "operationId": "create-org", + "tags": [ + "Organizations" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "label" + ], + "properties": { + "type": { + "type": "string", + "description": "The type of the organization.", + "enum": [ + "fixed", + "flexible" + ] + }, + "owner_id": { + "type": "string", + "format": "uuid", + "description": "ID of the owner." + }, + "name": { + "type": "string", + "description": "A unique machine name representing the organization." + }, + "label": { + "type": "string", + "description": "The human-readable label of the organization." + }, + "country": { + "type": "string", + "description": "The organization country (2-letter country code).", + "maxLength": 2 + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-org", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Organization" + ], + "x-return-types-union": "\\Upsun\\Model\\Organization", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Organization" + }, + "x-returnable": true, + "x-description": [ + "Creates a new organization." + ] + } + }, + "/organizations/{organization_id}": { + "get": { + "summary": "Get organization", + "description": "Retrieves the specified organization.", + "operationId": "get-org", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Organization" + ], + "x-return-types-union": "\\Upsun\\Model\\Organization", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Organization" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified organization." + ] + }, + "patch": { + "summary": "Update organization", + "description": "Updates the specified organization.", + "operationId": "update-org", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A unique machine name representing the organization." + }, + "label": { + "type": "string", + "description": "The human-readable label of the organization." + }, + "country": { + "type": "string", + "description": "The organization country (2-letter country code).", + "maxLength": 2 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Organization" + ], + "x-return-types-union": "\\Upsun\\Model\\Organization", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Organization" + }, + "x-returnable": true, + "x-description": [ + "Updates the specified organization." + ] + }, + "delete": { + "summary": "Delete organization", + "description": "Deletes the specified organization.", + "operationId": "delete-org", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-org", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes the specified organization." + ] + } + }, + "/organizations/{organization_id}/mfa-enforcement": { + "get": { + "summary": "Get organization MFA settings", + "description": "Retrieves MFA settings for the specified organization.", + "operationId": "get-org-mfa-enforcement", + "tags": [ + "Mfa" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationMfaEnforcement" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-mfa-enforcement", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationMfaEnforcement" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationMfaEnforcement", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationMfaEnforcement" + }, + "x-returnable": true, + "x-description": [ + "Retrieves MFA settings for the specified organization." + ] + } + }, + "/organizations/{organization_id}/mfa-enforcement/enable": { + "post": { + "summary": "Enable organization MFA enforcement", + "description": "Enables MFA enforcement for the specified organization.", + "operationId": "enable-org-mfa-enforcement", + "tags": [ + "Mfa" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "enable-org-mfa-enforcement", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Enables MFA enforcement for the specified organization." + ] + } + }, + "/organizations/{organization_id}/mfa-enforcement/disable": { + "post": { + "summary": "Disable organization MFA enforcement", + "description": "Disables MFA enforcement for the specified organization.", + "operationId": "disable-org-mfa-enforcement", + "tags": [ + "Mfa" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "disable-org-mfa-enforcement", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Disables MFA enforcement for the specified organization." + ] + } + }, + "/organizations/{organization_id}/mfa/remind": { + "post": { + "summary": "Send MFA reminders to organization members", + "description": "Sends a reminder about setting up MFA to the specified organization members.", + "operationId": "send-org-mfa-reminders", + "tags": [ + "Mfa" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user_ids": { + "type": "array", + "description": "The organization members.", + "items": { + "type": "string", + "format": "uuid", + "description": "The ID of the user." + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "An HTTP-like status code referring to the result of the operation for the specific user." + }, + "message": { + "type": "string", + "description": "A human-readable message describing the result of the operation for the specific user" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "send-org-mfa-reminders", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": {}, + "x-phpdoc": { + "return": true + }, + "x-returnable": true, + "x-description": [ + "Sends a reminder about setting up MFA to the specified organization members." + ] + } + }, + "/organizations/{organization_id}/members": { + "get": { + "summary": "List organization members", + "description": "Accessible to organization owners and members with the \"manage members\" permission.", + "operationId": "list-org-members", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "in": "query", + "name": "filter[permissions]", + "description": "Allows filtering by `permissions` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/ArrayFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Total number of items across pages." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationMember" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-members", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Accessible to organization owners and members with the \"manage members\" permission." + ] + }, + "post": { + "summary": "Create organization member", + "description": "Creates a new organization member.", + "operationId": "create-org-member", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "user_id" + ], + "properties": { + "user_id": { + "type": "string", + "format": "uuid", + "description": "ID of the user." + }, + "permissions": { + "$ref": "#/components/schemas/Permissions" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationMember" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-org-member", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationMember" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationMember", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationMember" + }, + "x-returnable": true, + "x-description": [ + "Creates a new organization member." + ] + } + }, + "/organizations/{organization_id}/members/{user_id}": { + "get": { + "summary": "Get organization member", + "description": "Retrieves the specified organization member.", + "operationId": "get-org-member", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationMember" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-member", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationMember" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationMember", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationMember" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified organization member." + ] + }, + "patch": { + "summary": "Update organization member", + "description": "Updates the specified organization member.", + "operationId": "update-org-member", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permissions": { + "$ref": "#/components/schemas/Permissions" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationMember" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org-member", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationMember" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationMember", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationMember" + }, + "x-returnable": true, + "x-description": [ + "Updates the specified organization member." + ] + }, + "delete": { + "summary": "Delete organization member", + "description": "Deletes the specified organization member.", + "operationId": "delete-org-member", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-org-member", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes the specified organization member." + ] + } + }, + "/organizations/{organization_id}/address": { + "get": { + "summary": "Get address", + "description": "Retrieves the address for the specified organization.", + "operationId": "get-org-address", + "tags": [ + "Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-address", + "x-tag-id-kebab": "Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Address" + ], + "x-return-types-union": "\\Upsun\\Model\\Address", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Address" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the address for the specified organization." + ] + }, + "patch": { + "summary": "Update address", + "description": "Updates the address for the specified organization.", + "operationId": "update-org-address", + "tags": [ + "Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org-address", + "x-tag-id-kebab": "Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Address" + ], + "x-return-types-union": "\\Upsun\\Model\\Address", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Address" + }, + "x-returnable": true, + "x-description": [ + "Updates the address for the specified organization." + ] + } + }, + "/organizations/{organization_id}/invoices": { + "get": { + "summary": "List invoices", + "description": "Retrieves a list of invoices for the specified organization.", + "operationId": "list-org-invoices", + "tags": [ + "Invoices" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/filter_invoice_status" + }, + { + "$ref": "#/components/parameters/filter_invoice_type" + }, + { + "$ref": "#/components/parameters/filter_order_id" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Invoice" + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-invoices", + "x-tag-id-kebab": "Invoices", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of invoices for the specified organization." + ] + } + }, + "/organizations/{organization_id}/invoices/{invoice_id}": { + "get": { + "summary": "Get invoice", + "description": "Retrieves an invoice for the specified organization.", + "operationId": "get-org-invoice", + "tags": [ + "Invoices" + ], + "parameters": [ + { + "$ref": "#/components/parameters/InvoiceID" + }, + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Invoice" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-invoice", + "x-tag-id-kebab": "Invoices", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Invoice" + ], + "x-return-types-union": "\\Upsun\\Model\\Invoice", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Invoice" + }, + "x-returnable": true, + "x-description": [ + "Retrieves an invoice for the specified organization." + ] + } + }, + "/organizations/{organization_id}/profile": { + "get": { + "summary": "Get profile", + "description": "Retrieves the profile for the specified organization.", + "operationId": "get-org-profile", + "tags": [ + "Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-profile", + "x-tag-id-kebab": "Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Profile" + ], + "x-return-types-union": "\\Upsun\\Model\\Profile", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Profile" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the profile for the specified organization." + ] + }, + "patch": { + "summary": "Update profile", + "description": "Updates the profile for the specified organization.", + "operationId": "update-org-profile", + "tags": [ + "Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "default_catalog": { + "type": "string", + "description": "The URL of a catalog file which overrides the default." + }, + "project_options_url": { + "type": "string", + "format": "uri", + "description": "The URL of an organization-wide project options file." + }, + "security_contact": { + "type": "string", + "format": "email", + "description": "The e-mail address of a contact to whom security notices will be sent." + }, + "company_name": { + "type": "string", + "description": "The company name." + }, + "vat_number": { + "type": "string", + "description": "The VAT number of the company." + }, + "billing_contact": { + "type": "string", + "format": "email", + "description": "The e-mail address of a contact to whom billing notices will be sent." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org-profile", + "x-tag-id-kebab": "Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Profile" + ], + "x-return-types-union": "\\Upsun\\Model\\Profile", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Profile" + }, + "x-returnable": true, + "x-description": [ + "Updates the profile for the specified organization." + ] + } + }, + "/organizations/{organization_id}/orders": { + "get": { + "summary": "List orders", + "description": "Retrieves orders for the specified organization.", + "operationId": "list-org-orders", + "tags": [ + "Orders" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/filter_order_status" + }, + { + "$ref": "#/components/parameters/filter_order_total" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/mode" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Order" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-orders", + "x-tag-id-kebab": "Orders", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves orders for the specified organization." + ] + } + }, + "/organizations/{organization_id}/orders/{order_id}": { + "get": { + "summary": "Get order", + "description": "Retrieves an order for the specified organization.", + "operationId": "get-org-order", + "tags": [ + "Orders" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/OrderID" + }, + { + "$ref": "#/components/parameters/mode" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-order", + "x-tag-id-kebab": "Orders", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Order" + ], + "x-return-types-union": "\\Upsun\\Model\\Order", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Order" + }, + "x-returnable": true, + "x-description": [ + "Retrieves an order for the specified organization." + ] + } + }, + "/organizations/{organization_id}/orders/{order_id}/authorize": { + "post": { + "summary": "Create confirmation credentials for for 3D-Secure", + "description": "Creates confirmation credentials for payments that require online authorization", + "operationId": "create-authorization-credentials", + "tags": [ + "Orders" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/OrderID" + } + ], + "responses": { + "200": { + "description": "Payment authorization credentials, if the payment is pending", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "redirect_to_url": { + "type": "object", + "description": "URL information to complete the payment.", + "properties": { + "return_url": { + "type": "string", + "description": "Return URL after payment completion." + }, + "url": { + "type": "string", + "description": "URL for payment finalization." + } + } + }, + "type": { + "type": "string", + "description": "Required payment action type." + } + } + } + } + } + }, + "400": { + "description": "Bad Request when no authorization is required.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-authorization-credentials", + "x-tag-id-kebab": "Orders", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Creates confirmation credentials for payments that require online authorization" + ] + } + }, + "/organizations/{organization_id}/records/plan": { + "get": { + "summary": "List plan records", + "description": "Retrieves plan records for the specified organization.", + "operationId": "list-org-plan-records", + "tags": [ + "Records" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/filter_subscription_id" + }, + { + "$ref": "#/components/parameters/filter_subscription_plan" + }, + { + "$ref": "#/components/parameters/record_status" + }, + { + "$ref": "#/components/parameters/record_start" + }, + { + "$ref": "#/components/parameters/record_end" + }, + { + "$ref": "#/components/parameters/record_started_at" + }, + { + "$ref": "#/components/parameters/record_ended_at" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PlanRecords" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-plan-records", + "x-tag-id-kebab": "Records", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves plan records for the specified organization." + ] + } + }, + "/organizations/{organization_id}/records/usage": { + "get": { + "summary": "List usage records", + "description": "Retrieves usage records for the specified organization.", + "operationId": "list-org-usage-records", + "tags": [ + "Records" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/filter_subscription_id" + }, + { + "$ref": "#/components/parameters/record_usage_group" + }, + { + "$ref": "#/components/parameters/record_start" + }, + { + "$ref": "#/components/parameters/record_started_at" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Usage" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-usage-records", + "x-tag-id-kebab": "Records", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves usage records for the specified organization." + ] + } + }, + "/organizations/{organization_id}/subscriptions/estimate": { + "get": { + "summary": "Estimate the price of a new subscription", + "operationId": "estimate-new-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "in": "query", + "name": "plan", + "description": "The plan type of the subscription.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "environments", + "description": "The maximum number of environments which can be provisioned on the project.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "storage", + "description": "The total storage available to each environment, in MiB.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "user_licenses", + "description": "The number of user licenses.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "format", + "description": "The format of the estimation output.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "formatted", + "complex" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EstimationObject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "estimate-new-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\EstimationObject" + ], + "x-return-types-union": "\\Upsun\\Model\\EstimationObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EstimationObject" + }, + "x-returnable": true + } + }, + "/organizations/{organization_id}/subscriptions/can-create": { + "get": { + "summary": "Checks if the user is able to create a new project.", + "operationId": "can-create-new-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "can_create": { + "description": "Boolean result of the check.", + "type": "boolean" + }, + "message": { + "description": "Details in case of negative check result.", + "type": "string" + }, + "required_action": { + "description": "Required action impending project creation.", + "type": "object", + "nullable": true, + "properties": { + "action": { + "description": "Machine readable definition of requirement.", + "type": "string" + }, + "type": { + "description": "Specification of the type of action.", + "type": "string" + } + } + } + }, + "type": "object" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "can-create-new-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + } + }, + "/organizations/{organization_id}/subscriptions/{subscription_id}/estimate": { + "get": { + "summary": "Estimate the price of a subscription", + "operationId": "estimate-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + }, + { + "in": "query", + "name": "plan", + "description": "The plan type of the subscription.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "environments", + "description": "The maximum number of environments which can be provisioned on the project.", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "storage", + "description": "The total storage available to each environment, in MiB.", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "user_licenses", + "description": "The number of user licenses.", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "format", + "description": "The format of the estimation output.", + "schema": { + "type": "string", + "enum": [ + "formatted", + "complex" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EstimationObject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "estimate-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\EstimationObject" + ], + "x-return-types-union": "\\Upsun\\Model\\EstimationObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EstimationObject" + }, + "x-returnable": true + } + }, + "/organizations/{organization_id}/subscriptions/{subscription_id}/current_usage": { + "get": { + "summary": "Get current usage for a subscription", + "operationId": "get-org-subscription-current-usage", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + }, + { + "in": "query", + "name": "usage_groups", + "description": "A list of usage groups to retrieve current usage for.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "include_not_charged", + "description": "Whether to include not charged usage groups.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionCurrentUsageObject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-subscription-current-usage", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\SubscriptionCurrentUsageObject" + ], + "x-return-types-union": "\\Upsun\\Model\\SubscriptionCurrentUsageObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\SubscriptionCurrentUsageObject" + }, + "x-returnable": true + } + }, + "/organizations/{organization_id}/subscriptions/{subscription_id}/addons": { + "get": { + "summary": "List addons for a subscription", + "operationId": "list-subscription-addons", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionAddonsObject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "list-subscription-addons", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\SubscriptionAddonsObject" + ], + "x-return-types-union": "\\Upsun\\Model\\SubscriptionAddonsObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\SubscriptionAddonsObject" + }, + "x-returnable": true + } + }, + "/organizations/{organization_id}/vouchers": { + "get": { + "summary": "List vouchers", + "description": "Retrieves vouchers for the specified organization.", + "operationId": "list-org-vouchers", + "tags": [ + "Vouchers" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Vouchers" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-vouchers", + "x-tag-id-kebab": "Vouchers", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Vouchers" + ], + "x-return-types-union": "\\Upsun\\Model\\Vouchers", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Vouchers" + }, + "x-returnable": true, + "x-description": [ + "Retrieves vouchers for the specified organization." + ] + } + }, + "/organizations/{organization_id}/vouchers/apply": { + "post": { + "summary": "Apply voucher", + "description": "Applies a voucher for the specified organization, and refreshes the currently open order.", + "operationId": "apply-org-voucher", + "tags": [ + "Vouchers" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "description": "The voucher code." + } + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "apply-org-voucher", + "x-tag-id-kebab": "Vouchers", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Applies a voucher for the specified organization, and refreshes the currently open order." + ] + } + }, + "/organizations/{organization_id}/estimate": { + "get": { + "summary": "Estimate total spend", + "description": "Estimates the total spend for the specified organization.", + "operationId": "estimate-org", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationEstimationObject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "estimate-org", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationEstimationObject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationEstimationObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationEstimationObject" + }, + "x-returnable": true, + "x-description": [ + "Estimates the total spend for the specified organization." + ] + } + }, + "/organizations/{organization_id}/addons": { + "get": { + "summary": "Get add-ons", + "description": "Retrieves information about the add-ons for an organization.", + "operationId": "get-org-addons", + "tags": [ + "Add-ons" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationAddonsObject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "get-org-addons", + "x-tag-id-kebab": "Add-ons", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationAddonsObject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationAddonsObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationAddonsObject" + }, + "x-returnable": true, + "x-description": [ + "Retrieves information about the add-ons for an organization." + ] + }, + "patch": { + "summary": "Update organization add-ons", + "description": "Updates the add-ons configuration for an organization.", + "operationId": "update-org-addons", + "tags": [ + "Add-ons" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user_management": { + "type": "string", + "description": "The user management level to apply.", + "enum": [ + "standard", + "enhanced" + ], + "example": "standard" + }, + "support_level": { + "type": "string", + "description": "The support level to apply.", + "enum": [ + "basic", + "premium" + ], + "example": "basic" + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + } + }, + "responses": { + "200": { + "description": "Add-ons updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationAddonsObject" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "update-org-addons", + "x-tag-id-kebab": "Add-ons", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationAddonsObject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationAddonsObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationAddonsObject" + }, + "x-returnable": true, + "x-description": [ + "Updates the add-ons configuration for an organization." + ] + } + }, + "/organizations/{organization_id}/alerts/billing": { + "get": { + "summary": "Get billing alert configuration", + "description": "Retrieves billing alert configuration for the specified organization.", + "operationId": "get-org-billing-alert-config", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationAlertConfig" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "get-org-billing-alert-config", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationAlertConfig" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationAlertConfig", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationAlertConfig" + }, + "x-returnable": true, + "x-description": [ + "Retrieves billing alert configuration for the specified organization." + ] + }, + "patch": { + "summary": "Update billing alert configuration", + "description": "Updates billing alert configuration for the specified organization.", + "operationId": "update-org-billing-alert-config", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "active": { + "type": "boolean", + "description": "Whether the billing alert should be active or not." + }, + "config": { + "type": "object", + "description": "The configuration for billing alerts.", + "properties": { + "threshold": { + "type": "integer", + "description": "The amount after which a billing alert should be triggered." + }, + "mode": { + "type": "string", + "description": "The mode in which the alert is triggered." + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationAlertConfig" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "update-org-billing-alert-config", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationAlertConfig" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationAlertConfig", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationAlertConfig" + }, + "x-returnable": true, + "x-description": [ + "Updates billing alert configuration for the specified organization." + ] + } + }, + "/organizations/{organization_id}/alerts/subscriptions/{subscription_id}/usage": { + "get": { + "summary": "Get usage alerts", + "description": "Retrieves current and available usage alerts.", + "operationId": "get-subscription-usage-alerts", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "current": { + "type": "array", + "description": "The list of currently set usage alerts.", + "items": { + "$ref": "#/components/schemas/UsageAlert" + } + }, + "available": { + "type": "array", + "description": "The list of available usage alerts.", + "items": { + "$ref": "#/components/schemas/UsageAlert" + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-subscription-usage-alerts", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves current and available usage alerts." + ] + }, + "patch": { + "summary": "Update usage alerts.", + "description": "Updates usage alerts for a subscription.", + "operationId": "update-subscription-usage-alerts", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "alerts": { + "type": "array", + "description": "The list of alerts to update.", + "items": { + "type": "object", + "description": "An alert object.", + "properties": { + "id": { + "type": "string", + "description": "The usage alert identifier." + }, + "active": { + "type": "boolean", + "description": "Whether the alert is activated." + }, + "config": { + "type": "object", + "description": "The configuration for the usage alerts.", + "properties": { + "threshold": { + "type": "integer", + "description": "The amount after which an alert should be triggered." + } + } + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "current": { + "type": "array", + "description": "The list of currently set usage alerts.", + "items": { + "$ref": "#/components/schemas/UsageAlert" + } + }, + "available": { + "type": "array", + "description": "The list of available usage alerts.", + "items": { + "$ref": "#/components/schemas/UsageAlert" + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-subscription-usage-alerts", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Updates usage alerts for a subscription." + ] + } + }, + "/organizations/{organization_id}/discounts": { + "get": { + "summary": "List organization discounts", + "description": "Retrieves all applicable discounts granted to the specified organization.", + "operationId": "list-org-discounts", + "tags": [ + "Discounts" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Discount" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "list-org-discounts", + "x-tag-id-kebab": "Discounts", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves all applicable discounts granted to the specified organization." + ] + } + }, + "/organizations/{organization_id}/prepayment": { + "get": { + "summary": "Get organization prepayment information", + "description": "Retrieves prepayment information for the specified organization, if applicable.", + "operationId": "get-org-prepayment-info", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "prepayment": { + "$ref": "#/components/schemas/PrepaymentObject" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current resource.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + }, + "transactions": { + "type": "object", + "description": "Link to the prepayment transactions resource.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "get-org-prepayment-info", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves prepayment information for the specified organization, if applicable." + ] + } + }, + "/organizations/{organization_id}/prepayment/transactions": { + "get": { + "summary": "List organization prepayment transactions", + "description": "Retrieves a list of prepayment transactions for the specified organization, if applicable.", + "operationId": "list-org-prepayment-transactions", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Total number of items across pages." + }, + "transactions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PrepaymentTransactionObject" + } + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current set of items.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + }, + "previous": { + "type": "object", + "description": "Link to the previous set of items.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + }, + "next": { + "type": "object", + "description": "Link to the next set of items.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link" + } + } + }, + "prepayment": { + "type": "object", + "description": "Link to the prepayment resource.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "list-org-prepayment-transactions", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of prepayment transactions for the specified organization, if applicable." + ] + } + }, + "/organizations/{organization_id}/projects": { + "get": { + "summary": "List projects", + "description": "Retrieves a list of projects for the specified organization.", + "operationId": "list-org-projects", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "in": "query", + "name": "filter[id]", + "description": "Allows filtering by `id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[title]", + "description": "Allows filtering by `title` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[status]", + "description": "Allows filtering by `status` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "in": "query", + "name": "filter[created_at]", + "description": "Allows filtering by `created_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `id`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationProject" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-projects", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of projects for the specified organization." + ] + }, + "post": { + "summary": "Create project", + "description": "Creates a new project in the specified organization.", + "operationId": "create-org-project", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "region" + ], + "properties": { + "organization_id": { + "$ref": "#/components/schemas/OrganizationID" + }, + "region": { + "$ref": "#/components/schemas/RegionID" + }, + "title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "type": { + "$ref": "#/components/schemas/ProjectType" + }, + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "default_branch": { + "$ref": "#/components/schemas/ProjectDefaultBranch" + }, + "cse_notes": { + "$ref": "#/components/schemas/ProjectCSENotes" + }, + "dedicated_tag": { + "$ref": "#/components/schemas/ProjectDedicatedTag" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationProject" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-org-project", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationProject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationProject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationProject" + }, + "x-returnable": true, + "x-description": [ + "Creates a new project in the specified organization." + ] + } + }, + "/organizations/{organization_id}/projects/{project_id}": { + "get": { + "summary": "Get project", + "description": "Retrieves the specified project.", + "operationId": "get-org-project", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationProject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-project", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationProject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationProject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationProject" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified project." + ] + }, + "patch": { + "summary": "Update project", + "description": "Updates the specified project.", + "operationId": "update-org-project", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "timezone": { + "$ref": "#/components/schemas/ProjectTimeZone" + }, + "cse_notes": { + "$ref": "#/components/schemas/ProjectCSENotes" + }, + "dedicated_tag": { + "$ref": "#/components/schemas/ProjectDedicatedTag" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationProject" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org-project", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationProject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationProject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationProject" + }, + "x-returnable": true, + "x-description": [ + "Updates the specified project." + ] + }, + "delete": { + "summary": "Delete project", + "description": "Deletes the specified project.", + "operationId": "delete-org-project", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-org-project", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes the specified project." + ] + } + }, + "/organizations/{organization_id}/metrics/carbon": { + "get": { + "summary": "Query project carbon emissions metrics for an entire organization", + "description": "Queries the carbon emission data for all projects owned by the specified organiation.", + "operationId": "query-organiation-carbon", + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/from" + }, + { + "$ref": "#/components/parameters/to" + }, + { + "$ref": "#/components/parameters/interval" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationCarbon" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "query-organiation-carbon", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationCarbon" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationCarbon", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationCarbon" + }, + "x-returnable": true, + "x-description": [ + "Queries the carbon emission data for all projects owned by the specified organiation." + ] + } + }, + "/organizations/{organization_id}/projects/{project_id}/metrics/carbon": { + "get": { + "summary": "Query project carbon emissions metrics", + "description": "Queries the carbon emission data for the specified project using the supplied parameters.", + "operationId": "query-project-carbon", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/ProjectID" + }, + { + "$ref": "#/components/parameters/from" + }, + { + "$ref": "#/components/parameters/to" + }, + { + "$ref": "#/components/parameters/interval" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectCarbon" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "query-project-carbon", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ProjectCarbon" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectCarbon", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectCarbon" + }, + "x-returnable": true, + "x-description": [ + "Queries the carbon emission data for the specified project using the supplied parameters." + ] + } + }, + "/organizations/{organization_id}/subscriptions": { + "get": { + "summary": "List subscriptions", + "description": "Retrieves subscriptions for the specified organization.", + "operationId": "list-org-subscriptions", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/subscription_status" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/project_id" + }, + { + "$ref": "#/components/parameters/project_title" + }, + { + "$ref": "#/components/parameters/region" + }, + { + "$ref": "#/components/parameters/updated_at" + }, + { + "$ref": "#/components/parameters/page_size" + }, + { + "$ref": "#/components/parameters/page_before" + }, + { + "$ref": "#/components/parameters/page_after" + }, + { + "$ref": "#/components/parameters/subscription_sort" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Subscription" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-subscriptions", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves subscriptions for the specified organization." + ] + }, + "post": { + "summary": "Create subscription", + "description": "Creates a subscription for the specified organization.", + "operationId": "create-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "project_region" + ], + "properties": { + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "project_region": { + "type": "string", + "description": "The machine name of the region where the project is located. Cannot be changed after project creation." + }, + "project_title": { + "type": "string", + "description": "The name given to the project. Appears as the title in the UI." + }, + "options_url": { + "type": "string", + "description": "The URL of the project options file." + }, + "default_branch": { + "type": "string", + "description": "The default Git branch name for the project." + }, + "environments": { + "type": "integer", + "description": "The maximum number of active environments on the project." + }, + "storage": { + "type": "integer", + "description": "The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values." + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Subscription" + ], + "x-return-types-union": "\\Upsun\\Model\\Subscription", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Subscription" + }, + "x-returnable": true, + "x-description": [ + "Creates a subscription for the specified organization." + ] + } + }, + "/organizations/{organization_id}/subscriptions/{subscription_id}": { + "get": { + "summary": "Get subscription", + "description": "Retrieves a subscription for the specified organization.", + "operationId": "get-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Subscription" + ], + "x-return-types-union": "\\Upsun\\Model\\Subscription", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Subscription" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a subscription for the specified organization." + ] + }, + "patch": { + "summary": "Update subscription", + "description": "Updates a subscription for the specified organization.", + "operationId": "update-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "project_title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "timezone": { + "$ref": "#/components/schemas/ProjectTimeZone" + }, + "environments": { + "type": "integer", + "description": "The maximum number of environments which can be provisioned on the project." + }, + "storage": { + "type": "integer", + "description": "The total storage available to each environment, in MiB." + }, + "big_dev": { + "type": "string", + "description": "The development environment plan." + }, + "big_dev_service": { + "type": "string", + "description": "The development service plan." + }, + "backups": { + "type": "string", + "description": "The backups plan." + }, + "observability_suite": { + "type": "string", + "description": "The observability suite option." + }, + "blackfire": { + "type": "string", + "description": "The Blackfire integration option." + }, + "continuous_profiling": { + "type": "string", + "description": "The Blackfire continuous profiling option." + }, + "project_support_level": { + "type": "string", + "description": "The project uptime option." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Subscription" + ], + "x-return-types-union": "\\Upsun\\Model\\Subscription", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Subscription" + }, + "x-returnable": true, + "x-description": [ + "Updates a subscription for the specified organization." + ] + }, + "delete": { + "summary": "Delete subscription", + "description": "Deletes a subscription for the specified organization.", + "operationId": "delete-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes a subscription for the specified organization." + ] + } + }, + "/regions": { + "get": { + "summary": "List regions", + "description": "Retrieves a list of available regions.", + "operationId": "list-regions", + "tags": [ + "Regions" + ], + "parameters": [ + { + "in": "query", + "name": "filter[available]", + "description": "Allows filtering by `available` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[private]", + "description": "Allows filtering by `private` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[zone]", + "description": "Allows filtering by `zone` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `id`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "regions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Region" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-regions", + "x-tag-id-kebab": "Regions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of available regions." + ] + } + }, + "/regions/{region_id}": { + "get": { + "summary": "Get region", + "description": "Retrieves the specified region.", + "operationId": "get-region", + "tags": [ + "Regions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/RegionID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Region" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-region", + "x-tag-id-kebab": "Regions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Region" + ], + "x-return-types-union": "\\Upsun\\Model\\Region", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Region" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified region." + ] + } + }, + "/ref/projects": { + "get": { + "summary": "List referenced projects", + "description": "Retrieves a list of projects referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:projects:0.", + "operationId": "list-referenced-projects", + "tags": [ + "References" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "in", + "description": "The list of comma-separated project IDs generated by a trusted service.", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sig", + "description": "The signature of this request generated by a trusted service.", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A map of referenced projects indexed by the organization ID.", + "additionalProperties": { + "$ref": "#/components/schemas/ProjectReference" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-referenced-projects", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "array" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of projects referenced by a trusted service. Clients cannot construct the URL themselves. The", + "correct URL will be provided in the HAL links of another API response, in the _links object with a", + "key like ref:projects:0." + ] + } + }, + "/ref/regions": { + "get": { + "summary": "List referenced regions", + "description": "Retrieves a list of regions referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:regions:0.", + "operationId": "list-referenced-regions", + "tags": [ + "References" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "in", + "description": "The list of comma-separated region IDs generated by a trusted service.", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sig", + "description": "The signature of this request generated by a trusted service.", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A map of referenced projects indexed by the organization ID.", + "additionalProperties": { + "$ref": "#/components/schemas/RegionReference" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-referenced-regions", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "array" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of regions referenced by a trusted service. Clients cannot construct the URL themselves. The", + "correct URL will be provided in the HAL links of another API response, in the _links object with a", + "key like ref:regions:0." + ] + } + }, + "/projects/{project_id}/team-access": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "get": { + "summary": "List team access for a project", + "description": "Returns a list of items representing the project access.", + "operationId": "list-project-team-access", + "tags": [ + "Team Access" + ], + "parameters": [ + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `granted_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamProjectAccess" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-project-team-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Returns a list of items representing the project access." + ] + }, + "post": { + "summary": "Grant team access to a project", + "description": "Grants one or more team access to a specific project.", + "operationId": "grant-project-team-access", + "tags": [ + "Team Access" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "team_id": { + "type": "string", + "description": "ID of the team." + } + }, + "required": [ + "team_id" + ] + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "grant-project-team-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Grants one or more team access to a specific project." + ] + } + }, + "/projects/{project_id}/team-access/{team_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + }, + { + "$ref": "#/components/parameters/TeamID" + } + ], + "get": { + "summary": "Get team access for a project", + "description": "Retrieves the team's permissions for the current project.", + "operationId": "get-project-team-access", + "tags": [ + "Team Access" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamProjectAccess" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-project-team-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\TeamProjectAccess" + ], + "x-return-types-union": "\\Upsun\\Model\\TeamProjectAccess", + "x-phpdoc": { + "return": "\\Upsun\\Model\\TeamProjectAccess" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the team's permissions for the current project." + ] + }, + "delete": { + "summary": "Remove team access for a project", + "description": "Removes the team from the current project.", + "operationId": "remove-project-team-access", + "tags": [ + "Team Access" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "remove-project-team-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Removes the team from the current project." + ] + } + }, + "/projects/{project_id}/user-access": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "get": { + "summary": "List user access for a project", + "description": "Returns a list of items representing the project access.", + "operationId": "list-project-user-access", + "tags": [ + "User Access" + ], + "parameters": [ + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `granted_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserProjectAccess" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-project-user-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Returns a list of items representing the project access." + ] + }, + "post": { + "summary": "Grant user access to a project", + "description": "Grants one or more users access to a specific project.", + "operationId": "grant-project-user-access", + "tags": [ + "User Access" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user_id": { + "type": "string", + "description": "ID of the user." + }, + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" + }, + "auto_add_member": { + "type": "boolean", + "description": "If the specified user is not a member of the project's organization, add it automatically." + } + }, + "required": [ + "user_id", + "permissions" + ] + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "grant-project-user-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Grants one or more users access to a specific project." + ] + } + }, + "/projects/{project_id}/user-access/{user_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "Get user access for a project", + "description": "Retrieves the user's permissions for the current project.", + "operationId": "get-project-user-access", + "tags": [ + "User Access" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserProjectAccess" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-project-user-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\UserProjectAccess" + ], + "x-return-types-union": "\\Upsun\\Model\\UserProjectAccess", + "x-phpdoc": { + "return": "\\Upsun\\Model\\UserProjectAccess" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the user's permissions for the current project." + ] + }, + "patch": { + "summary": "Update user access for a project", + "description": "Updates the user's permissions for the current project.", + "operationId": "update-project-user-access", + "tags": [ + "User Access" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "permissions" + ], + "properties": { + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-project-user-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Updates the user's permissions for the current project." + ] + }, + "delete": { + "summary": "Remove user access for a project", + "description": "Removes the user from the current project.", + "operationId": "remove-project-user-access", + "tags": [ + "User Access" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "remove-project-user-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Removes the user from the current project." + ] + } + }, + "/users/{user_id}/project-access": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "List project access for a user", + "description": "Returns a list of items representing the user's project access.", + "operationId": "list-user-project-access", + "tags": [ + "User Access" + ], + "parameters": [ + { + "in": "query", + "name": "filter[organization_id]", + "description": "Allows filtering by `organization_id`.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `project_title`, `granted_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserProjectAccess" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-user-project-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Returns a list of items representing the user's project access." + ] + }, + "post": { + "summary": "Grant project access to a user", + "description": "Adds the user to one or more specified projects.", + "operationId": "grant-user-project-access", + "tags": [ + "User Access" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "project_id": { + "type": "string", + "description": "ID of the project." + }, + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" + } + }, + "required": [ + "project_id", + "permissions" + ] + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "grant-user-project-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Adds the user to one or more specified projects." + ] + } + }, + "/users/{user_id}/project-access/{project_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "get": { + "summary": "Get project access for a user", + "description": "Retrieves the user's permissions for the current project.", + "operationId": "get-user-project-access", + "tags": [ + "User Access" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserProjectAccess" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-user-project-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\UserProjectAccess" + ], + "x-return-types-union": "\\Upsun\\Model\\UserProjectAccess", + "x-phpdoc": { + "return": "\\Upsun\\Model\\UserProjectAccess" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the user's permissions for the current project." + ] + }, + "patch": { + "summary": "Update project access for a user", + "description": "Updates the user's permissions for the current project.", + "operationId": "update-user-project-access", + "tags": [ + "User Access" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "permissions" + ], + "properties": { + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-user-project-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Updates the user's permissions for the current project." + ] + }, + "delete": { + "summary": "Remove project access for a user", + "description": "Removes the user from the current project.", + "operationId": "remove-user-project-access", + "tags": [ + "User Access" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "remove-user-project-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Removes the user from the current project." + ] + } + }, + "/teams/{team_id}/project-access": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + } + ], + "get": { + "summary": "List project access for a team", + "description": "Returns a list of items representing the team's project access.", + "operationId": "list-team-project-access", + "tags": [ + "Team Access" + ], + "parameters": [ + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `project_title`, `granted_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamProjectAccess" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-team-project-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Returns a list of items representing the team's project access." + ] + }, + "post": { + "summary": "Grant project access to a team", + "description": "Adds the team to one or more specified projects.", + "operationId": "grant-team-project-access", + "tags": [ + "Team Access" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "project_id": { + "type": "string", + "description": "ID of the project." + } + }, + "required": [ + "project_id" + ] + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "grant-team-project-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Adds the team to one or more specified projects." + ] + } + }, + "/teams/{team_id}/project-access/{project_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "get": { + "summary": "Get project access for a team", + "description": "Retrieves the team's permissions for the current project.", + "operationId": "get-team-project-access", + "tags": [ + "Team Access" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamProjectAccess" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-team-project-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\TeamProjectAccess" + ], + "x-return-types-union": "\\Upsun\\Model\\TeamProjectAccess", + "x-phpdoc": { + "return": "\\Upsun\\Model\\TeamProjectAccess" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the team's permissions for the current project." + ] + }, + "delete": { + "summary": "Remove project access for a team", + "description": "Removes the team from the current project.", + "operationId": "remove-team-project-access", + "tags": [ + "Team Access" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "remove-team-project-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Removes the team from the current project." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/deployments/next": { + "patch": { + "summary": "Update the next deployment", + "description": "Update resources for either webapps, services, or workers in the next deployment.", + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "webapps": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "$ref": "#/components/schemas/ResourceConfig" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "description": "Number of instances to run", + "example": 2 + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk Size", + "description": "Size of the disk in Bytes", + "example": 1024 + } + } + } + }, + "services": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "$ref": "#/components/schemas/ResourceConfig" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "description": "Number of instances to run", + "example": 1 + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk Size", + "description": "Size of the disk in Bytes", + "example": 1024 + } + } + } + }, + "workers": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "$ref": "#/components/schemas/ResourceConfig" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "description": "Number of instances to run", + "example": 1 + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk Size", + "description": "Size of the disk in Bytes", + "example": 1024 + } + } + } + } + } + } + } + } + }, + "responses": { + "default": { + "description": "Deployment successfully updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Deployment" + ], + "operationId": "update-projects-environments-deployments-next", + "x-property-id-kebab": "update-projects-environments-deployments-next", + "x-tag-id-kebab": "Deployment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update resources for either webapps, services, or workers in the next deployment." + ] + } + } + }, + "components": { + "schemas": { + "Alert": { + "description": "The alert object.", + "properties": { + "id": { + "description": "The identification of the alert type.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The identification of the alert type." + ] + }, + "active": { + "description": "Whether the alert is currently active.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the alert is currently active." + ] + }, + "alerts_sent": { + "description": "The amount of alerts of this type that have been sent so far.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The amount of alerts of this type that have been sent so far." + ] + }, + "last_alert_at": { + "description": "The time the last alert has been sent.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time the last alert has been sent." + ] + }, + "updated_at": { + "description": "The time the alert has last been updated.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time the alert has last been updated." + ] + }, + "config": { + "description": "The alert type specific configuration.", + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The alert type specific configuration." + ] + } + }, + "type": "object", + "x-description": [ + "The alert object." + ] + }, + "LineItem": { + "description": "A line item in an order.", + "properties": { + "type": { + "description": "The type of line item.", + "type": "string", + "enum": [ + "project_plan", + "project_feature", + "project_subtotal", + "organization_plan", + "organization_feature", + "organization_subtotal" + ], + "x-isDateTime": false, + "x-description": [ + "The type of line item." + ] + }, + "license_id": { + "description": "The associated subscription identifier.", + "type": "number", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The associated subscription identifier." + ] + }, + "project_id": { + "description": "The associated project identifier.", + "type": "string", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The associated project identifier." + ] + }, + "product": { + "description": "Display name of the line item product.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Display name of the line item product." + ] + }, + "sku": { + "description": "The line item product SKU.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The line item product SKU." + ] + }, + "total": { + "description": "Total price as a decimal.", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "Total price as a decimal." + ] + }, + "total_formatted": { + "description": "Total price, formatted with currency.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Total price, formatted with currency." + ] + }, + "components": { + "description": "The price components for the line item, keyed by type.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LineItemComponent" + }, + "x-isDateTime": false, + "x-description": [ + "The price components for the line item, keyed by type." + ] + }, + "exclude_from_invoice": { + "description": "Line item should not be considered billable.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Line item should not be considered billable." + ] + } + }, + "type": "object", + "x-description": [ + "A line item in an order." + ] + }, + "LineItemComponent": { + "description": "A price component for a line item.", + "properties": { + "amount": { + "description": "The price as a decimal.", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "The price as a decimal." + ] + }, + "amount_formatted": { + "description": "The price formatted with currency.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The price formatted with currency." + ] + }, + "display_title": { + "description": "The display title for the component.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The display title for the component." + ] + }, + "currency": { + "description": "The currency code for the component.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The currency code for the component." + ] + } + }, + "type": "object", + "x-description": [ + "A price component for a line item." + ] + }, + "Address": { + "description": "The address of the user.", + "properties": { + "country": { + "description": "Two-letter country codes are used to represent countries and states", + "type": "string", + "format": "ISO ALPHA-2", + "x-isDateTime": false, + "x-description": [ + "Two-letter country codes are used to represent countries and states" + ] + }, + "name_line": { + "description": "The full name of the user", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The full name of the user" + ] + }, + "premise": { + "description": "Premise (i.e. Apt, Suite, Bldg.)", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Premise (i.e. Apt, Suite, Bldg.)" + ] + }, + "sub_premise": { + "description": "Sub Premise (i.e. Suite, Apartment, Floor, Unknown.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Sub Premise (i.e. Suite, Apartment, Floor, Unknown." + ] + }, + "thoroughfare": { + "description": "The address of the user", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The address of the user" + ] + }, + "administrative_area": { + "description": "The administrative area of the user address", + "type": "string", + "format": "ISO ALPHA-2", + "x-isDateTime": false, + "x-description": [ + "The administrative area of the user address" + ] + }, + "sub_administrative_area": { + "description": "The sub-administrative area of the user address", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The sub-administrative area of the user address" + ] + }, + "locality": { + "description": "The locality of the user address", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The locality of the user address" + ] + }, + "dependent_locality": { + "description": "The dependant_locality area of the user address", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The dependant_locality area of the user address" + ] + }, + "postal_code": { + "description": "The postal code area of the user address", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The postal code area of the user address" + ] + } + }, + "type": "object", + "x-description": [ + "The address of the user." + ] + }, + "Components": { + "description": "The components of the project", + "properties": { + "voucher/vat/baseprice": { + "description": "stub", + "type": "object", + "x-isDateTime": false, + "x-description": [ + "stub" + ] + } + }, + "type": "object", + "x-description": [ + "The components of the project" + ] + }, + "Discount": { + "description": "The discount object.", + "properties": { + "id": { + "description": "The ID of the organization discount.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization discount." + ] + }, + "organization_id": { + "description": "The ULID of the organization the discount applies to.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The ULID of the organization the discount applies to." + ] + }, + "type": { + "description": "The machine name of the discount type.", + "type": "string", + "enum": [ + "allowance", + "startup", + "enterprise" + ], + "x-isDateTime": false, + "x-description": [ + "The machine name of the discount type." + ] + }, + "type_label": { + "description": "The label of the discount type.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The label of the discount type." + ] + }, + "status": { + "description": "The status of the discount.", + "type": "string", + "enum": [ + "inactive", + "active", + "expired", + "deactivated" + ], + "x-isDateTime": false, + "x-description": [ + "The status of the discount." + ] + }, + "commitment": { + "description": "The minimum commitment associated with the discount (if applicable).", + "properties": { + "months": { + "description": "Commitment period length in months.", + "type": "integer", + "x-description": [ + "Commitment period length in months." + ] + }, + "amount": { + "description": "Commitment amounts.", + "properties": { + "monthly": { + "$ref": "#/components/schemas/CurrencyAmount" + }, + "commitment_period": { + "$ref": "#/components/schemas/CurrencyAmount" + }, + "contract_total": { + "$ref": "#/components/schemas/CurrencyAmount" + } + }, + "type": "object", + "x-description": [ + "Commitment amounts." + ] + }, + "net": { + "description": "Net commitment amounts (discount deducted).", + "properties": { + "monthly": { + "$ref": "#/components/schemas/CurrencyAmount" + }, + "commitment_period": { + "$ref": "#/components/schemas/CurrencyAmount" + }, + "contract_total": { + "$ref": "#/components/schemas/CurrencyAmount" + } + }, + "type": "object", + "x-description": [ + "Net commitment amounts (discount deducted)." + ] + } + }, + "type": "object", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The minimum commitment associated with the discount (if applicable)." + ] + }, + "total_months": { + "description": "The contract length in months (if applicable).", + "type": "integer", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The contract length in months (if applicable)." + ] + }, + "discount": { + "description": "Discount value per relevant time periods.", + "properties": { + "monthly": { + "$ref": "#/components/schemas/CurrencyAmount" + }, + "commitment_period": { + "$ref": "#/components/schemas/CurrencyAmountNullable" + }, + "contract_total": { + "$ref": "#/components/schemas/CurrencyAmountNullable" + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Discount value per relevant time periods." + ] + }, + "config": { + "description": "The discount type specific configuration.", + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The discount type specific configuration." + ] + }, + "start_at": { + "description": "The start time of the discount period.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The start time of the discount period." + ] + }, + "end_at": { + "description": "The end time of the discount period (if applicable).", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The end time of the discount period (if applicable)." + ] + } + }, + "type": "object", + "x-description": [ + "The discount object." + ] + }, + "CurrencyAmount": { + "description": "Currency amount with detailed components.", + "properties": { + "formatted": { + "description": "Formatted currency value.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Formatted currency value." + ] + }, + "amount": { + "description": "Plain amount.", + "type": "number", + "format": "float", + "x-isDateTime": false, + "x-description": [ + "Plain amount." + ] + }, + "currency_code": { + "description": "Currency code.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Currency code." + ] + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Currency symbol." + ] + } + }, + "type": "object", + "x-description": [ + "Currency amount with detailed components." + ] + }, + "CurrencyAmountNullable": { + "description": "Currency amount with detailed components.", + "properties": { + "formatted": { + "description": "Formatted currency value.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Formatted currency value." + ] + }, + "amount": { + "description": "Plain amount.", + "type": "number", + "format": "float", + "x-isDateTime": false, + "x-description": [ + "Plain amount." + ] + }, + "currency_code": { + "description": "Currency code.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Currency code." + ] + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Currency symbol." + ] + } + }, + "type": "object", + "nullable": true, + "x-description": [ + "Currency amount with detailed components." + ] + }, + "OwnerInfo": { + "description": "Project owner information that can be exposed to collaborators.", + "properties": { + "type": { + "description": "Type of the owner, usually 'user'.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Type of the owner, usually 'user'." + ] + }, + "username": { + "description": "The username of the owner.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The username of the owner." + ] + }, + "display_name": { + "description": "The full name of the owner.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The full name of the owner." + ] + } + }, + "type": "object", + "x-description": [ + "Project owner information that can be exposed to collaborators." + ] + }, + "SshKey": { + "description": "The ssh key object.", + "properties": { + "key_id": { + "description": "The ID of the public key.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The ID of the public key." + ] + }, + "uid": { + "description": "The internal user ID.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The internal user ID." + ] + }, + "fingerprint": { + "description": "The fingerprint of the public key.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The fingerprint of the public key." + ] + }, + "title": { + "description": "The title of the public key.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The title of the public key." + ] + }, + "value": { + "description": "The actual value of the public key.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The actual value of the public key." + ] + }, + "changed": { + "description": "The time of the last key modification (ISO 8601)", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The time of the last key modification (ISO 8601)" + ] + } + }, + "type": "object", + "x-description": [ + "The ssh key object." + ] + }, + "Plan": { + "description": "The hosting plan.", + "properties": { + "name": { + "description": "The machine name of the plan.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The machine name of the plan." + ] + }, + "label": { + "description": "The human-readable name of the plan.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The human-readable name of the plan." + ] + } + }, + "type": "object", + "x-description": [ + "The hosting plan." + ] + }, + "Region": { + "description": "The hosting region.", + "properties": { + "id": { + "description": "The ID of the region.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The ID of the region." + ] + }, + "label": { + "description": "The human-readable name of the region.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The human-readable name of the region." + ] + }, + "zone": { + "description": "Geographical zone of the region", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Geographical zone of the region" + ] + }, + "selection_label": { + "description": "The label to display when choosing between regions for new projects.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The label to display when choosing between regions for new projects." + ] + }, + "project_label": { + "description": "The label to display on existing projects.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The label to display on existing projects." + ] + }, + "timezone": { + "description": "Default timezone of the region", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Default timezone of the region" + ] + }, + "available": { + "description": "Indicator whether or not this region is selectable during the checkout. Not available regions will never show up during checkout.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Indicator whether or not this region is selectable during the checkout. Not available regions will never show up", + "during checkout." + ] + }, + "private": { + "description": "Indicator whether or not this platform is for private use only.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Indicator whether or not this platform is for private use only." + ] + }, + "endpoint": { + "description": "Link to the region API endpoint.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Link to the region API endpoint." + ] + }, + "provider": { + "description": "Information about the region provider.", + "properties": { + "name": { + "type": "string" + }, + "logo": { + "type": "string" + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Information about the region provider." + ] + }, + "datacenter": { + "description": "Information about the region provider data center.", + "properties": { + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "location": { + "type": "string" + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Information about the region provider data center." + ] + }, + "environmental_impact": { + "description": "Information about the region provider's environmental impact.", + "properties": { + "zone": { + "type": "string" + }, + "carbon_intensity": { + "type": "string" + }, + "green": { + "type": "boolean" + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Information about the region provider's environmental impact." + ] + } + }, + "type": "object", + "x-description": [ + "The hosting region." + ] + }, + "Subscription": { + "description": "The subscription object.", + "properties": { + "id": { + "description": "The internal ID of the subscription.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The internal ID of the subscription." + ] + }, + "status": { + "description": "The status of the subscription.", + "type": "string", + "enum": [ + "requested", + "provisioning failure", + "provisioning", + "active", + "suspended", + "deleted" + ], + "x-isDateTime": false, + "x-description": [ + "The status of the subscription." + ] + }, + "created_at": { + "description": "The date and time when the subscription was created.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The date and time when the subscription was created." + ] + }, + "updated_at": { + "description": "The date and time when the subscription was last updated.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The date and time when the subscription was last updated." + ] + }, + "owner": { + "description": "The UUID of the owner.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "The UUID of the owner." + ] + }, + "owner_info": { + "$ref": "#/components/schemas/OwnerInfo" + }, + "vendor": { + "description": "The machine name of the vendor the subscription belongs to.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The machine name of the vendor the subscription belongs to." + ] + }, + "plan": { + "description": "The plan type of the subscription.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The plan type of the subscription." + ] + }, + "environments": { + "description": "The number of environments which can be provisioned on the project.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The number of environments which can be provisioned on the project." + ] + }, + "storage": { + "description": "The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values." + ] + }, + "user_licenses": { + "description": "The number of chargeable users who currently have access to the project. Manage this value by adding and removing users through the Platform project API. Staff and billing/administrative contacts can be added to a project for no charge. Contact support for questions about user licenses.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The number of chargeable users who currently have access to the project. Manage this value by adding and removing", + "users through the Platform project API. Staff and billing/administrative contacts can be added to a project for", + "no charge. Contact support for questions about user licenses." + ] + }, + "project_id": { + "description": "The unique ID string of the project.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The unique ID string of the project." + ] + }, + "project_endpoint": { + "description": "The project API endpoint for the project.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The project API endpoint for the project." + ] + }, + "project_title": { + "description": "The name given to the project. Appears as the title in the UI.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The name given to the project. Appears as the title in the UI." + ] + }, + "project_region": { + "description": "The machine name of the region where the project is located. Cannot be changed after project creation.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The machine name of the region where the project is located. Cannot be changed after project creation." + ] + }, + "project_region_label": { + "description": "The human-readable name of the region where the project is located.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The human-readable name of the region where the project is located." + ] + }, + "project_ui": { + "description": "The URL for the project's user interface.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The URL for the project's user interface." + ] + }, + "project_options": { + "$ref": "#/components/schemas/ProjectOptions" + }, + "agency_site": { + "description": "True if the project is an agency site.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "True if the project is an agency site." + ] + }, + "invoiced": { + "description": "Whether the subscription is invoiced.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the subscription is invoiced." + ] + }, + "hipaa": { + "description": "Whether the project is marked as HIPAA.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the project is marked as HIPAA." + ] + }, + "is_trial_plan": { + "description": "Whether the project is currently on a trial plan.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the project is currently on a trial plan." + ] + }, + "services": { + "description": "Details of the attached services.", + "type": "array", + "items": { + "description": "Details of a service", + "type": "object" + }, + "x-isDateTime": false, + "x-description": [ + "Details of the attached services." + ] + }, + "green": { + "description": "Whether the subscription is considered green (on a green region, belonging to a green vendor) for billing purposes.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the subscription is considered green (on a green region, belonging to a green vendor) for billing", + "purposes." + ] + } + }, + "type": "object", + "x-description": [ + "The subscription object." + ] + }, + "ProjectOptions": { + "description": "The project options object.", + "properties": { + "defaults": { + "description": "The initial values applied to the project.", + "properties": { + "settings": { + "description": "The project settings.", + "type": "object", + "x-description": [ + "The project settings." + ] + }, + "variables": { + "description": "The project variables.", + "type": "object", + "x-description": [ + "The project variables." + ] + }, + "access": { + "description": "The project access list.", + "type": "object", + "x-description": [ + "The project access list." + ] + }, + "capabilities": { + "description": "The project capabilities.", + "type": "object", + "x-description": [ + "The project capabilities." + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The initial values applied to the project." + ] + }, + "enforced": { + "description": "The enforced values applied to the project.", + "properties": { + "settings": { + "description": "The project settings.", + "type": "object", + "x-description": [ + "The project settings." + ] + }, + "capabilities": { + "description": "The project capabilities.", + "type": "object", + "x-description": [ + "The project capabilities." + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The enforced values applied to the project." + ] + }, + "regions": { + "description": "The available regions.", + "type": "array", + "items": { + "type": "string" + }, + "x-isDateTime": false, + "x-description": [ + "The available regions." + ] + }, + "plans": { + "description": "The available plans.", + "type": "array", + "items": { + "type": "string" + }, + "x-isDateTime": false, + "x-description": [ + "The available plans." + ] + }, + "billing": { + "description": "The billing settings.", + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The billing settings." + ] + } + }, + "type": "object", + "x-description": [ + "The project options object." + ] + }, + "SubscriptionCurrentUsageObject": { + "description": "A subscription's usage group current usage object.", + "properties": { + "cpu_app": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "storage_app_services": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "memory_app": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "cpu_services": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "memory_services": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "backup_storage": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "build_cpu": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "build_memory": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "egress_bandwidth": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "ingress_requests": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "logs_fwd_content_size": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "fastly_bandwidth": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "fastly_requests": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + } + }, + "type": "object", + "x-description": [ + "A subscription's usage group current usage object." + ] + }, + "UsageGroupCurrentUsageProperties": { + "description": "Current usage info for a usage group.", + "properties": { + "title": { + "description": "The title of the usage group.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The title of the usage group." + ] + }, + "type": { + "description": "The usage group type.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "The usage group type." + ] + }, + "current_usage": { + "description": "The value of current usage for the group.", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "The value of current usage for the group." + ] + }, + "current_usage_formatted": { + "description": "The formatted value of current usage for the group.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The formatted value of current usage for the group." + ] + }, + "not_charged": { + "description": "Whether the group is not charged for the subscription.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the group is not charged for the subscription." + ] + }, + "free_quantity": { + "description": "The amount of free usage for the group.", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "The amount of free usage for the group." + ] + }, + "free_quantity_formatted": { + "description": "The formatted amount of free usage for the group.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The formatted amount of free usage for the group." + ] + }, + "daily_average": { + "description": "The daily average usage calculated for the group.", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "The daily average usage calculated for the group." + ] + }, + "daily_average_formatted": { + "description": "The formatted daily average usage calculated for the group.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The formatted daily average usage calculated for the group." + ] + } + }, + "type": "object", + "x-description": [ + "Current usage info for a usage group." + ] + }, + "HalLinks": { + "description": "Links to _self, and previous or next page, given that they exist.", + "properties": { + "self": { + "description": "The cardinal link to the self resource.", + "properties": { + "title": { + "description": "Title of the link", + "type": "string", + "x-description": [ + "Title of the link" + ] + }, + "href": { + "description": "URL of the link", + "type": "string", + "x-description": [ + "URL of the link" + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The cardinal link to the self resource." + ] + }, + "previous": { + "description": "The link to the previous resource page, given that it exists.", + "properties": { + "title": { + "description": "Title of the link", + "type": "string", + "x-description": [ + "Title of the link" + ] + }, + "href": { + "description": "URL of the link", + "type": "string", + "x-description": [ + "URL of the link" + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The link to the previous resource page, given that it exists." + ] + }, + "next": { + "description": "The link to the next resource page, given that it exists.", + "properties": { + "title": { + "description": "Title of the link", + "type": "string", + "x-description": [ + "Title of the link" + ] + }, + "href": { + "description": "URL of the link", + "type": "string", + "x-description": [ + "URL of the link" + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The link to the next resource page, given that it exists." + ] + } + }, + "type": "object", + "x-description": [ + "Links to _self, and previous or next page, given that they exist." + ] + }, + "Profile": { + "description": "The user profile.", + "properties": { + "id": { + "description": "The user's unique ID.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "The user's unique ID." + ] + }, + "display_name": { + "description": "The user's display name.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The user's display name." + ] + }, + "email": { + "description": "The user's email address.", + "type": "string", + "format": "email", + "x-isDateTime": false, + "x-description": [ + "The user's email address." + ] + }, + "username": { + "description": "The user's username.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The user's username." + ] + }, + "type": { + "description": "The user's type (user/organization).", + "type": "string", + "enum": [ + "user", + "organization" + ], + "x-isDateTime": false, + "x-description": [ + "The user's type (user/organization)." + ] + }, + "picture": { + "description": "The URL of the user's picture.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "The URL of the user's picture." + ] + }, + "company_type": { + "description": "The company type.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The company type." + ] + }, + "company_name": { + "description": "The name of the company.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The name of the company." + ] + }, + "currency": { + "description": "A 3-letter ISO 4217 currency code (assigned according to the billing address).", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "A 3-letter ISO 4217 currency code (assigned according to the billing address)." + ] + }, + "vat_number": { + "description": "The vat number of the user.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The vat number of the user." + ] + }, + "company_role": { + "description": "The role of the user in the company.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The role of the user in the company." + ] + }, + "website_url": { + "description": "The user or company website.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The user or company website." + ] + }, + "new_ui": { + "description": "Whether the new UI features are enabled for this user.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the new UI features are enabled for this user." + ] + }, + "ui_colorscheme": { + "description": "The user's chosen color scheme for user interfaces.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The user's chosen color scheme for user interfaces." + ] + }, + "default_catalog": { + "description": "The URL of a catalog file which overrides the default.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The URL of a catalog file which overrides the default." + ] + }, + "project_options_url": { + "description": "The URL of an account-wide project options file.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The URL of an account-wide project options file." + ] + }, + "marketing": { + "description": "Flag if the user agreed to receive marketing communication.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Flag if the user agreed to receive marketing communication." + ] + }, + "created_at": { + "description": "The timestamp representing when the user account was created.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The timestamp representing when the user account was created." + ] + }, + "updated_at": { + "description": "The timestamp representing when the user account was last modified.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The timestamp representing when the user account was last modified." + ] + }, + "billing_contact": { + "description": "The e-mail address of a contact to whom billing notices will be sent.", + "type": "string", + "format": "email", + "x-isDateTime": false, + "x-description": [ + "The e-mail address of a contact to whom billing notices will be sent." + ] + }, + "security_contact": { + "description": "The e-mail address of a contact to whom security notices will be sent.", + "type": "string", + "format": "email", + "x-isDateTime": false, + "x-description": [ + "The e-mail address of a contact to whom security notices will be sent." + ] + }, + "current_trial": { + "description": "The current trial for the profile.", + "properties": { + "active": { + "description": "The trial active status.", + "type": "boolean", + "x-description": [ + "The trial active status." + ] + }, + "created": { + "description": "The trial creation date.", + "type": "string", + "format": "date-time", + "x-description": [ + "The trial creation date." + ] + }, + "description": { + "description": "The trial description.", + "type": "string", + "x-description": [ + "The trial description." + ] + }, + "expiration": { + "description": "The trial expiration-date.", + "type": "string", + "format": "date-time", + "x-description": [ + "The trial expiration-date." + ] + }, + "current": { + "description": "The total amount spent by the trial user at this point in time.", + "properties": { + "formatted": { + "description": "The total amount formatted.", + "type": "string", + "x-description": [ + "The total amount formatted." + ] + }, + "amount": { + "description": "The total amount.", + "type": "string", + "x-description": [ + "The total amount." + ] + }, + "currency": { + "description": "The currency.", + "type": "string", + "x-description": [ + "The currency." + ] + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string", + "x-description": [ + "Currency symbol." + ] + } + }, + "type": "object", + "x-description": [ + "The total amount spent by the trial user at this point in time." + ] + }, + "spend": { + "description": "The total amount available for the trial.", + "properties": { + "formatted": { + "description": "The total amount formatted.", + "type": "string", + "x-description": [ + "The total amount formatted." + ] + }, + "amount": { + "description": "The total amount.", + "type": "string", + "x-description": [ + "The total amount." + ] + }, + "currency": { + "description": "The currency.", + "type": "string", + "x-description": [ + "The currency." + ] + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string", + "x-description": [ + "Currency symbol." + ] + } + }, + "type": "object", + "x-description": [ + "The total amount available for the trial." + ] + }, + "spend_remaining": { + "description": "The remaining amount available for the trial.", + "properties": { + "formatted": { + "description": "The total amount formatted.", + "type": "string", + "x-description": [ + "The total amount formatted." + ] + }, + "amount": { + "description": "The total amount.", + "type": "string", + "x-description": [ + "The total amount." + ] + }, + "currency": { + "description": "The currency.", + "type": "string", + "x-description": [ + "The currency." + ] + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string", + "x-description": [ + "Currency symbol." + ] + }, + "unlimited": { + "description": "Spend limit is ignored (in favor of resource limitations).", + "type": "boolean", + "x-description": [ + "Spend limit is ignored (in favor of resource limitations)." + ] + } + }, + "type": "object", + "x-description": [ + "The remaining amount available for the trial." + ] + }, + "projects": { + "description": "Projects active under trial", + "properties": { + "id": { + "description": "Trial project ID", + "type": "string", + "x-description": [ + "Trial project ID" + ] + }, + "name": { + "description": "Trial project name", + "type": "string", + "x-description": [ + "Trial project name" + ] + }, + "total": { + "properties": { + "amount": { + "description": "Trial project cost", + "type": "integer", + "x-description": [ + "Trial project cost" + ] + }, + "currency_code": { + "description": "Currency code", + "type": "string", + "x-description": [ + "Currency code" + ] + }, + "currency_symbol": { + "description": "Currency symbol", + "type": "string", + "x-description": [ + "Currency symbol" + ] + }, + "formatted": { + "description": "Trial project cost formatted with currency sign", + "type": "string", + "x-description": [ + "Trial project cost formatted with currency sign" + ] + } + }, + "type": "object" + } + }, + "type": "object", + "x-description": [ + "Projects active under trial" + ] + }, + "pending_verification": { + "description": "Required verification method (if applicable).", + "type": "string", + "enum": [ + "credit-card" + ], + "nullable": true, + "deprecated": true, + "x-description": [ + "Required verification method (if applicable)." + ] + }, + "model": { + "description": "The trial trial model.", + "type": "string", + "x-description": [ + "The trial trial model." + ] + }, + "days_remaining": { + "description": "The amount of days until the trial expires.", + "type": "integer", + "x-description": [ + "The amount of days until the trial expires." + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The current trial for the profile." + ] + }, + "invoiced": { + "description": "The customer is invoiced.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "The customer is invoiced." + ] + } + }, + "type": "object", + "x-description": [ + "The user profile." + ] + }, + "AddressMetadata": { + "description": "Information about fields required to express an address.", + "properties": { + "metadata": { + "description": "Address field metadata.", + "properties": { + "required_fields": { + "description": "Fields required to express the address.", + "type": "array", + "items": { + "type": "string" + }, + "x-description": [ + "Fields required to express the address." + ] + }, + "field_labels": { + "description": "Localized labels for address fields.", + "type": "object", + "x-description": [ + "Localized labels for address fields." + ] + }, + "show_vat": { + "description": "Whether this country supports a VAT number.", + "type": "boolean", + "x-description": [ + "Whether this country supports a VAT number." + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Address field metadata." + ] + } + }, + "type": "object", + "x-description": [ + "Information about fields required to express an address." + ] + }, + "Ticket": { + "description": "The support ticket object.", + "properties": { + "ticket_id": { + "description": "The ID of the ticket.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The ID of the ticket." + ] + }, + "created": { + "description": "The time when the support ticket was created.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time when the support ticket was created." + ] + }, + "updated": { + "description": "The time when the support ticket was updated.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time when the support ticket was updated." + ] + }, + "type": { + "description": "A type of the ticket.", + "type": "string", + "enum": [ + "problem", + "task", + "incident", + "question" + ], + "x-isDateTime": false, + "x-description": [ + "A type of the ticket." + ] + }, + "subject": { + "description": "A title of the ticket.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "A title of the ticket." + ] + }, + "description": { + "description": "The description body of the support ticket.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The description body of the support ticket." + ] + }, + "priority": { + "description": "A priority of the ticket.", + "type": "string", + "enum": [ + "low", + "normal", + "high", + "urgent" + ], + "x-isDateTime": false, + "x-description": [ + "A priority of the ticket." + ] + }, + "followup_tid": { + "description": "Followup ticket ID. The unique ID of the ticket which this ticket is a follow-up to.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Followup ticket ID. The unique ID of the ticket which this ticket is a follow-up to." + ] + }, + "status": { + "description": "The status of the support ticket.", + "type": "string", + "enum": [ + "closed", + "deleted", + "hold", + "new", + "open", + "pending", + "solved" + ], + "x-isDateTime": false, + "x-description": [ + "The status of the support ticket." + ] + }, + "recipient": { + "description": "Email address of the ticket recipient, defaults to support@upsun.com.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Email address of the ticket recipient, defaults to support@upsun.com." + ] + }, + "requester_id": { + "description": "UUID of the ticket requester.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "UUID of the ticket requester." + ] + }, + "submitter_id": { + "description": "UUID of the ticket submitter.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "UUID of the ticket submitter." + ] + }, + "assignee_id": { + "description": "UUID of the ticket assignee.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "UUID of the ticket assignee." + ] + }, + "organization_id": { + "description": "A reference id that is usable to find the commerce license.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "A reference id that is usable to find the commerce license." + ] + }, + "collaborator_ids": { + "description": "A list of the collaborators uuids for this ticket.", + "type": "array", + "items": { + "type": "string" + }, + "x-isDateTime": false, + "x-description": [ + "A list of the collaborators uuids for this ticket." + ] + }, + "has_incidents": { + "description": "Whether or not this ticket has incidents.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether or not this ticket has incidents." + ] + }, + "due": { + "description": "A time that the ticket is due at.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "A time that the ticket is due at." + ] + }, + "tags": { + "description": "A list of tags assigned to the ticket.", + "type": "array", + "items": { + "type": "string" + }, + "x-isDateTime": false, + "x-description": [ + "A list of tags assigned to the ticket." + ] + }, + "subscription_id": { + "description": "The internal ID of the subscription.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The internal ID of the subscription." + ] + }, + "ticket_group": { + "description": "Maps to zendesk field 'Request group'.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Request group'." + ] + }, + "support_plan": { + "description": "Maps to zendesk field 'The support plan associated with this ticket.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'The support plan associated with this ticket." + ] + }, + "affected_url": { + "description": "The affected URL associated with the support ticket.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "The affected URL associated with the support ticket." + ] + }, + "queue": { + "description": "The queue the support ticket is in.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The queue the support ticket is in." + ] + }, + "issue_type": { + "description": "The issue type of the support ticket.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The issue type of the support ticket." + ] + }, + "resolution_time": { + "description": "Maps to zendesk field 'Resolution Time'.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "Maps to zendesk field 'Resolution Time'." + ] + }, + "response_time": { + "description": "Maps to zendesk field 'Response Time (time from request to reply).", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "Maps to zendesk field 'Response Time (time from request to reply)." + ] + }, + "project_url": { + "description": "Maps to zendesk field 'Project URL'.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Project URL'." + ] + }, + "region": { + "description": "Maps to zendesk field 'Region'.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Region'." + ] + }, + "category": { + "description": "Maps to zendesk field 'Category'.", + "type": "string", + "enum": [ + "access", + "billing_question", + "complaint", + "compliance_question", + "configuration_change", + "general_question", + "incident_outage", + "bug_report", + "onboarding", + "report_a_gui_bug", + "close_my_account" + ], + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Category'." + ] + }, + "environment": { + "description": "Maps to zendesk field 'Environment'.", + "type": "string", + "enum": [ + "env_development", + "env_staging", + "env_production" + ], + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Environment'." + ] + }, + "ticket_sharing_status": { + "description": "Maps to zendesk field 'Ticket Sharing Status'.", + "type": "string", + "enum": [ + "ts_sent_to_platform", + "ts_accepted_by_platform", + "ts_returned_from_platform", + "ts_solved_by_platform", + "ts_rejected_by_platform" + ], + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Ticket Sharing Status'." + ] + }, + "application_ticket_url": { + "description": "Maps to zendesk field 'Application Ticket URL'.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Application Ticket URL'." + ] + }, + "infrastructure_ticket_url": { + "description": "Maps to zendesk field 'Infrastructure Ticket URL'.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Infrastructure Ticket URL'." + ] + }, + "jira": { + "description": "A list of JIRA issues related to the support ticket.", + "type": "array", + "items": { + "properties": { + "id": { + "description": "The id of the query.", + "type": "integer" + }, + "ticket_id": { + "description": "The id of the ticket.", + "type": "integer" + }, + "issue_id": { + "description": "The issue id number.", + "type": "integer" + }, + "issue_key": { + "description": "The issue key.", + "type": "string" + }, + "created_at": { + "description": "The created at timestamp.", + "type": "number", + "format": "float" + }, + "updated_at": { + "description": "The updated at timestamp.", + "type": "number", + "format": "float" + } + }, + "type": "object" + }, + "x-isDateTime": false, + "x-description": [ + "A list of JIRA issues related to the support ticket." + ] + }, + "zd_ticket_url": { + "description": "URL to the customer-facing ticket in Zendesk.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "URL to the customer-facing ticket in Zendesk." + ] + } + }, + "type": "object", + "x-description": [ + "The support ticket object." + ] + }, + "CurrentUser": { + "description": "The user object.", + "properties": { + "id": { + "description": "The UUID of the owner.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "The UUID of the owner." + ] + }, + "uuid": { + "description": "The UUID of the owner.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "The UUID of the owner." + ] + }, + "username": { + "description": "The username of the owner.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The username of the owner." + ] + }, + "display_name": { + "description": "The full name of the owner.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The full name of the owner." + ] + }, + "status": { + "description": "Status of the user. 0 = blocked; 1 = active.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Status of the user. 0 = blocked; 1 = active." + ] + }, + "mail": { + "description": "The email address of the owner.", + "type": "string", + "format": "email", + "x-isDateTime": false, + "x-description": [ + "The email address of the owner." + ] + }, + "ssh_keys": { + "description": "The list of user's public SSH keys.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SshKey" + }, + "x-isDateTime": false, + "x-description": [ + "The list of user's public SSH keys." + ] + }, + "has_key": { + "description": "The indicator whether the user has a public ssh key on file or not.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "The indicator whether the user has a public ssh key on file or not." + ] + }, + "projects": { + "type": "array", + "items": { + "properties": { + "id": { + "description": "The unique ID string of the project.", + "type": "string" + }, + "name": { + "description": "The name given to the project. Appears as the title in the user interface.", + "type": "string" + }, + "title": { + "description": "The name given to the project. Appears as the title in the user interface.", + "type": "string" + }, + "cluster": { + "description": "The machine name of the region where the project is located. Cannot be changed after project creation.", + "type": "string" + }, + "cluster_label": { + "description": "The human-readable name of the region where the project is located.", + "type": "string" + }, + "region": { + "description": "The machine name of the region where the project is located. Cannot be changed after project creation.", + "type": "string" + }, + "region_label": { + "description": "The human-readable name of the region where the project is located.", + "type": "string" + }, + "uri": { + "description": "The URL for the project's user interface.", + "type": "string" + }, + "endpoint": { + "description": "The project API endpoint for the project.", + "type": "string" + }, + "license_id": { + "description": "The ID of the subscription.", + "type": "integer" + }, + "owner": { + "description": "The UUID of the owner.", + "type": "string", + "format": "uuid" + }, + "owner_info": { + "$ref": "#/components/schemas/OwnerInfo" + }, + "plan": { + "description": "The plan type of the subscription.", + "type": "string" + }, + "subscription_id": { + "description": "The ID of the subscription.", + "type": "integer" + }, + "status": { + "description": "The status of the project.", + "type": "string" + }, + "vendor": { + "description": "The machine name of the vendor the subscription belongs to.", + "type": "string" + }, + "vendor_label": { + "description": "The machine name of the vendor the subscription belongs to.", + "type": "string" + }, + "vendor_website": { + "description": "The URL of the vendor the subscription belongs to.", + "type": "string", + "format": "url" + }, + "vendor_resources": { + "description": "The link to the resources of the vendor the subscription belongs to.", + "type": "string" + }, + "created_at": { + "description": "The creation date of the subscription.", + "type": "string", + "format": "date-time" + } + }, + "type": "object" + }, + "x-isDateTime": false + }, + "sequence": { + "description": "The sequential ID of the user.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The sequential ID of the user." + ] + }, + "roles": { + "type": "array", + "items": { + "description": "The user role name.", + "type": "string" + }, + "x-isDateTime": false + }, + "picture": { + "description": "The URL of the user image.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "The URL of the user image." + ] + }, + "tickets": { + "description": "Number of support tickets by status.", + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Number of support tickets by status." + ] + }, + "trial": { + "description": "The indicator whether the user is in trial or not.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "The indicator whether the user is in trial or not." + ] + }, + "current_trial": { + "type": "array", + "items": { + "properties": { + "created": { + "description": "The ISO timestamp of the trial creation date time.", + "type": "string", + "format": "date-time" + }, + "description": { + "description": "The human readable trial description", + "type": "string" + }, + "spend_remaining": { + "description": "Total spend amount of the voucher minus existing project costs for the existing billing cycle.", + "type": "string" + }, + "expiration": { + "description": "Date the trial expires.", + "type": "string", + "format": "date-time" + } + }, + "type": "object" + }, + "x-isDateTime": false + } + }, + "type": "object", + "x-description": [ + "The user object." + ] + }, + "OrganizationInvitation": { + "title": "OrganizationInvitation", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the invitation.", + "x-isDateTime": false, + "x-description": [ + "The ID of the invitation." + ] + }, + "state": { + "type": "string", + "enum": [ + "pending", + "processing", + "accepted", + "cancelled", + "error" + ], + "description": "The invitation state.", + "x-isDateTime": false, + "x-description": [ + "The invitation state." + ] + }, + "organization_id": { + "type": "string", + "description": "The ID of the organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization." + ] + }, + "email": { + "type": "string", + "format": "email", + "description": "The email address of the invitee.", + "x-isDateTime": false, + "x-description": [ + "The email address of the invitee." + ] + }, + "owner": { + "type": "object", + "description": "The inviter.", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-description": [ + "The ID of the user." + ] + }, + "display_name": { + "type": "string", + "description": "The user's display name.", + "x-description": [ + "The user's display name." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The inviter." + ] + }, + "created_at": { + "type": "string", + "description": "The date and time when the invitation was created.", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The date and time when the invitation was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the invitation was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the invitation was last updated." + ] + }, + "finished_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the invitation was finished.", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The date and time when the invitation was finished." + ] + }, + "permissions": { + "$ref": "#/components/schemas/OrganizationPermissions" + } + }, + "x-examples": { + "example-1": { + "id": "97f46eca-6276-4993-bfeb-bbb53cba6f08", + "state": "pending", + "organization_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", + "email": "bob@example.com", + "owner": { + "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", + "display_name": "Alice" + }, + "created_at": "2019-08-24T14:15:22Z", + "updated_at": "2019-08-24T14:15:22Z", + "finished_at": null, + "permissions": [ + "members" + ] + } + } + }, + "OrganizationPermissions": { + "type": "array", + "description": "The permissions the invitee should be given on the organization.", + "items": { + "type": "string", + "enum": [ + "admin", + "billing", + "plans", + "members", + "project:create", + "projects:list" + ] + }, + "x-description": [ + "The permissions the invitee should be given on the organization." + ] + }, + "ProjectInvitation": { + "title": "", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the invitation.", + "x-isDateTime": false, + "x-description": [ + "The ID of the invitation." + ] + }, + "state": { + "type": "string", + "enum": [ + "pending", + "processing", + "accepted", + "cancelled", + "error" + ], + "description": "The invitation state.", + "x-isDateTime": false, + "x-description": [ + "The invitation state." + ] + }, + "project_id": { + "type": "string", + "description": "The ID of the project.", + "x-isDateTime": false, + "x-description": [ + "The ID of the project." + ] + }, + "role": { + "type": "string", + "enum": [ + "admin", + "viewer" + ], + "description": "The project role.", + "x-isDateTime": false, + "x-description": [ + "The project role." + ] + }, + "email": { + "type": "string", + "format": "email", + "description": "The email address of the invitee.", + "x-isDateTime": false, + "x-description": [ + "The email address of the invitee." + ] + }, + "owner": { + "type": "object", + "description": "The inviter.", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-description": [ + "The ID of the user." + ] + }, + "display_name": { + "type": "string", + "description": "The user's display name.", + "x-description": [ + "The user's display name." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The inviter." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the invitation was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the invitation was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the invitation was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the invitation was last updated." + ] + }, + "finished_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date and time when the invitation was finished.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the invitation was finished." + ] + }, + "environments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the environment." + }, + "type": { + "type": "string", + "description": "The environment type." + }, + "role": { + "type": "string", + "enum": [ + "admin", + "viewer", + "contributor" + ], + "description": "The environment role." + }, + "title": { + "type": "string", + "description": "The environment title." + } + } + }, + "x-isDateTime": false + } + }, + "x-examples": { + "example-1": { + "id": "97f46eca-6276-4993-bfeb-bbb53cba6f08", + "state": "pending", + "project_id": "652soceglkw4u", + "role": "admin", + "email": "bob@example.com", + "owner": { + "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", + "display_name": "Alice" + }, + "created_at": "2019-08-24T14:15:22Z", + "updated_at": "2019-08-24T14:15:22Z", + "finished_at": null, + "environments": {} + } + } + }, + "User": { + "description": "", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-isDateTime": false, + "x-description": [ + "The ID of the user." + ] + }, + "deactivated": { + "type": "boolean", + "description": "Whether the user has been deactivated.", + "x-isDateTime": false, + "x-description": [ + "Whether the user has been deactivated." + ] + }, + "namespace": { + "type": "string", + "description": "The namespace in which the user's username is unique.", + "x-isDateTime": false, + "x-description": [ + "The namespace in which the user's username is unique." + ] + }, + "username": { + "type": "string", + "description": "The user's username.", + "x-isDateTime": false, + "x-description": [ + "The user's username." + ] + }, + "email": { + "type": "string", + "format": "email", + "description": "The user's email address.", + "x-isDateTime": false, + "x-description": [ + "The user's email address." + ] + }, + "email_verified": { + "type": "boolean", + "description": "Whether the user's email address has been verified.", + "x-isDateTime": false, + "x-description": [ + "Whether the user's email address has been verified." + ] + }, + "first_name": { + "type": "string", + "description": "The user's first name.", + "x-isDateTime": false, + "x-description": [ + "The user's first name." + ] + }, + "last_name": { + "type": "string", + "description": "The user's last name.", + "x-isDateTime": false, + "x-description": [ + "The user's last name." + ] + }, + "picture": { + "type": "string", + "format": "uri", + "description": "The user's picture.", + "x-isDateTime": false, + "x-description": [ + "The user's picture." + ] + }, + "company": { + "type": "string", + "description": "The user's company.", + "x-isDateTime": false, + "x-description": [ + "The user's company." + ] + }, + "website": { + "type": "string", + "format": "uri", + "description": "The user's website.", + "x-isDateTime": false, + "x-description": [ + "The user's website." + ] + }, + "country": { + "type": "string", + "maxLength": 2, + "minLength": 2, + "description": "The user's ISO 3166-1 alpha-2 country code.", + "x-isDateTime": false, + "x-description": [ + "The user's ISO 3166-1 alpha-2 country code." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the user was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the user was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the user was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the user was last updated." + ] + }, + "consented_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the user consented to the Terms of Service.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the user consented to the Terms of Service." + ] + }, + "consent_method": { + "type": "string", + "description": "The method by which the user consented to the Terms of Service.", + "enum": [ + "opt-in", + "text-ref" + ], + "x-isDateTime": false, + "x-description": [ + "The method by which the user consented to the Terms of Service." + ] + } + }, + "required": [ + "id", + "deactivated", + "namespace", + "username", + "email", + "email_verified", + "first_name", + "last_name", + "picture", + "company", + "website", + "country", + "created_at", + "updated_at" + ], + "x-examples": { + "example-1": { + "company": "Platform.sh SAS", + "country": "FR", + "created_at": "2010-04-19T10:00:00Z", + "deactivated": false, + "email": "hello@platform.sh", + "email_verified": true, + "first_name": "Hello", + "id": "d81c8ee2-44b3-429f-b944-a33ad7437690", + "last_name": "World", + "namespace": "platformsh", + "picture": "https://accounts.platform.sh/profiles/blimp_profile/themes/platformsh_theme/images/mail/logo.png", + "updated_at": "2021-01-27T13:58:38.06968Z", + "username": "platform-sh", + "website": "https://platform.sh", + "consented_at": "2010-04-19T10:00:00Z", + "consent_method": "opt-in" + } + } + }, + "Error": { + "description": "", + "type": "object", + "properties": { + "status": { + "type": "string", + "x-isDateTime": false + }, + "message": { + "type": "string", + "x-isDateTime": false + }, + "code": { + "type": "number", + "x-isDateTime": false + }, + "detail": { + "type": "object", + "x-isDateTime": false + }, + "title": { + "type": "string", + "x-isDateTime": false + } + }, + "title": "", + "x-examples": { + "example-1": { + "status": "Invalid input", + "message": "This field is required.", + "code": 400, + "detail": { + "field": [ + "This field is required." + ] + }, + "title": "Bad Request" + } + } + }, + "ListLinks": { + "type": "object", + "properties": { + "self": { + "$ref": "#/components/schemas/Link" + }, + "previous": { + "$ref": "#/components/schemas/Link" + }, + "next": { + "$ref": "#/components/schemas/Link" + } + } + }, + "Link": { + "type": "object", + "title": "Link", + "description": "A hypermedia link to the {current, next, previous} set of items.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link", + "x-isDateTime": false, + "x-description": [ + "URL of the link" + ] + } + }, + "x-description": [ + "A hypermedia link to the {current, next, previous} set of items." + ] + }, + "ApiToken": { + "description": "", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the token.", + "x-isDateTime": false, + "x-description": [ + "The ID of the token." + ] + }, + "name": { + "type": "string", + "description": "The token name.", + "x-isDateTime": false, + "x-description": [ + "The token name." + ] + }, + "mfa_on_creation": { + "type": "boolean", + "description": "Whether the user had multi-factor authentication (MFA) enabled when they created the token.", + "x-isDateTime": false, + "x-description": [ + "Whether the user had multi-factor authentication (MFA) enabled when they created the token." + ] + }, + "token": { + "type": "string", + "description": "The token in plain text (available only when created).", + "x-isDateTime": false, + "x-description": [ + "The token in plain text (available only when created)." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the token was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the token was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the token was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the token was last updated." + ] + }, + "last_used_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date and time when the token was last exchanged for an access token. This will be null for a token which has never been used, or not used since this API property was added. Note: After an API token is used, the derived access token may continue to be used until its expiry. This also applies to SSH certificate(s) derived from the access token.\n", + "x-isDateTime": true, + "x-description": [ + "The date and time when the token was last exchanged for an access token. This will be null for a", + "token which has never been used, or not used since this API property was added. Note: After an", + "API token is used, the derived access token may continue to be used until its expiry. This also applies to SSH", + "certificate(s) derived from the access token." + ] + } + }, + "x-examples": { + "example-1": { + "created_at": "2019-01-29T08:17:47Z", + "id": "660aa36d-23cf-402b-8889-63af71967f2b", + "name": "Token for CI", + "updated_at": "2019-01-29T08:17:47Z" + } + } + }, + "Connection": { + "description": "", + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "The name of the federation provider.", + "x-isDateTime": false, + "x-description": [ + "The name of the federation provider." + ] + }, + "provider_type": { + "type": "string", + "description": "The type of the federation provider.", + "x-isDateTime": false, + "x-description": [ + "The type of the federation provider." + ] + }, + "is_mandatory": { + "type": "boolean", + "description": "Whether the federated login connection is mandatory.", + "x-isDateTime": false, + "x-description": [ + "Whether the federated login connection is mandatory." + ] + }, + "subject": { + "type": "string", + "description": "The identity on the federation provider.", + "x-isDateTime": false, + "x-description": [ + "The identity on the federation provider." + ] + }, + "email_address": { + "type": "string", + "description": "The email address presented on the federated login connection.", + "x-isDateTime": false, + "x-description": [ + "The email address presented on the federated login connection." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the connection was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the connection was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the connection was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the connection was last updated." + ] + } + }, + "x-examples": { + "example-1": { + "created_at": "2021-05-24T07:20:35.683264Z", + "provider": "acme-inc-oidc", + "provider_type": "okta", + "subject": "1621840835647277693", + "email_address": "name@example.com", + "updated_at": "2021-05-24T07:20:35.683264Z" + } + } + }, + "OrganizationMfaEnforcement": { + "description": "The MFA enforcement for the organization.", + "type": "object", + "properties": { + "enforce_mfa": { + "type": "boolean", + "description": "Whether the MFA enforcement is enabled.", + "x-isDateTime": false, + "x-description": [ + "Whether the MFA enforcement is enabled." + ] + } + }, + "x-examples": { + "example-1": { + "enforce_mfa": true + } + }, + "x-description": [ + "The MFA enforcement for the organization." + ] + }, + "OrganizationSSOConfig": { + "description": "The SSO configuration for the organization.", + "type": "object", + "allOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/GoogleSSOConfig" + } + ] + }, + { + "type": "object", + "properties": { + "organization_id": { + "type": "string", + "description": "Organization ID.", + "x-description": [ + "Organization ID." + ] + }, + "enforced": { + "type": "boolean", + "description": "Whether the configuration is enforced for all the organization members.", + "x-description": [ + "Whether the configuration is enforced for all the organization members." + ] + }, + "created_at": { + "type": "string", + "description": "The date and time when the SSO configuration was created.", + "format": "date-time", + "x-description": [ + "The date and time when the SSO configuration was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the SSO configuration was last updated.", + "x-description": [ + "The date and time when the SSO configuration was last updated." + ] + } + } + } + ], + "x-examples": { + "example-1": { + "organization_id": "01EY8BWRSQ56EY1TDC32PARAJS", + "provider_type": "google", + "domain": "example.com", + "enforced": true, + "created_at": "2021-05-24T07:20:35.683264Z", + "updated_at": "2021-05-24T07:20:35.683264Z" + } + }, + "x-description": [ + "The SSO configuration for the organization." + ] + }, + "GoogleSSOConfig": { + "type": "object", + "title": "GoogleSSO", + "properties": { + "provider_type": { + "type": "string", + "description": "SSO provider type.", + "enum": [ + "google" + ], + "x-isDateTime": false, + "x-description": [ + "SSO provider type." + ] + }, + "domain": { + "type": "string", + "description": "Google hosted domain.", + "x-isDateTime": false, + "x-description": [ + "Google hosted domain." + ] + } + } + }, + "Team": { + "description": "", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "ulid", + "description": "The ID of the team.", + "x-isDateTime": false, + "x-description": [ + "The ID of the team." + ] + }, + "organization_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the parent organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the parent organization." + ] + }, + "label": { + "type": "string", + "description": "The human-readable label of the team.", + "x-isDateTime": false, + "x-description": [ + "The human-readable label of the team." + ] + }, + "project_permissions": { + "type": "array", + "description": "Project permissions that are granted to the team.", + "items": { + "type": "string", + "enum": [ + "admin", + "viewer", + "development:admin", + "development:contributor", + "development:viewer", + "staging:admin", + "staging:contributor", + "staging:viewer", + "production:admin", + "production:contributor", + "production:viewer" + ] + }, + "x-isDateTime": false, + "x-description": [ + "Project permissions that are granted to the team." + ] + }, + "counts": { + "type": "object", + "properties": { + "member_count": { + "type": "integer", + "description": "Total count of members of the team.", + "x-description": [ + "Total count of members of the team." + ] + }, + "project_count": { + "type": "integer", + "description": "Total count of projects that the team has access to.", + "x-description": [ + "Total count of projects that the team has access to." + ] + } + }, + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the team was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the team was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the team was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the team was last updated." + ] + } + }, + "x-examples": { + "example-1": { + "id": "01FVMKN9KHVWWVY488AVKDWHR3", + "organization_id": "01EY8BWRSQ56EY1TDC32PARAJS", + "counts": { + "member_count": 12, + "project_count": 5 + }, + "label": "Contractors", + "created_at": "2021-05-24T07:20:35.683264Z", + "updated_at": "2021-05-24T07:20:35.683264Z", + "project_permissions": [ + "viewer", + "staging:contributor", + "development:admin" + ] + } + } + }, + "TeamMember": { + "type": "object", + "properties": { + "team_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the team.", + "x-isDateTime": false, + "x-description": [ + "The ID of the team." + ] + }, + "user_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-isDateTime": false, + "x-description": [ + "The ID of the user." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the team member was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the team member was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the team member was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the team member was last updated." + ] + } + } + }, + "UserReference": { + "description": "The referenced user, or null if it no longer exists.", + "type": "object", + "nullable": true, + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-isDateTime": false, + "x-description": [ + "The ID of the user." + ] + }, + "username": { + "type": "string", + "description": "The user's username.", + "x-isDateTime": false, + "x-description": [ + "The user's username." + ] + }, + "email": { + "type": "string", + "format": "email", + "description": "The user's email address.", + "x-isDateTime": false, + "x-description": [ + "The user's email address." + ] + }, + "first_name": { + "type": "string", + "description": "The user's first name.", + "x-isDateTime": false, + "x-description": [ + "The user's first name." + ] + }, + "last_name": { + "type": "string", + "description": "The user's last name.", + "x-isDateTime": false, + "x-description": [ + "The user's last name." + ] + }, + "picture": { + "type": "string", + "format": "uri", + "description": "The user's picture.", + "x-isDateTime": false, + "x-description": [ + "The user's picture." + ] + }, + "mfa_enabled": { + "type": "boolean", + "description": "Whether the user has enabled MFA. Note: the built-in MFA feature may not be necessary if the user is linked to a mandatory SSO provider that itself supports MFA (see \"sso_enabled\\\").", + "x-isDateTime": false, + "x-description": [ + "Whether the user has enabled MFA. Note: the built-in MFA feature may not be necessary if the user is linked to a", + "mandatory SSO provider that itself supports MFA (see \"sso_enabled\\\")." + ] + }, + "sso_enabled": { + "type": "boolean", + "description": "Whether the user is linked to a mandatory SSO provider.", + "x-isDateTime": false, + "x-description": [ + "Whether the user is linked to a mandatory SSO provider." + ] + } + }, + "x-examples": { + "example-1": { + "email": "hello@platform.sh", + "first_name": "Hello", + "id": "d81c8ee2-44b3-429f-b944-a33ad7437690", + "last_name": "World", + "picture": "https://accounts.platform.sh/profiles/blimp_profile/themes/platformsh_theme/images/mail/logo.png", + "username": "platform-sh", + "mfa_enabled": true, + "sso_enabled": true + } + }, + "x-description": [ + "The referenced user, or null if it no longer exists." + ] + }, + "TeamReference": { + "description": "The referenced team, or null if it no longer exists.", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "ulid", + "description": "The ID of the team.", + "x-isDateTime": false, + "x-description": [ + "The ID of the team." + ] + }, + "organization_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the parent organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the parent organization." + ] + }, + "label": { + "type": "string", + "description": "The human-readable label of the team.", + "x-isDateTime": false, + "x-description": [ + "The human-readable label of the team." + ] + }, + "project_permissions": { + "type": "array", + "description": "Project permissions that are granted to the team.", + "items": { + "type": "string", + "enum": [ + "admin", + "viewer", + "development:admin", + "development:contributor", + "development:viewer", + "staging:admin", + "staging:contributor", + "staging:viewer", + "production:admin", + "production:contributor", + "production:viewer" + ] + }, + "x-isDateTime": false, + "x-description": [ + "Project permissions that are granted to the team." + ] + }, + "counts": { + "type": "object", + "properties": { + "member_count": { + "type": "integer", + "description": "Total count of members of the team.", + "x-description": [ + "Total count of members of the team." + ] + }, + "project_count": { + "type": "integer", + "description": "Total count of projects that the team has access to.", + "x-description": [ + "Total count of projects that the team has access to." + ] + } + }, + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the team was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the team was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the team was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the team was last updated." + ] + } + }, + "x-examples": { + "example-1": { + "id": "01FVMKN9KHVWWVY488AVKDWHR3", + "organization_id": "01EY8BWRSQ56EY1TDC32PARAJS", + "counts": { + "member_count": 12, + "project_count": 5 + }, + "label": "Contractors", + "project_permissions": [ + "viewer", + "staging:contributor", + "development:admin" + ], + "created_at": "2021-05-24T07:20:35.683264Z", + "updated_at": "2021-05-24T07:20:35.683264Z" + } + }, + "x-description": [ + "The referenced team, or null if it no longer exists." + ] + }, + "DateTimeFilter": { + "type": "object", + "properties": { + "eq": { + "type": "string", + "description": "Equal", + "x-isDateTime": false, + "x-description": [ + "Equal" + ] + }, + "ne": { + "type": "string", + "description": "Not equal", + "x-isDateTime": false, + "x-description": [ + "Not equal" + ] + }, + "between": { + "type": "string", + "description": "Between (comma-separated list)", + "x-isDateTime": false, + "x-description": [ + "Between (comma-separated list)" + ] + }, + "gt": { + "type": "string", + "description": "Greater than", + "x-isDateTime": false, + "x-description": [ + "Greater than" + ] + }, + "gte": { + "type": "string", + "description": "Greater than or equal", + "x-isDateTime": false, + "x-description": [ + "Greater than or equal" + ] + }, + "lt": { + "type": "string", + "description": "Less than", + "x-isDateTime": false, + "x-description": [ + "Less than" + ] + }, + "lte": { + "type": "string", + "description": "Less than or equal", + "x-isDateTime": false, + "x-description": [ + "Less than or equal" + ] + } + } + }, + "StringFilter": { + "type": "object", + "properties": { + "eq": { + "type": "string", + "description": "Equal", + "x-isDateTime": false, + "x-description": [ + "Equal" + ] + }, + "ne": { + "type": "string", + "description": "Not equal", + "x-isDateTime": false, + "x-description": [ + "Not equal" + ] + }, + "in": { + "type": "string", + "description": "In (comma-separated list)", + "x-isDateTime": false, + "x-description": [ + "In (comma-separated list)" + ] + }, + "nin": { + "type": "string", + "description": "Not in (comma-separated list)", + "x-isDateTime": false, + "x-description": [ + "Not in (comma-separated list)" + ] + }, + "between": { + "type": "string", + "description": "Between (comma-separated list)", + "x-isDateTime": false, + "x-description": [ + "Between (comma-separated list)" + ] + }, + "contains": { + "type": "string", + "description": "Contains", + "x-isDateTime": false, + "x-description": [ + "Contains" + ] + }, + "starts": { + "type": "string", + "description": "Starts with", + "x-isDateTime": false, + "x-description": [ + "Starts with" + ] + }, + "ends": { + "type": "string", + "description": "Ends with", + "x-isDateTime": false, + "x-description": [ + "Ends with" + ] + } + } + }, + "AcceptedResponse": { + "type": "object", + "properties": { + "status": { + "type": "string", + "title": "The status text of the response", + "x-isDateTime": false + }, + "code": { + "type": "integer", + "title": "The status code of the response", + "x-isDateTime": false + } + }, + "required": [ + "status", + "code" + ], + "additionalProperties": false + }, + "Activity": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Activity", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Type", + "x-isDateTime": false + }, + "parameters": { + "type": "object", + "title": "Parameters", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "Project", + "x-isDateTime": false + }, + "integration": { + "type": "string", + "title": "Integration", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Environments", + "x-isDateTime": false + }, + "state": { + "type": "string", + "enum": [ + "cancelled", + "complete", + "in_progress", + "pending", + "scheduled", + "staged" + ], + "title": "State", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "failure", + "success" + ], + "nullable": true, + "title": "Result", + "x-isDateTime": false + }, + "started_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Start date", + "x-isDateTime": true + }, + "completed_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Completion date", + "x-isDateTime": true + }, + "completion_percent": { + "type": "integer", + "title": "Completion percentage", + "x-isDateTime": false + }, + "cancelled_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Cancellation date", + "x-isDateTime": true + }, + "timings": { + "type": "object", + "additionalProperties": { + "type": "number", + "format": "float" + }, + "title": "Timings related to different phases of the activity", + "x-isDateTime": false + }, + "log": { + "type": "string", + "title": "Log", + "deprecated": true, + "x-stability": "DEPRECATED", + "x-isDateTime": false + }, + "payload": { + "type": "object", + "title": "Payload", + "x-isDateTime": false + }, + "description": { + "type": "string", + "nullable": true, + "title": "The description of the activity, formatted with HTML", + "x-isDateTime": false + }, + "text": { + "type": "string", + "nullable": true, + "title": "The description of the activity, formatted as plain text", + "x-isDateTime": false + }, + "expires_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "The date at which the activity will expire.", + "x-isDateTime": true + }, + "commands": { + "type": "array", + "items": { + "type": "object", + "properties": { + "app": { + "type": "string", + "title": "Application" + }, + "type": { + "type": "string", + "title": "Type" + }, + "exit_code": { + "type": "integer", + "title": "Exit status code" + } + }, + "required": [ + "app", + "type", + "exit_code" + ], + "additionalProperties": false + }, + "title": "Commands", + "x-isDateTime": false + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "type", + "parameters", + "project", + "state", + "result", + "started_at", + "completed_at", + "completion_percent", + "cancelled_at", + "timings", + "log", + "payload", + "description", + "text", + "expires_at", + "commands" + ], + "additionalProperties": false + }, + "ActivityCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Activity" + } + }, + "Backup": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Backup", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "status": { + "type": "string", + "enum": [ + "CREATED", + "DELETING" + ], + "title": "The status of the backup", + "x-isDateTime": false + }, + "expires_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Expiration date of the backup", + "x-isDateTime": true + }, + "index": { + "type": "integer", + "nullable": true, + "title": "The index of this automated backup", + "x-isDateTime": false + }, + "commit_id": { + "type": "string", + "title": "The ID of the code commit attached to the backup", + "x-isDateTime": false + }, + "environment": { + "type": "string", + "title": "The environment the backup belongs to", + "x-isDateTime": false + }, + "safe": { + "type": "boolean", + "title": "Whether this backup was taken in a safe way", + "x-isDateTime": false + }, + "size_of_volumes": { + "type": "integer", + "nullable": true, + "title": "Total size of volumes backed up", + "x-isDateTime": false + }, + "size_used": { + "type": "integer", + "nullable": true, + "title": "Total size of space used on volumes backed up", + "x-isDateTime": false + }, + "deployment": { + "type": "string", + "nullable": true, + "title": "The current deployment at the time of backup.", + "x-isDateTime": false + }, + "restorable": { + "type": "boolean", + "title": "Whether the backup is restorable", + "x-isDateTime": false + }, + "automated": { + "type": "boolean", + "title": "Whether the backup is automated", + "x-isDateTime": false + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "attributes", + "status", + "expires_at", + "index", + "commit_id", + "environment", + "safe", + "size_of_volumes", + "size_used", + "deployment", + "restorable", + "automated" + ], + "additionalProperties": false + }, + "BackupCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Backup" + } + }, + "BitbucketIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of BitbucketIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "app_credentials": { + "type": "object", + "properties": { + "key": { + "type": "string", + "title": "The OAuth consumer key." + } + }, + "required": [ + "key" + ], + "additionalProperties": false, + "nullable": true, + "title": "The OAuth2 consumer information (optional).", + "x-isDateTime": false + }, + "addon_credentials": { + "type": "object", + "properties": { + "addon_key": { + "type": "string", + "title": "The addon key (public identifier)." + }, + "client_key": { + "type": "string", + "title": "The client key (public identifier)." + } + }, + "required": [ + "addon_key", + "client_key" + ], + "additionalProperties": false, + "nullable": true, + "title": "The addon credential information (optional).", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The Bitbucket repository (in the form `user/repo`).", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + }, + "resync_pull_requests": { + "type": "boolean", + "title": "Whether or not pull request environment data should be re-synced on every build.", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "fetch_branches", + "prune_branches", + "environment_init_resources", + "repository", + "build_pull_requests", + "pull_requests_clone_parent_data", + "resync_pull_requests" + ], + "additionalProperties": false + }, + "BitbucketIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "app_credentials": { + "type": "object", + "properties": { + "key": { + "type": "string", + "title": "The OAuth consumer key." + }, + "secret": { + "type": "string", + "title": "The OAuth consumer secret." + } + }, + "required": [ + "key", + "secret" + ], + "additionalProperties": false, + "nullable": true, + "title": "The OAuth2 consumer information (optional).", + "x-isDateTime": false + }, + "addon_credentials": { + "type": "object", + "properties": { + "addon_key": { + "type": "string", + "title": "The addon key (public identifier)." + }, + "client_key": { + "type": "string", + "title": "The client key (public identifier)." + }, + "shared_secret": { + "type": "string", + "title": "The secret of the client." + } + }, + "required": [ + "addon_key", + "client_key", + "shared_secret" + ], + "additionalProperties": false, + "nullable": true, + "title": "The addon credential information (optional).", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The Bitbucket repository (in the form `user/repo`).", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + }, + "resync_pull_requests": { + "type": "boolean", + "title": "Whether or not pull request environment data should be re-synced on every build.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "repository" + ], + "additionalProperties": false + }, + "BitbucketIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "app_credentials": { + "type": "object", + "properties": { + "key": { + "type": "string", + "title": "The OAuth consumer key." + }, + "secret": { + "type": "string", + "title": "The OAuth consumer secret." + } + }, + "required": [ + "key", + "secret" + ], + "additionalProperties": false, + "nullable": true, + "title": "The OAuth2 consumer information (optional).", + "x-isDateTime": false + }, + "addon_credentials": { + "type": "object", + "properties": { + "addon_key": { + "type": "string", + "title": "The addon key (public identifier)." + }, + "client_key": { + "type": "string", + "title": "The client key (public identifier)." + }, + "shared_secret": { + "type": "string", + "title": "The secret of the client." + } + }, + "required": [ + "addon_key", + "client_key", + "shared_secret" + ], + "additionalProperties": false, + "nullable": true, + "title": "The addon credential information (optional).", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The Bitbucket repository (in the form `user/repo`).", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + }, + "resync_pull_requests": { + "type": "boolean", + "title": "Whether or not pull request environment data should be re-synced on every build.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "repository" + ], + "additionalProperties": false + }, + "BitbucketServerIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of BitbucketServerIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The base URL of the Bitbucket Server installation.", + "x-isDateTime": false + }, + "username": { + "type": "string", + "title": "The Bitbucket Server user.", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "The Bitbucket Server project", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The Bitbucket Server repository", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "fetch_branches", + "prune_branches", + "environment_init_resources", + "url", + "username", + "project", + "repository", + "build_pull_requests", + "pull_requests_clone_parent_data" + ], + "additionalProperties": false + }, + "BitbucketServerIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The base URL of the Bitbucket Server installation.", + "x-isDateTime": false + }, + "username": { + "type": "string", + "title": "The Bitbucket Server user.", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The Bitbucket Server personal access token.", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "The Bitbucket Server project", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The Bitbucket Server repository", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url", + "username", + "token", + "project", + "repository" + ], + "additionalProperties": false + }, + "BitbucketServerIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The base URL of the Bitbucket Server installation.", + "x-isDateTime": false + }, + "username": { + "type": "string", + "title": "The Bitbucket Server user.", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The Bitbucket Server personal access token.", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "The Bitbucket Server project", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The Bitbucket Server repository", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url", + "username", + "token", + "project", + "repository" + ], + "additionalProperties": false + }, + "BlackfireIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of BlackfireIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "environments_credentials": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "server_uuid": { + "type": "string", + "title": "Environment server UUID" + }, + "server_token": { + "type": "string", + "title": "Environment server token" + } + }, + "required": [ + "server_uuid", + "server_token" + ], + "additionalProperties": false + }, + "title": "Blackfire environments credentials", + "x-isDateTime": false + }, + "continuous_profiling": { + "type": "boolean", + "title": "Whether continuous profiling is enabled for the project", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "environments_credentials", + "continuous_profiling" + ], + "additionalProperties": false + }, + "BlackfireIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + "BlackfireIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + "Blob": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Blob", + "x-isDateTime": false + }, + "sha": { + "type": "string", + "title": "The identifier of the tag", + "x-isDateTime": false + }, + "size": { + "type": "integer", + "title": "The size of the blob", + "x-isDateTime": false + }, + "encoding": { + "type": "string", + "enum": [ + "base64", + "utf-8" + ], + "title": "The encoding of the contents", + "x-isDateTime": false + }, + "content": { + "type": "string", + "title": "The contents", + "x-isDateTime": false + } + }, + "required": [ + "id", + "sha", + "size", + "encoding", + "content" + ], + "additionalProperties": false + }, + "Certificate": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Certificate", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "certificate": { + "type": "string", + "title": "The PEM-encoded certificate", + "x-isDateTime": false + }, + "chain": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Certificate chain", + "x-isDateTime": false + }, + "is_provisioned": { + "type": "boolean", + "title": "Whether this certificate is automatically provisioned", + "x-isDateTime": false + }, + "is_invalid": { + "type": "boolean", + "title": "Whether this certificate should be skipped during provisioning", + "x-isDateTime": false + }, + "is_root": { + "type": "boolean", + "title": "Whether this certificate is root type", + "x-isDateTime": false + }, + "domains": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The domains covered by this certificate", + "x-isDateTime": false + }, + "auth_type": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The type of authentication the certificate supports", + "x-isDateTime": false + }, + "issuer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oid": { + "type": "string", + "title": "The OID of the attribute" + }, + "alias": { + "type": "string", + "nullable": true, + "title": "The alias of the attribute, if known" + }, + "value": { + "type": "string", + "title": "The value" + } + }, + "required": [ + "oid", + "alias", + "value" + ], + "additionalProperties": false + }, + "title": "The issuer of the certificate", + "x-isDateTime": false + }, + "expires_at": { + "type": "string", + "format": "date-time", + "title": "Expiration date", + "x-isDateTime": true + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "certificate", + "chain", + "is_provisioned", + "is_invalid", + "is_root", + "domains", + "auth_type", + "issuer", + "expires_at" + ], + "additionalProperties": false + }, + "CertificateCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Certificate" + } + }, + "CertificateCreateInput": { + "type": "object", + "properties": { + "certificate": { + "type": "string", + "title": "The PEM-encoded certificate", + "x-isDateTime": false + }, + "key": { + "type": "string", + "title": "The PEM-encoded private key", + "x-isDateTime": false + }, + "chain": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Certificate chain", + "x-isDateTime": false + }, + "is_invalid": { + "type": "boolean", + "title": "Whether this certificate should be skipped during provisioning", + "x-isDateTime": false + } + }, + "required": [ + "certificate", + "key" + ], + "additionalProperties": false + }, + "CertificatePatch": { + "type": "object", + "properties": { + "chain": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Certificate chain", + "x-isDateTime": false + }, + "is_invalid": { + "type": "boolean", + "title": "Whether this certificate should be skipped during provisioning", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "CertificateProvisioner": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of CertificateProvisioner", + "x-isDateTime": false + }, + "directory_url": { + "type": "string", + "title": "ACME directory url", + "x-isDateTime": false + }, + "email": { + "type": "string", + "title": "Contacted email address", + "x-isDateTime": false + }, + "eab_kid": { + "type": "string", + "nullable": true, + "title": "Eab Kid", + "x-isDateTime": false + }, + "eab_hmac_key": { + "type": "string", + "nullable": true, + "title": "Eab Hmac Key", + "x-isDateTime": false + } + }, + "required": [ + "id", + "directory_url", + "email", + "eab_kid", + "eab_hmac_key" + ], + "additionalProperties": false + }, + "CertificateProvisionerCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CertificateProvisioner" + } + }, + "CertificateProvisionerPatch": { + "type": "object", + "properties": { + "directory_url": { + "type": "string", + "title": "ACME directory url", + "x-isDateTime": false + }, + "email": { + "type": "string", + "title": "Contacted email address", + "x-isDateTime": false + }, + "eab_kid": { + "type": "string", + "nullable": true, + "title": "Eab Kid", + "x-isDateTime": false + }, + "eab_hmac_key": { + "type": "string", + "nullable": true, + "title": "Eab Hmac Key", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "Commit": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Commit", + "x-isDateTime": false + }, + "sha": { + "type": "string", + "title": "The identifier of the commit", + "x-isDateTime": false + }, + "author": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time", + "title": "The time of the author or committer" + }, + "name": { + "type": "string", + "title": "The name of the author or committer" + }, + "email": { + "type": "string", + "title": "The email of the author or committer" + } + }, + "required": [ + "date", + "name", + "email" + ], + "additionalProperties": false, + "title": "The information about the author", + "x-isDateTime": false + }, + "committer": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time", + "title": "The time of the author or committer" + }, + "name": { + "type": "string", + "title": "The name of the author or committer" + }, + "email": { + "type": "string", + "title": "The email of the author or committer" + } + }, + "required": [ + "date", + "name", + "email" + ], + "additionalProperties": false, + "title": "The information about the committer", + "x-isDateTime": false + }, + "message": { + "type": "string", + "title": "The commit message", + "x-isDateTime": false + }, + "tree": { + "type": "string", + "title": "The identifier of the tree", + "x-isDateTime": false + }, + "parents": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The identifiers of the parents of the commit", + "x-isDateTime": false + } + }, + "required": [ + "id", + "sha", + "author", + "committer", + "message", + "tree", + "parents" + ], + "additionalProperties": false + }, + "DedicatedDeploymentTarget": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of DedicatedDeploymentTarget", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "deploy_host": { + "type": "string", + "nullable": true, + "title": "The host to deploy to.", + "x-isDateTime": false + }, + "deploy_port": { + "type": "integer", + "nullable": true, + "title": "The port to deploy to.", + "x-isDateTime": false + }, + "ssh_host": { + "type": "string", + "nullable": true, + "title": "The host to use to SSH to app containers.", + "x-isDateTime": false + }, + "hosts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "title": "The identifier of the host." + }, + "type": { + "type": "string", + "enum": [ + "core", + "satellite" + ], + "title": "The type of the deployment to this host." + }, + "services": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "The services assigned to this host" + } + }, + "required": [ + "id", + "type", + "services" + ], + "additionalProperties": false + }, + "nullable": true, + "title": "The hosts of the deployment target.", + "x-isDateTime": false + }, + "auto_mounts": { + "type": "boolean", + "title": "Whether to take application mounts from the pushed data or the deployment target.", + "x-isDateTime": false + }, + "excluded_mounts": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Directories that should not be mounted", + "x-isDateTime": false + }, + "enforced_mounts": { + "type": "object", + "title": "Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount).", + "x-isDateTime": false + }, + "auto_crons": { + "type": "boolean", + "title": "Whether to take application crons from the pushed data or the deployment target.", + "x-isDateTime": false + }, + "auto_nginx": { + "type": "boolean", + "title": "Whether to take application crons from the pushed data or the deployment target.", + "x-isDateTime": false + }, + "maintenance_mode": { + "type": "boolean", + "title": "Whether to perform deployments or not", + "x-isDateTime": false + }, + "guardrails_phase": { + "type": "integer", + "title": "which phase of guardrails are we in", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name", + "deploy_host", + "deploy_port", + "ssh_host", + "hosts", + "auto_mounts", + "excluded_mounts", + "enforced_mounts", + "auto_crons", + "auto_nginx", + "maintenance_mode", + "guardrails_phase" + ], + "additionalProperties": false + }, + "DedicatedDeploymentTargetCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "enforced_mounts": { + "type": "object", + "title": "Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount).", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "DedicatedDeploymentTargetPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "enforced_mounts": { + "type": "object", + "title": "Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount).", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "Deployment": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Deployment", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "fingerprint": { + "type": "string", + "title": "The fingerprint of the deployment", + "x-isDateTime": false + }, + "cluster_name": { + "type": "string", + "title": "The name of the cluster.", + "x-isDateTime": false + }, + "project_info": { + "type": "object", + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "name": { + "type": "string", + "title": "Name" + }, + "namespace": { + "type": "string", + "nullable": true, + "title": "Namespace" + }, + "organization": { + "type": "string", + "nullable": true, + "title": "Organization" + }, + "capabilities": { + "type": "object", + "title": "Capabilities" + }, + "settings": { + "type": "object", + "title": "Settings" + } + }, + "required": [ + "title", + "name", + "namespace", + "organization", + "capabilities", + "settings" + ], + "additionalProperties": false, + "title": "Project Info", + "x-isDateTime": false + }, + "environment_info": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "The machine name of the environment" + }, + "status": { + "type": "string", + "title": "The enviroment status" + }, + "is_main": { + "type": "boolean", + "title": "Is this environment the main environment" + }, + "is_production": { + "type": "boolean", + "title": "Is this environment a production environment" + }, + "constraints": { + "type": "object", + "title": "Constraints of the environment's deployment" + }, + "reference": { + "type": "string", + "title": "The reference in Git for this environment" + }, + "machine_name": { + "type": "string", + "title": "The machine name of the environment" + }, + "environment_type": { + "type": "string", + "title": "The type of environment (Production, Staging or Development)" + }, + "links": { + "type": "object", + "title": "Links" + } + }, + "required": [ + "name", + "status", + "is_main", + "is_production", + "constraints", + "reference", + "machine_name", + "environment_type", + "links" + ], + "additionalProperties": false, + "title": "Environment Info", + "x-isDateTime": false + }, + "deployment_target": { + "type": "string", + "title": "The deployment target.", + "x-isDateTime": false + }, + "vpn": { + "type": "object", + "properties": { + "version": { + "type": "integer", + "enum": [ + 1, + 2 + ], + "title": "The IKE version to use (1 or 2)" + }, + "aggressive": { + "type": "string", + "enum": [ + "no", + "yes" + ], + "title": "Whether to use IKEv1 Aggressive or Main Mode" + }, + "modeconfig": { + "type": "string", + "enum": [ + "pull", + "push" + ], + "title": "Defines which mode is used to assign a virtual IP (must be the same on both sides)" + }, + "authentication": { + "type": "string", + "title": "The authentication scheme" + }, + "gateway_ip": { + "type": "string", + "title": "Remote gateway IP" + }, + "identity": { + "type": "string", + "nullable": true, + "title": "The identity of the ipsec participant" + }, + "second_identity": { + "type": "string", + "nullable": true, + "title": "The second identity of the ipsec participant" + }, + "remote_identity": { + "type": "string", + "nullable": true, + "title": "The identity of the remote ipsec participant" + }, + "remote_subnets": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Remote subnets (CIDR notation)" + }, + "ike": { + "type": "string", + "title": "The IKE algorithms to negotiate for this VPN connection." + }, + "esp": { + "type": "string", + "title": "The ESP algorithms to negotiate for this VPN connection." + }, + "ikelifetime": { + "type": "string", + "title": "The lifetime of the IKE exchange." + }, + "lifetime": { + "type": "string", + "title": "The lifetime of the ESP exchange." + }, + "margintime": { + "type": "string", + "title": "The margin time for re-keying." + } + }, + "required": [ + "version", + "aggressive", + "modeconfig", + "authentication", + "gateway_ip", + "identity", + "second_identity", + "remote_identity", + "remote_subnets", + "ike", + "esp", + "ikelifetime", + "lifetime", + "margintime" + ], + "additionalProperties": false, + "nullable": true, + "title": "VPN configuration", + "x-isDateTime": false + }, + "http_access": { + "type": "object", + "properties": { + "is_enabled": { + "type": "boolean", + "title": "Whether http_access control is enabled" + }, + "addresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "enum": [ + "allow", + "deny" + ], + "title": "Permission" + }, + "address": { + "type": "string", + "title": "IP address or CIDR" + } + }, + "required": [ + "permission", + "address" + ], + "additionalProperties": false + }, + "title": "Address grants" + }, + "basic_auth": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Basic auth grants" + } + }, + "required": [ + "is_enabled", + "addresses", + "basic_auth" + ], + "additionalProperties": false, + "title": "Http access permissions", + "x-isDateTime": false + }, + "enable_smtp": { + "type": "boolean", + "title": "Whether to configure SMTP for this environment.", + "x-isDateTime": false + }, + "restrict_robots": { + "type": "boolean", + "title": "Whether to restrict robots for this environment.", + "x-isDateTime": false + }, + "variables": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name of the variable" + }, + "value": { + "type": "string", + "title": "Value of the variable" + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive" + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string" + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build" + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime" + } + }, + "required": [ + "name", + "is_sensitive", + "is_json", + "visible_build", + "visible_runtime" + ], + "additionalProperties": false + }, + "title": "The variables applying to this environment", + "x-isDateTime": false + }, + "access": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "title": "Entity ID" + }, + "role": { + "type": "string", + "enum": [ + "admin", + "contributor", + "viewer" + ], + "title": "Role" + } + }, + "required": [ + "entity_id", + "role" + ], + "additionalProperties": false + }, + "title": "Access control definition for this enviroment", + "x-isDateTime": false + }, + "subscription": { + "type": "object", + "properties": { + "license_uri": { + "type": "string", + "title": "URI of the subscription" + }, + "plan": { + "type": "string", + "enum": [ + "2xlarge", + "2xlarge-high-memory", + "4xlarge", + "8xlarge", + "development", + "large", + "large-high-memory", + "medium", + "medium-high-memory", + "standard", + "standard-high-memory", + "xlarge", + "xlarge-high-memory" + ], + "title": "Plan level" + }, + "environments": { + "type": "integer", + "title": "Number of environments" + }, + "storage": { + "type": "integer", + "title": "Size of storage (in MB)" + }, + "included_users": { + "type": "integer", + "title": "Number of users" + }, + "subscription_management_uri": { + "type": "string", + "title": "URI for managing the subscription" + }, + "restricted": { + "type": "boolean", + "title": "True if subscription attributes, like number of users, are frozen" + }, + "suspended": { + "type": "boolean", + "title": "Whether or not the subscription is suspended" + }, + "user_licenses": { + "type": "integer", + "title": "Current number of users" + }, + "resources": { + "type": "object", + "properties": { + "container_profiles": { + "type": "boolean", + "title": "Enable support for customizable container profiles." + }, + "production": { + "type": "object", + "properties": { + "legacy_development": { + "type": "boolean", + "title": "Enable legacy development sizing for this environment type." + }, + "max_cpu": { + "type": "number", + "format": "float", + "nullable": true, + "title": "Maximum number of allocated CPU units." + }, + "max_memory": { + "type": "integer", + "nullable": true, + "title": "Maximum amount of allocated RAM." + }, + "max_environments": { + "type": "integer", + "nullable": true, + "title": "Maximum number of environments" + } + }, + "required": [ + "legacy_development", + "max_cpu", + "max_memory", + "max_environments" + ], + "additionalProperties": false, + "title": "Resources for production environments" + }, + "development": { + "type": "object", + "properties": { + "legacy_development": { + "type": "boolean", + "title": "Enable legacy development sizing for this environment type." + }, + "max_cpu": { + "type": "number", + "format": "float", + "nullable": true, + "title": "Maximum number of allocated CPU units." + }, + "max_memory": { + "type": "integer", + "nullable": true, + "title": "Maximum amount of allocated RAM." + }, + "max_environments": { + "type": "integer", + "nullable": true, + "title": "Maximum number of environments" + } + }, + "required": [ + "legacy_development", + "max_cpu", + "max_memory", + "max_environments" + ], + "additionalProperties": false, + "title": "Resources for development environments" + } + }, + "required": [ + "container_profiles", + "production", + "development" + ], + "additionalProperties": false, + "title": "Resources limits" + }, + "resource_validation_url": { + "type": "string", + "title": "URL for resources validation" + }, + "image_types": { + "type": "object", + "properties": { + "only": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Image types to be allowed use." + }, + "exclude": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Image types to be denied use." + } + }, + "additionalProperties": false, + "title": "Restricted and denied image types" + } + }, + "required": [ + "license_uri", + "storage", + "included_users", + "subscription_management_uri", + "restricted", + "suspended", + "user_licenses" + ], + "additionalProperties": false, + "title": "Subscription", + "x-isDateTime": false + }, + "services": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "The service type." + }, + "size": { + "type": "string", + "enum": [ + "2XL", + "4XL", + "AUTO", + "L", + "M", + "S", + "XL" + ], + "title": "The service size." + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The size of the disk." + }, + "access": { + "type": "object", + "title": "The configuration of the service." + }, + "configuration": { + "type": "object", + "title": "The configuration of the service." + }, + "relationships": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "The relationships of the service to other services." + }, + "firewall": { + "type": "object", + "properties": { + "outbound": { + "type": "array", + "items": { + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "tcp" + ], + "title": "The IP protocol to apply the restriction on." + }, + "ips": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The IP range in CIDR notation to apply the restriction on." + }, + "domains": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Domains of the restriction." + }, + "ports": { + "type": "array", + "items": { + "type": "integer" + }, + "title": "The port to apply the restriction on." + } + }, + "required": [ + "protocol", + "ips", + "domains", + "ports" + ], + "additionalProperties": false + }, + "title": "Outbound firewall restrictions" + } + }, + "required": [ + "outbound" + ], + "additionalProperties": false, + "nullable": true, + "title": "Firewall" + }, + "resources": { + "type": "object", + "properties": { + "base_memory": { + "type": "integer", + "nullable": true, + "title": "The base memory for the container" + }, + "memory_ratio": { + "type": "integer", + "nullable": true, + "title": "The amount of memory to allocate per units of CPU" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "Selected size from container profile" + }, + "minimum": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk size in MB" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "The closest profile size that matches the resources" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type", + "disk", + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "The minimum resources for this service" + }, + "default": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk size in MB" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "The closest profile size that matches the resources" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type", + "disk", + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "The default resources for this service" + }, + "disk": { + "type": "object", + "properties": { + "temporary": { + "type": "integer", + "nullable": true, + "title": "Temporary" + }, + "instance": { + "type": "integer", + "nullable": true, + "title": "Instance" + }, + "storage": { + "type": "integer", + "nullable": true, + "title": "Storage" + } + }, + "required": [ + "temporary", + "instance", + "storage" + ], + "additionalProperties": false, + "nullable": true, + "title": "The disks resources" + } + }, + "required": [ + "base_memory", + "memory_ratio", + "profile_size", + "minimum", + "default", + "disk" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources" + }, + "container_profile": { + "type": "string", + "nullable": true, + "title": "Selected container profile for the service" + }, + "endpoints": { + "type": "object", + "nullable": true, + "title": "Endpoints" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "title": "Instance replication count of this service" + } + }, + "required": [ + "type", + "size", + "disk", + "access", + "configuration", + "relationships", + "firewall", + "resources", + "container_profile", + "endpoints", + "instance_count" + ], + "additionalProperties": false + }, + "title": "Services", + "x-isDateTime": false + }, + "routes": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/ProxyRoute" + }, + { + "$ref": "#/components/schemas/RedirectRoute" + }, + { + "$ref": "#/components/schemas/UpstreamRoute" + } + ] + }, + "title": "Routes", + "x-isDateTime": false + }, + "webapps": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "base_memory": { + "type": "integer", + "nullable": true, + "title": "The base memory for the container" + }, + "memory_ratio": { + "type": "integer", + "nullable": true, + "title": "The amount of memory to allocate per units of CPU" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "Selected size from container profile" + }, + "minimum": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk size in MB" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "The closest profile size that matches the resources" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type", + "disk", + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "The minimum resources for this service" + }, + "default": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk size in MB" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "The closest profile size that matches the resources" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type", + "disk", + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "The default resources for this service" + }, + "disk": { + "type": "object", + "properties": { + "temporary": { + "type": "integer", + "nullable": true, + "title": "Temporary" + }, + "instance": { + "type": "integer", + "nullable": true, + "title": "Instance" + }, + "storage": { + "type": "integer", + "nullable": true, + "title": "Storage" + } + }, + "required": [ + "temporary", + "instance", + "storage" + ], + "additionalProperties": false, + "nullable": true, + "title": "The disks resources" + } + }, + "required": [ + "base_memory", + "memory_ratio", + "profile_size", + "minimum", + "default", + "disk" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources" + }, + "size": { + "type": "string", + "enum": [ + "2XL", + "4XL", + "AUTO", + "L", + "M", + "S", + "XL", + "XS" + ], + "title": "The container size for this application in production. Leave blank to allow it to be set dynamically." + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The size of the disk." + }, + "access": { + "type": "object", + "additionalProperties": { + "type": "string", + "enum": [ + "admin", + "contributor", + "viewer" + ] + }, + "title": "Access information, a mapping between access type and roles." + }, + "relationships": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "service": { + "type": "string", + "nullable": true, + "title": "The name of the service." + }, + "endpoint": { + "type": "string", + "nullable": true, + "title": "The name of the endpoint on the service." + } + }, + "required": [ + "service", + "endpoint" + ], + "additionalProperties": false, + "nullable": true + }, + "title": "The relationships of the application to defined services." + }, + "additional_hosts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "A mapping of hostname to ip address to be added to the container's hosts file" + }, + "mounts": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "instance", + "local", + "service", + "storage", + "temporary", + "tmp" + ], + "title": "The type of mount that will provide the data." + }, + "source_path": { + "type": "string", + "title": "The path to be mounted, relative to the root directory of the volume that's being mounted from." + }, + "service": { + "type": "string", + "nullable": true, + "title": "The name of the service that the volume will be mounted from. Must be a service in `services.yaml` of type `network-storage`." + } + }, + "required": [ + "source", + "source_path" + ], + "additionalProperties": false + }, + "title": "Filesystem mounts of this application. If not specified the application will have no writeable disk space." + }, + "timezone": { + "type": "string", + "nullable": true, + "title": "The timezone of the application. This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified." + }, + "variables": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": {} + }, + "title": "Variables provide environment-sensitive information to control how your application behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment." + }, + "firewall": { + "type": "object", + "properties": { + "outbound": { + "type": "array", + "items": { + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "tcp" + ], + "title": "The IP protocol to apply the restriction on." + }, + "ips": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The IP range in CIDR notation to apply the restriction on." + }, + "domains": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Domains of the restriction." + }, + "ports": { + "type": "array", + "items": { + "type": "integer" + }, + "title": "The port to apply the restriction on." + } + }, + "required": [ + "protocol", + "ips", + "domains", + "ports" + ], + "additionalProperties": false + }, + "title": "Outbound firewall restrictions" + } + }, + "required": [ + "outbound" + ], + "additionalProperties": false, + "nullable": true, + "title": "Firewall" + }, + "container_profile": { + "type": "string", + "nullable": true, + "title": "Selected container profile for the application" + }, + "operations": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "commands": { + "type": "object", + "properties": { + "start": { + "type": "string", + "title": "The command used to start the operation." + }, + "stop": { + "type": "string", + "nullable": true, + "title": "The command used to stop the operation." + } + }, + "required": [ + "start" + ], + "additionalProperties": false, + "title": "The commands definition." + }, + "timeout": { + "type": "integer", + "nullable": true, + "title": "The maximum timeout in seconds after which the operation will be forcefully killed." + }, + "role": { + "type": "string", + "enum": [ + "admin", + "contributor", + "viewer" + ], + "title": "The minimum role necessary to trigger this operation." + } + }, + "required": [ + "commands", + "timeout", + "role" + ], + "additionalProperties": false + }, + "title": "Operations that can be triggered on this application" + }, + "name": { + "type": "string", + "title": "The name of the application. Must be unique within a project." + }, + "type": { + "type": "string", + "title": "The base runtime and version to use for this worker." + }, + "preflight": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether the preflight security blocks are enabled." + }, + "ignored_rules": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Specific rules to ignore during preflight security checks. See the documentation for options." + } + }, + "required": [ + "enabled", + "ignored_rules" + ], + "additionalProperties": false, + "title": "Configuration for pre-flight checks." + }, + "tree_id": { + "type": "string", + "title": "The identifier of the source tree of the application" + }, + "app_dir": { + "type": "string", + "title": "The path of the application in the container" + }, + "endpoints": { + "type": "object", + "nullable": true, + "title": "Endpoints" + }, + "runtime": { + "type": "object", + "title": "Runtime-specific configuration." + }, + "web": { + "type": "object", + "properties": { + "locations": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "root": { + "type": "string", + "nullable": true, + "title": "The folder from which to serve static assets for this location relative to the application root." + }, + "expires": { + "type": "string", + "title": "Amount of time to cache static assets." + }, + "passthru": { + "type": "string", + "title": "Whether to forward disallowed and missing resources from this location to the application. On PHP, set to the PHP front controller script, as a URL fragment. Otherwise set to `true`/`false`." + }, + "scripts": { + "type": "boolean", + "title": "Whether to execute scripts in this location (for script based runtimes)." + }, + "index": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "Files to look for to serve directories." + }, + "allow": { + "type": "boolean", + "title": "Whether to allow access to this location by default." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "A set of header fields set to the HTTP response. Applies only to static files, not responses from the application." + }, + "rules": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "expires": { + "type": "string", + "nullable": true, + "title": "Amount of time to cache static assets." + }, + "passthru": { + "type": "string", + "title": "Whether to forward disallowed and missing resources from this location to the application. On PHP, set to the PHP front controller script, as a URL fragment. Otherwise set to `true`/`false`." + }, + "scripts": { + "type": "boolean", + "title": "Whether to execute scripts in this location (for script based runtimes)." + }, + "allow": { + "type": "boolean", + "title": "Whether to allow access to this location by default." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "A set of header fields set to the HTTP response. Replaces headers set on the location block." + } + }, + "additionalProperties": false + }, + "title": "Specific overrides." + }, + "request_buffering": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enable request buffering." + }, + "max_request_size": { + "type": "string", + "nullable": true, + "title": "The maximum size request that can be buffered. Supports K, M, and G suffixes." + } + }, + "required": [ + "enabled", + "max_request_size" + ], + "additionalProperties": false, + "title": "Configuration for supporting request buffering." + } + }, + "required": [ + "root", + "expires", + "passthru", + "scripts", + "allow", + "headers", + "rules" + ], + "additionalProperties": false + }, + "title": "The specification of the web locations served by this application." + }, + "commands": { + "type": "object", + "properties": { + "pre_start": { + "type": "string", + "nullable": true, + "title": "A command executed before the application is started" + }, + "start": { + "type": "string", + "nullable": true, + "title": "The command used to start the application. It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP." + }, + "post_start": { + "type": "string", + "nullable": true, + "title": "A command executed after the application is started" + } + }, + "additionalProperties": false, + "title": "Commands to manage the application's lifecycle." + }, + "upstream": { + "type": "object", + "properties": { + "socket_family": { + "type": "string", + "enum": [ + "tcp", + "unix" + ], + "title": "If `tcp`, check the PORT environment variable on application startup. If `unix`, check SOCKET." + }, + "protocol": { + "type": "string", + "enum": [ + "fastcgi", + "http" + ], + "nullable": true, + "title": "Protocol" + } + }, + "required": [ + "socket_family", + "protocol" + ], + "additionalProperties": false, + "title": "Configuration on how the web server communicates with the application." + }, + "document_root": { + "type": "string", + "nullable": true, + "title": "The document root of this application, relative to its root." + }, + "passthru": { + "type": "string", + "nullable": true, + "title": "The URL to use as a passthru if a file doesn't match the whitelist." + }, + "index_files": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "Files to look for to serve directories." + }, + "whitelist": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "Whitelisted entries." + }, + "blacklist": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "Blacklisted entries." + }, + "expires": { + "type": "string", + "nullable": true, + "title": "Amount of time to cache static assets." + }, + "move_to_root": { + "type": "boolean", + "title": "Whether to move the whole root of the app to the document root." + } + }, + "required": [ + "locations", + "move_to_root" + ], + "additionalProperties": false, + "title": "Configuration for accessing this application via HTTP." + }, + "hooks": { + "type": "object", + "properties": { + "build": { + "type": "string", + "nullable": true, + "title": "Hook executed after the build process." + }, + "deploy": { + "type": "string", + "nullable": true, + "title": "Hook executed after the deployment of new code." + }, + "post_deploy": { + "type": "string", + "nullable": true, + "title": "Hook executed after an environment is fully deployed." + } + }, + "required": [ + "build", + "deploy", + "post_deploy" + ], + "additionalProperties": false, + "title": "Hooks executed at various point in the lifecycle of the application." + }, + "crons": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "spec": { + "type": "string", + "title": "The cron schedule specification." + }, + "commands": { + "type": "object", + "properties": { + "start": { + "type": "string", + "title": "The command used to start the operation." + }, + "stop": { + "type": "string", + "nullable": true, + "title": "The command used to stop the operation." + } + }, + "required": [ + "start" + ], + "additionalProperties": false, + "title": "The commands definition." + }, + "shutdown_timeout": { + "type": "integer", + "nullable": true, + "title": "The timeout in seconds after which the cron job will be forcefully killed." + }, + "timeout": { + "type": "integer", + "title": "The maximum timeout in seconds after which the cron job will be forcefully killed." + }, + "cmd": { + "type": "string", + "title": "The command to execute." + } + }, + "required": [ + "spec", + "commands", + "timeout" + ], + "additionalProperties": false + }, + "title": "Scheduled cron tasks executed by this application." + }, + "source": { + "type": "object", + "properties": { + "root": { + "type": "string", + "nullable": true, + "title": "The root of the application relative to the repository root." + }, + "operations": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "command": { + "type": "string", + "nullable": true, + "title": "The command to use to update this application." + } + }, + "required": [ + "command" + ], + "additionalProperties": false + }, + "title": "Operations that can be applied to the source code." + } + }, + "required": [ + "root", + "operations" + ], + "additionalProperties": false, + "title": "Configuration related to the source code of the application." + }, + "build": { + "type": "object", + "properties": { + "flavor": { + "type": "string", + "nullable": true, + "title": "The pre-set build tasks to use for this application." + }, + "caches": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "directory": { + "type": "string", + "nullable": true, + "title": "The directory, relative to the application root, that should be cached." + }, + "watch": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The file or files whose hashed contents should be considered part of the cache key." + }, + "allow_stale": { + "type": "boolean", + "title": "If true, on a cache miss the last cache version will be used and can be updated in place." + }, + "share_between_apps": { + "type": "boolean", + "title": "Whether multiple applications in the project should share cached directories." + } + }, + "required": [ + "directory", + "watch", + "allow_stale", + "share_between_apps" + ], + "additionalProperties": false + }, + "title": "The configuration of paths managed by the build cache." + } + }, + "required": [ + "flavor", + "caches" + ], + "additionalProperties": false, + "title": "The build configuration of the application." + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "type": "object" + }, + "title": "External global dependencies of this application. They will be downloaded by the language's package manager." + }, + "stack": { + "type": "array", + "items": { + "type": "object" + }, + "nullable": true, + "title": "Composable images" + }, + "is_across_submodule": { + "type": "boolean", + "title": "Is this application coming from a submodule" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "title": "Instance replication count of this application" + }, + "config_id": { + "type": "string", + "title": "Config Id" + }, + "slug_id": { + "type": "string", + "title": "The identifier of the built artifact of the application" + } + }, + "required": [ + "resources", + "size", + "disk", + "access", + "relationships", + "additional_hosts", + "mounts", + "timezone", + "variables", + "firewall", + "container_profile", + "operations", + "name", + "type", + "preflight", + "tree_id", + "app_dir", + "endpoints", + "runtime", + "web", + "hooks", + "crons", + "source", + "build", + "dependencies", + "stack", + "is_across_submodule", + "instance_count", + "config_id", + "slug_id" + ], + "additionalProperties": false + }, + "title": "Web applications", + "x-isDateTime": false + }, + "workers": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "base_memory": { + "type": "integer", + "nullable": true, + "title": "The base memory for the container" + }, + "memory_ratio": { + "type": "integer", + "nullable": true, + "title": "The amount of memory to allocate per units of CPU" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "Selected size from container profile" + }, + "minimum": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk size in MB" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "The closest profile size that matches the resources" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type", + "disk", + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "The minimum resources for this service" + }, + "default": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk size in MB" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "The closest profile size that matches the resources" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type", + "disk", + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "The default resources for this service" + }, + "disk": { + "type": "object", + "properties": { + "temporary": { + "type": "integer", + "nullable": true, + "title": "Temporary" + }, + "instance": { + "type": "integer", + "nullable": true, + "title": "Instance" + }, + "storage": { + "type": "integer", + "nullable": true, + "title": "Storage" + } + }, + "required": [ + "temporary", + "instance", + "storage" + ], + "additionalProperties": false, + "nullable": true, + "title": "The disks resources" + } + }, + "required": [ + "base_memory", + "memory_ratio", + "profile_size", + "minimum", + "default", + "disk" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources" + }, + "size": { + "type": "string", + "enum": [ + "2XL", + "4XL", + "AUTO", + "L", + "M", + "S", + "XL", + "XS" + ], + "title": "The container size for this application in production. Leave blank to allow it to be set dynamically." + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The writeable disk size to reserve on this application container." + }, + "access": { + "type": "object", + "additionalProperties": { + "type": "string", + "enum": [ + "admin", + "contributor", + "viewer" + ] + }, + "title": "Access information, a mapping between access type and roles." + }, + "relationships": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "service": { + "type": "string", + "nullable": true, + "title": "The name of the service." + }, + "endpoint": { + "type": "string", + "nullable": true, + "title": "The name of the endpoint on the service." + } + }, + "required": [ + "service", + "endpoint" + ], + "additionalProperties": false, + "nullable": true + }, + "title": "The relationships of the application to defined services." + }, + "additional_hosts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "A mapping of hostname to ip address to be added to the container's hosts file" + }, + "mounts": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "instance", + "local", + "service", + "storage", + "temporary", + "tmp" + ], + "title": "The type of mount that will provide the data." + }, + "source_path": { + "type": "string", + "title": "The path to be mounted, relative to the root directory of the volume that's being mounted from." + }, + "service": { + "type": "string", + "nullable": true, + "title": "The name of the service that the volume will be mounted from. Must be a service in `services.yaml` of type `network-storage`." + } + }, + "required": [ + "source", + "source_path" + ], + "additionalProperties": false + }, + "title": "Filesystem mounts of this application. If not specified the application will have no writeable disk space." + }, + "timezone": { + "type": "string", + "nullable": true, + "title": "The timezone of the application. This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified." + }, + "variables": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": {} + }, + "title": "Variables provide environment-sensitive information to control how your application behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment." + }, + "firewall": { + "type": "object", + "properties": { + "outbound": { + "type": "array", + "items": { + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "tcp" + ], + "title": "The IP protocol to apply the restriction on." + }, + "ips": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The IP range in CIDR notation to apply the restriction on." + }, + "domains": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Domains of the restriction." + }, + "ports": { + "type": "array", + "items": { + "type": "integer" + }, + "title": "The port to apply the restriction on." + } + }, + "required": [ + "protocol", + "ips", + "domains", + "ports" + ], + "additionalProperties": false + }, + "title": "Outbound firewall restrictions" + } + }, + "required": [ + "outbound" + ], + "additionalProperties": false, + "nullable": true, + "title": "Firewall" + }, + "container_profile": { + "type": "string", + "nullable": true, + "title": "Selected container profile for the application" + }, + "operations": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "commands": { + "type": "object", + "properties": { + "start": { + "type": "string", + "title": "The command used to start the operation." + }, + "stop": { + "type": "string", + "nullable": true, + "title": "The command used to stop the operation." + } + }, + "required": [ + "start" + ], + "additionalProperties": false, + "title": "The commands definition." + }, + "timeout": { + "type": "integer", + "nullable": true, + "title": "The maximum timeout in seconds after which the operation will be forcefully killed." + }, + "role": { + "type": "string", + "enum": [ + "admin", + "contributor", + "viewer" + ], + "title": "The minimum role necessary to trigger this operation." + } + }, + "required": [ + "commands", + "timeout", + "role" + ], + "additionalProperties": false + }, + "title": "Operations that can be triggered on this application" + }, + "name": { + "type": "string", + "title": "The name of the worker." + }, + "type": { + "type": "string", + "title": "The base runtime and version to use for this worker." + }, + "preflight": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether the preflight security blocks are enabled." + }, + "ignored_rules": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Specific rules to ignore during preflight security checks. See the documentation for options." + } + }, + "required": [ + "enabled", + "ignored_rules" + ], + "additionalProperties": false, + "title": "Configuration for pre-flight checks." + }, + "tree_id": { + "type": "string", + "title": "The identifier of the source tree of the application" + }, + "app_dir": { + "type": "string", + "title": "The path of the application in the container" + }, + "endpoints": { + "type": "object", + "nullable": true, + "title": "Endpoints" + }, + "runtime": { + "type": "object", + "title": "Runtime-specific configuration." + }, + "worker": { + "type": "object", + "properties": { + "commands": { + "type": "object", + "properties": { + "pre_start": { + "type": "string", + "nullable": true, + "title": "A command executed before the worker is started" + }, + "start": { + "type": "string", + "title": "The command used to start the worker." + }, + "post_start": { + "type": "string", + "nullable": true, + "title": "A command executed after the worker is started" + } + }, + "required": [ + "start" + ], + "additionalProperties": false, + "title": "The commands to manage the worker." + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The writeable disk size to reserve on this application container." + } + }, + "required": [ + "commands" + ], + "additionalProperties": false, + "title": "Configuration of a worker container instance." + }, + "app": { + "type": "string", + "title": "App" + }, + "stack": { + "type": "array", + "items": { + "type": "object" + }, + "nullable": true, + "title": "Composable images" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "title": "Instance replication count of this worker" + }, + "slug_id": { + "type": "string", + "title": "The identifier of the built artifact of the application" + } + }, + "required": [ + "resources", + "size", + "disk", + "access", + "relationships", + "additional_hosts", + "mounts", + "timezone", + "variables", + "firewall", + "container_profile", + "operations", + "name", + "type", + "preflight", + "tree_id", + "app_dir", + "endpoints", + "runtime", + "worker", + "app", + "stack", + "instance_count", + "slug_id" + ], + "additionalProperties": false + }, + "title": "Workers", + "x-isDateTime": false + }, + "container_profiles": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type" + ], + "additionalProperties": false + } + }, + "title": "Container profiles", + "x-isDateTime": false + } + }, + "required": [ + "id", + "cluster_name", + "project_info", + "environment_info", + "deployment_target", + "vpn", + "http_access", + "enable_smtp", + "restrict_robots", + "variables", + "access", + "subscription", + "services", + "routes", + "webapps", + "workers", + "container_profiles" + ], + "additionalProperties": false + }, + "DeploymentCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Deployment" + } + }, + "DeploymentTarget": { + "oneOf": [ + { + "$ref": "#/components/schemas/DedicatedDeploymentTarget" + }, + { + "$ref": "#/components/schemas/EnterpriseDeploymentTarget" + }, + { + "$ref": "#/components/schemas/FoundationDeploymentTarget" + } + ] + }, + "DeploymentTargetCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeploymentTarget" + } + }, + "DeploymentTargetCreateInput": { + "oneOf": [ + { + "$ref": "#/components/schemas/DedicatedDeploymentTargetCreateInput" + }, + { + "$ref": "#/components/schemas/EnterpriseDeploymentTargetCreateInput" + }, + { + "$ref": "#/components/schemas/FoundationDeploymentTargetCreateInput" + } + ] + }, + "DeploymentTargetPatch": { + "oneOf": [ + { + "$ref": "#/components/schemas/DedicatedDeploymentTargetPatch" + }, + { + "$ref": "#/components/schemas/EnterpriseDeploymentTargetPatch" + }, + { + "$ref": "#/components/schemas/FoundationDeploymentTargetPatch" + } + ] + }, + "Domain": { + "oneOf": [ + { + "$ref": "#/components/schemas/ProdDomainStorage" + }, + { + "$ref": "#/components/schemas/ReplacementDomainStorage" + } + ] + }, + "DomainCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Domain" + } + }, + "DomainCreateInput": { + "oneOf": [ + { + "$ref": "#/components/schemas/ProdDomainStorageCreateInput" + }, + { + "$ref": "#/components/schemas/ReplacementDomainStorageCreateInput" + } + ] + }, + "DomainPatch": { + "oneOf": [ + { + "$ref": "#/components/schemas/ProdDomainStoragePatch" + }, + { + "$ref": "#/components/schemas/ReplacementDomainStoragePatch" + } + ] + }, + "EmailIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of EmailIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "from_address": { + "type": "string", + "nullable": true, + "title": "The email address to use", + "x-isDateTime": false + }, + "recipients": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Recipients of the email", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "from_address", + "recipients" + ], + "additionalProperties": false + }, + "EmailIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "from_address": { + "type": "string", + "nullable": true, + "title": "The email address to use", + "x-isDateTime": false + }, + "recipients": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Recipients of the email", + "x-isDateTime": false + } + }, + "required": [ + "type", + "recipients" + ], + "additionalProperties": false + }, + "EmailIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "from_address": { + "type": "string", + "nullable": true, + "title": "The email address to use", + "x-isDateTime": false + }, + "recipients": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Recipients of the email", + "x-isDateTime": false + } + }, + "required": [ + "type", + "recipients" + ], + "additionalProperties": false + }, + "EnterpriseDeploymentTarget": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of EnterpriseDeploymentTarget", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "deploy_host": { + "type": "string", + "nullable": true, + "title": "The host to deploy to.", + "x-isDateTime": false + }, + "docroots": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "active_docroot": { + "type": "string", + "nullable": true, + "title": "The enterprise docroot, that is associated with this application/cluster." + }, + "docroot_versions": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "Versions of the enterprise docroot. When a new environment version is created the active_docroot is updated from these values." + } + }, + "required": [ + "active_docroot", + "docroot_versions" + ], + "additionalProperties": false + }, + "title": "Mapping of clusters to Enterprise applications", + "x-isDateTime": false + }, + "site_urls": { + "type": "object", + "title": "Site URLs", + "x-isDateTime": false + }, + "ssh_hosts": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of SSH Hosts.", + "x-isDateTime": false + }, + "maintenance_mode": { + "type": "boolean", + "title": "Whether to perform deployments or not", + "x-isDateTime": false + }, + "enterprise_environments_mapping": { + "type": "object", + "title": "Mapping of clusters to Enterprise applications", + "deprecated": true, + "x-stability": "DEPRECATED", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name", + "deploy_host", + "docroots", + "site_urls", + "ssh_hosts", + "maintenance_mode" + ], + "additionalProperties": false + }, + "EnterpriseDeploymentTargetCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "site_urls": { + "type": "object", + "title": "Site URLs", + "x-isDateTime": false + }, + "ssh_hosts": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of SSH Hosts.", + "x-isDateTime": false + }, + "enterprise_environments_mapping": { + "type": "object", + "title": "Mapping of clusters to Enterprise applications", + "deprecated": true, + "x-stability": "DEPRECATED", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "EnterpriseDeploymentTargetPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "site_urls": { + "type": "object", + "title": "Site URLs", + "x-isDateTime": false + }, + "ssh_hosts": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of SSH Hosts.", + "x-isDateTime": false + }, + "enterprise_environments_mapping": { + "type": "object", + "title": "Mapping of clusters to Enterprise applications", + "deprecated": true, + "x-stability": "DEPRECATED", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "Environment": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Environment", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "machine_name": { + "type": "string", + "title": "Machine name", + "x-isDateTime": false + }, + "title": { + "type": "string", + "title": "Title", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "development", + "production", + "staging" + ], + "title": "The type of environment (`production`, `staging` or `development`). If not provided, a default will be calculated.", + "x-isDateTime": false + }, + "parent": { + "type": "string", + "nullable": true, + "title": "Parent environment", + "x-isDateTime": false + }, + "default_domain": { + "type": "string", + "nullable": true, + "title": "Default domain", + "x-isDateTime": false + }, + "has_domains": { + "type": "boolean", + "title": "Whether the environment has domains", + "x-isDateTime": false + }, + "clone_parent_on_create": { + "type": "boolean", + "title": "Clone data when creating that environment", + "x-isDateTime": false + }, + "deployment_target": { + "type": "string", + "nullable": true, + "title": "Deployment target of the environment", + "x-isDateTime": false + }, + "is_pr": { + "type": "boolean", + "title": "Is this environment a pull request / merge request", + "x-isDateTime": false + }, + "has_remote": { + "type": "boolean", + "title": "Does this environment have a remote repository", + "x-isDateTime": false + }, + "status": { + "type": "string", + "enum": [ + "active", + "deleting", + "dirty", + "inactive", + "paused" + ], + "title": "Status", + "x-isDateTime": false + }, + "http_access": { + "type": "object", + "properties": { + "is_enabled": { + "type": "boolean", + "title": "Whether http_access control is enabled" + }, + "addresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "enum": [ + "allow", + "deny" + ], + "title": "Permission" + }, + "address": { + "type": "string", + "title": "IP address or CIDR" + } + }, + "required": [ + "permission", + "address" + ], + "additionalProperties": false + }, + "title": "Address grants" + }, + "basic_auth": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Basic auth grants" + } + }, + "required": [ + "is_enabled", + "addresses", + "basic_auth" + ], + "additionalProperties": false, + "title": "Http access permissions", + "x-isDateTime": false + }, + "enable_smtp": { + "type": "boolean", + "title": "Whether to configure SMTP for this environment.", + "x-isDateTime": false + }, + "restrict_robots": { + "type": "boolean", + "title": "Whether to restrict robots for this environment.", + "x-isDateTime": false + }, + "edge_hostname": { + "type": "string", + "title": "The hostname to use as the CNAME.", + "x-isDateTime": false + }, + "deployment_state": { + "type": "object", + "properties": { + "last_deployment_successful": { + "type": "boolean", + "title": "Whether the last deployment was successful" + }, + "last_deployment_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Datetime of the last deployment" + }, + "last_autoscale_up_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Datetime of the last autoscale up deployment" + }, + "last_autoscale_down_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Datetime of the last autoscale down deployment" + }, + "crons": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled or disabled" + }, + "status": { + "type": "string", + "enum": [ + "paused", + "running", + "sleeping" + ], + "title": "The status of the crons" + } + }, + "required": [ + "enabled", + "status" + ], + "additionalProperties": false, + "title": "The crons deployment state" + } + }, + "required": [ + "last_deployment_successful", + "last_deployment_at", + "last_autoscale_up_at", + "last_autoscale_down_at", + "crons" + ], + "additionalProperties": false, + "nullable": true, + "title": "The environment deployment state", + "x-isDateTime": false + }, + "sizing": { + "type": "object", + "properties": { + "services": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "profile_size": { + "type": "string", + "nullable": true, + "title": "Profile size of the service." + } + }, + "required": [ + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "title": "Instance replication count of this application" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The size of the disk." + } + }, + "required": [ + "resources", + "instance_count", + "disk" + ], + "additionalProperties": false + }, + "title": "Services" + }, + "webapps": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "profile_size": { + "type": "string", + "nullable": true, + "title": "Profile size of the service." + } + }, + "required": [ + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "title": "Instance replication count of this application" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The size of the disk." + } + }, + "required": [ + "resources", + "instance_count", + "disk" + ], + "additionalProperties": false + }, + "title": "Web applications" + }, + "workers": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "profile_size": { + "type": "string", + "nullable": true, + "title": "Profile size of the service." + } + }, + "required": [ + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "title": "Instance replication count of this application" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The size of the disk." + } + }, + "required": [ + "resources", + "instance_count", + "disk" + ], + "additionalProperties": false + }, + "title": "Workers" + } + }, + "required": [ + "services", + "webapps", + "workers" + ], + "additionalProperties": false, + "nullable": true, + "title": "The environment sizing configuration", + "x-isDateTime": false + }, + "resources_overrides": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "services": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "nullable": true, + "title": "CPU" + }, + "memory": { + "type": "integer", + "nullable": true, + "title": "Memory" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk" + } + }, + "required": [ + "cpu", + "memory", + "disk" + ], + "additionalProperties": false + }, + "title": "Per-service resources overrides." + }, + "starts_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Date when the override will apply. When null, don't do an auto redeployment but still be effective to redeploys initiated otherwise." + }, + "ends_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Date when the override will be reverted. When null, the overrides will never go out of effect." + }, + "redeployed_start": { + "type": "boolean", + "title": "Whether the starting redeploy activity has been fired for this override." + }, + "redeployed_end": { + "type": "boolean", + "title": "Whether the ending redeploy activity has been fired for this override." + } + }, + "required": [ + "services", + "starts_at", + "ends_at", + "redeployed_start", + "redeployed_end" + ], + "additionalProperties": false + }, + "title": "Resources overrides", + "x-isDateTime": false + }, + "max_instance_count": { + "type": "integer", + "nullable": true, + "title": "Max number of instances for this environment.", + "x-isDateTime": false + }, + "last_active_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Last activity date", + "x-isDateTime": true + }, + "last_backup_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Last backup date", + "x-isDateTime": true + }, + "project": { + "type": "string", + "title": "Project", + "x-isDateTime": false + }, + "is_main": { + "type": "boolean", + "title": "Is this environment the main environment", + "x-isDateTime": false + }, + "is_dirty": { + "type": "boolean", + "title": "Is there any pending activity on this environment", + "x-isDateTime": false + }, + "has_staged_activities": { + "type": "boolean", + "title": "Is there any staged activity on this environment", + "x-isDateTime": false + }, + "can_rolling_deploy": { + "type": "boolean", + "title": "If the environment supports rolling deployments", + "x-isDateTime": false + }, + "has_code": { + "type": "boolean", + "title": "Does this environment have code", + "x-isDateTime": false + }, + "head_commit": { + "type": "string", + "nullable": true, + "title": "The SHA of the head commit for this environment", + "x-isDateTime": false + }, + "merge_info": { + "type": "object", + "properties": { + "commits_ahead": { + "type": "integer", + "nullable": true, + "title": "The amount of commits that are in the environment but not in the parent" + }, + "commits_behind": { + "type": "integer", + "nullable": true, + "title": "The amount of commits that are in the parent but not in the environment" + }, + "parent_ref": { + "type": "string", + "nullable": true, + "title": "The reference in Git for the parent environment" + } + }, + "required": [ + "commits_ahead", + "commits_behind", + "parent_ref" + ], + "additionalProperties": false, + "title": "The commit distance info between parent and child environments", + "x-isDateTime": false + }, + "has_deployment": { + "type": "boolean", + "title": "Whether this environment had a successful deployment.", + "x-isDateTime": false + }, + "supports_restrict_robots": { + "type": "boolean", + "title": "Does this environment support configuring restrict_robots", + "x-isDateTime": false + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "name", + "machine_name", + "title", + "attributes", + "type", + "parent", + "default_domain", + "has_domains", + "clone_parent_on_create", + "deployment_target", + "is_pr", + "has_remote", + "status", + "http_access", + "enable_smtp", + "restrict_robots", + "edge_hostname", + "deployment_state", + "sizing", + "resources_overrides", + "max_instance_count", + "last_active_at", + "last_backup_at", + "project", + "is_main", + "is_dirty", + "has_staged_activities", + "can_rolling_deploy", + "has_code", + "head_commit", + "merge_info", + "has_deployment", + "supports_restrict_robots" + ], + "additionalProperties": false + }, + "EnvironmentActivateInput": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "init": { + "type": "string", + "enum": [ + "default", + "minimum", + "parent" + ], + "nullable": true, + "title": "The resources used when activating an environment" + } + }, + "required": [ + "init" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources", + "x-isDateTime": false + } + }, + "required": [ + "resources" + ], + "additionalProperties": false + }, + "EnvironmentBackupInput": { + "type": "object", + "properties": { + "safe": { + "type": "boolean", + "title": "Take a safe or a live backup", + "x-isDateTime": false + } + }, + "required": [ + "safe" + ], + "additionalProperties": false + }, + "EnvironmentBranchInput": { + "type": "object", + "properties": { + "title": { + "type": "string", + "title": "Title", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "clone_parent": { + "type": "boolean", + "title": "Clone data from the parent environment", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "development", + "staging" + ], + "title": "The type of environment (`staging` or `development`)", + "x-isDateTime": false + }, + "resources": { + "type": "object", + "properties": { + "init": { + "type": "string", + "enum": [ + "default", + "minimum", + "parent" + ], + "nullable": true, + "title": "The resources used when initializing services of the new environment" + } + }, + "required": [ + "init" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources", + "x-isDateTime": false + } + }, + "required": [ + "title", + "name", + "clone_parent", + "type", + "resources" + ], + "additionalProperties": false + }, + "EnvironmentCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Environment" + } + }, + "EnvironmentDeployInput": { + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "rolling", + "stopstart" + ], + "title": "The deployment strategy (`rolling` or `stopstart`)", + "x-isDateTime": false + } + }, + "required": [ + "strategy" + ], + "additionalProperties": false + }, + "EnvironmentInitializeInput": { + "type": "object", + "properties": { + "profile": { + "type": "string", + "title": "Name of the profile to show in the UI", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "Repository to clone from", + "x-isDateTime": false + }, + "config": { + "type": "string", + "nullable": true, + "title": "Repository to clone the configuration files from", + "x-isDateTime": false + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "title": "The path to the file." + }, + "mode": { + "type": "integer", + "title": "The octal value of the file protection mode." + }, + "contents": { + "type": "string", + "title": "The contents of the file (base64 encoded)." + } + }, + "required": [ + "path", + "mode", + "contents" + ], + "additionalProperties": false + }, + "title": "A list of files to add to the repository during initialization", + "x-isDateTime": false + }, + "resources": { + "type": "object", + "properties": { + "init": { + "type": "string", + "enum": [ + "default", + "minimum" + ], + "nullable": true, + "title": "The resources used when initializing the environment" + } + }, + "required": [ + "init" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources", + "x-isDateTime": false + } + }, + "required": [ + "profile", + "repository", + "config", + "files", + "resources" + ], + "additionalProperties": false + }, + "EnvironmentMergeInput": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "init": { + "type": "string", + "enum": [ + "child", + "default", + "manual", + "minimum" + ], + "nullable": true, + "title": "The resources used when merging an environment" + } + }, + "required": [ + "init" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources", + "x-isDateTime": false + } + }, + "required": [ + "resources" + ], + "additionalProperties": false + }, + "EnvironmentOperationInput": { + "type": "object", + "properties": { + "service": { + "type": "string", + "title": "The name of the application or worker to run the operation on", + "x-isDateTime": false + }, + "operation": { + "type": "string", + "title": "The name of the operation", + "x-isDateTime": false + }, + "parameters": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The parameters to run the operation with", + "x-isDateTime": false + } + }, + "required": [ + "service", + "operation", + "parameters" + ], + "additionalProperties": false + }, + "EnvironmentPatch": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "title": { + "type": "string", + "title": "Title", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "development", + "production", + "staging" + ], + "title": "The type of environment (`production`, `staging` or `development`). If not provided, a default will be calculated.", + "x-isDateTime": false + }, + "parent": { + "type": "string", + "nullable": true, + "title": "Parent environment", + "x-isDateTime": false + }, + "clone_parent_on_create": { + "type": "boolean", + "title": "Clone data when creating that environment", + "x-isDateTime": false + }, + "http_access": { + "type": "object", + "properties": { + "is_enabled": { + "type": "boolean", + "title": "Whether http_access control is enabled" + }, + "addresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "enum": [ + "allow", + "deny" + ], + "title": "Permission" + }, + "address": { + "type": "string", + "title": "IP address or CIDR" + } + }, + "required": [ + "permission", + "address" + ], + "additionalProperties": false + }, + "title": "Address grants" + }, + "basic_auth": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Basic auth grants" + } + }, + "additionalProperties": false, + "title": "Http access permissions", + "x-isDateTime": false + }, + "enable_smtp": { + "type": "boolean", + "title": "Whether to configure SMTP for this environment.", + "x-isDateTime": false + }, + "restrict_robots": { + "type": "boolean", + "title": "Whether to restrict robots for this environment.", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "EnvironmentRestoreInput": { + "type": "object", + "properties": { + "environment_name": { + "type": "string", + "nullable": true, + "title": "Environment name", + "x-isDateTime": false + }, + "branch_from": { + "type": "string", + "nullable": true, + "title": "Branch from", + "x-isDateTime": false + }, + "restore_code": { + "type": "boolean", + "title": "Whether we should restore the code or only the data", + "x-isDateTime": false + }, + "restore_resources": { + "type": "boolean", + "title": "Whether we should restore resources configuration from the backup", + "x-isDateTime": false + }, + "resources": { + "type": "object", + "properties": { + "init": { + "type": "string", + "enum": [ + "backup", + "default", + "minimum", + "parent" + ], + "nullable": true, + "title": "The resources used when initializing services of the environment" + } + }, + "required": [ + "init" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources", + "x-isDateTime": false + } + }, + "required": [ + "environment_name", + "branch_from", + "restore_code", + "restore_resources", + "resources" + ], + "additionalProperties": false + }, + "EnvironmentSourceOperation": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of EnvironmentSourceOperation", + "x-isDateTime": false + }, + "app": { + "type": "string", + "title": "The name of the application", + "x-isDateTime": false + }, + "operation": { + "type": "string", + "title": "The name of the source operation", + "x-isDateTime": false + }, + "command": { + "type": "string", + "title": "The command that will be triggered", + "x-isDateTime": false + } + }, + "required": [ + "id", + "app", + "operation", + "command" + ], + "additionalProperties": false + }, + "EnvironmentSourceOperationCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentSourceOperation" + } + }, + "EnvironmentSourceOperationInput": { + "type": "object", + "properties": { + "operation": { + "type": "string", + "title": "The name of the operation to execute", + "x-isDateTime": false + }, + "variables": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": {} + }, + "title": "The variables of the application.", + "x-isDateTime": false + } + }, + "required": [ + "operation", + "variables" + ], + "additionalProperties": false + }, + "EnvironmentSynchronizeInput": { + "type": "object", + "properties": { + "synchronize_code": { + "type": "boolean", + "title": "Synchronize code?", + "x-isDateTime": false + }, + "rebase": { + "type": "boolean", + "title": "Synchronize code by rebasing instead of merging", + "x-isDateTime": false + }, + "synchronize_data": { + "type": "boolean", + "title": "Synchronize data?", + "x-isDateTime": false + }, + "synchronize_resources": { + "type": "boolean", + "title": "Synchronize resources?", + "x-isDateTime": false + } + }, + "required": [ + "synchronize_code", + "rebase", + "synchronize_data", + "synchronize_resources" + ], + "additionalProperties": false + }, + "EnvironmentType": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of EnvironmentType", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + } + }, + "required": [ + "id", + "attributes" + ], + "additionalProperties": false + }, + "EnvironmentTypeCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentType" + } + }, + "EnvironmentVariable": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of EnvironmentVariable", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "value": { + "type": "string", + "title": "Value", + "x-isDateTime": false + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string", + "x-isDateTime": false + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive", + "x-isDateTime": false + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build", + "x-isDateTime": false + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime", + "x-isDateTime": false + }, + "application_scope": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Applications that have access to this variable", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "Project name", + "x-isDateTime": false + }, + "environment": { + "type": "string", + "title": "Environment name", + "x-isDateTime": false + }, + "inherited": { + "type": "boolean", + "title": "The variable is inherited from a parent environment", + "x-isDateTime": false + }, + "is_enabled": { + "type": "boolean", + "title": "The variable is enabled on this environment", + "x-isDateTime": false + }, + "is_inheritable": { + "type": "boolean", + "title": "The variable is inheritable to child environments", + "x-isDateTime": false + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "name", + "attributes", + "is_json", + "is_sensitive", + "visible_build", + "visible_runtime", + "application_scope", + "project", + "environment", + "inherited", + "is_enabled", + "is_inheritable" + ], + "additionalProperties": false + }, + "EnvironmentVariableCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + }, + "EnvironmentVariableCreateInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "value": { + "type": "string", + "title": "Value", + "x-isDateTime": false + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string", + "x-isDateTime": false + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive", + "x-isDateTime": false + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build", + "x-isDateTime": false + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime", + "x-isDateTime": false + }, + "application_scope": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Applications that have access to this variable", + "x-isDateTime": false + }, + "is_enabled": { + "type": "boolean", + "title": "The variable is enabled on this environment", + "x-isDateTime": false + }, + "is_inheritable": { + "type": "boolean", + "title": "The variable is inheritable to child environments", + "x-isDateTime": false + } + }, + "required": [ + "name", + "value" + ], + "additionalProperties": false + }, + "EnvironmentVariablePatch": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "value": { + "type": "string", + "title": "Value", + "x-isDateTime": false + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string", + "x-isDateTime": false + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive", + "x-isDateTime": false + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build", + "x-isDateTime": false + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime", + "x-isDateTime": false + }, + "application_scope": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Applications that have access to this variable", + "x-isDateTime": false + }, + "is_enabled": { + "type": "boolean", + "title": "The variable is enabled on this environment", + "x-isDateTime": false + }, + "is_inheritable": { + "type": "boolean", + "title": "The variable is inheritable to child environments", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "FastlyIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of FastlyIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "service_id": { + "type": "string", + "title": "Fastly Service ID", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "events", + "environments", + "excluded_environments", + "states", + "result", + "service_id" + ], + "additionalProperties": false + }, + "FastlyIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "Fastly API Token", + "x-isDateTime": false + }, + "service_id": { + "type": "string", + "title": "Fastly Service ID", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "service_id" + ], + "additionalProperties": false + }, + "FastlyIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "Fastly API Token", + "x-isDateTime": false + }, + "service_id": { + "type": "string", + "title": "Fastly Service ID", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "service_id" + ], + "additionalProperties": false + }, + "FoundationDeploymentTarget": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of FoundationDeploymentTarget", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "hosts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "title": "The identifier of the host." + }, + "type": { + "type": "string", + "enum": [ + "core", + "satellite" + ], + "title": "The type of the deployment to this host." + }, + "services": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "The services assigned to this host" + } + }, + "required": [ + "id", + "type", + "services" + ], + "additionalProperties": false + }, + "nullable": true, + "title": "The hosts of the deployment target.", + "x-isDateTime": false + }, + "use_dedicated_grid": { + "type": "boolean", + "title": "Whether the deployment should target dedicated Grid hosts.", + "x-isDateTime": false + }, + "storage_type": { + "type": "string", + "nullable": true, + "title": "The storage type.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name", + "hosts", + "use_dedicated_grid", + "storage_type" + ], + "additionalProperties": false + }, + "FoundationDeploymentTargetCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "hosts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "title": "The identifier of the host." + }, + "type": { + "type": "string", + "enum": [ + "core", + "satellite" + ], + "title": "The type of the deployment to this host." + }, + "services": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "The services assigned to this host" + } + }, + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + "nullable": true, + "title": "The hosts of the deployment target.", + "x-isDateTime": false + }, + "use_dedicated_grid": { + "type": "boolean", + "title": "Whether the deployment should target dedicated Grid hosts.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "FoundationDeploymentTargetPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "hosts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "title": "The identifier of the host." + }, + "type": { + "type": "string", + "enum": [ + "core", + "satellite" + ], + "title": "The type of the deployment to this host." + }, + "services": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "The services assigned to this host" + } + }, + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + "nullable": true, + "title": "The hosts of the deployment target.", + "x-isDateTime": false + }, + "use_dedicated_grid": { + "type": "boolean", + "title": "Whether the deployment should target dedicated Grid hosts.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "GitLabIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of GitLabIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "base_url": { + "type": "string", + "title": "The base URL of the GitLab installation.", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "The GitLab project (in the form `namespace/repo`).", + "x-isDateTime": false + }, + "build_merge_requests": { + "type": "boolean", + "title": "Whether or not to build merge requests.", + "x-isDateTime": false + }, + "build_wip_merge_requests": { + "type": "boolean", + "title": "Whether or not to build work in progress merge requests (requires `build_merge_requests`).", + "x-isDateTime": false + }, + "merge_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "fetch_branches", + "prune_branches", + "environment_init_resources", + "base_url", + "project", + "build_merge_requests", + "build_wip_merge_requests", + "merge_requests_clone_parent_data" + ], + "additionalProperties": false + }, + "GitLabIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The GitLab private token.", + "x-isDateTime": false + }, + "base_url": { + "type": "string", + "title": "The base URL of the GitLab installation.", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "The GitLab project (in the form `namespace/repo`).", + "x-isDateTime": false + }, + "build_merge_requests": { + "type": "boolean", + "title": "Whether or not to build merge requests.", + "x-isDateTime": false + }, + "build_wip_merge_requests": { + "type": "boolean", + "title": "Whether or not to build work in progress merge requests (requires `build_merge_requests`).", + "x-isDateTime": false + }, + "merge_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "project" + ], + "additionalProperties": false + }, + "GitLabIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The GitLab private token.", + "x-isDateTime": false + }, + "base_url": { + "type": "string", + "title": "The base URL of the GitLab installation.", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "The GitLab project (in the form `namespace/repo`).", + "x-isDateTime": false + }, + "build_merge_requests": { + "type": "boolean", + "title": "Whether or not to build merge requests.", + "x-isDateTime": false + }, + "build_wip_merge_requests": { + "type": "boolean", + "title": "Whether or not to build work in progress merge requests (requires `build_merge_requests`).", + "x-isDateTime": false + }, + "merge_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "project" + ], + "additionalProperties": false + }, + "GithubIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of GithubIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "base_url": { + "type": "string", + "nullable": true, + "title": "The base URL of the Github API endpoint.", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The GitHub repository (in the form `user/repo`).", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "build_draft_pull_requests": { + "type": "boolean", + "title": "Whether or not to build draft pull requests (requires `build_pull_requests`).", + "x-isDateTime": false + }, + "build_pull_requests_post_merge": { + "type": "boolean", + "title": "Whether to build pull requests post-merge (if true) or pre-merge (if false).", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building pull requests.", + "x-isDateTime": false + }, + "token_type": { + "type": "string", + "enum": [ + "classic_personal_token", + "github_app" + ], + "title": "The type of the token of this GitHub integration", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "fetch_branches", + "prune_branches", + "environment_init_resources", + "base_url", + "repository", + "build_pull_requests", + "build_draft_pull_requests", + "build_pull_requests_post_merge", + "pull_requests_clone_parent_data", + "token_type" + ], + "additionalProperties": false + }, + "GithubIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The GitHub token.", + "x-isDateTime": false + }, + "base_url": { + "type": "string", + "nullable": true, + "title": "The base URL of the Github API endpoint.", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The GitHub repository (in the form `user/repo`).", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "build_draft_pull_requests": { + "type": "boolean", + "title": "Whether or not to build draft pull requests (requires `build_pull_requests`).", + "x-isDateTime": false + }, + "build_pull_requests_post_merge": { + "type": "boolean", + "title": "Whether to build pull requests post-merge (if true) or pre-merge (if false).", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building pull requests.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "repository" + ], + "additionalProperties": false + }, + "GithubIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The GitHub token.", + "x-isDateTime": false + }, + "base_url": { + "type": "string", + "nullable": true, + "title": "The base URL of the Github API endpoint.", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The GitHub repository (in the form `user/repo`).", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "build_draft_pull_requests": { + "type": "boolean", + "title": "Whether or not to build draft pull requests (requires `build_pull_requests`).", + "x-isDateTime": false + }, + "build_pull_requests_post_merge": { + "type": "boolean", + "title": "Whether to build pull requests post-merge (if true) or pre-merge (if false).", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building pull requests.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "repository" + ], + "additionalProperties": false + }, + "HealthWebHookIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of HealthWebHookIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The URL of the webhook", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "url" + ], + "additionalProperties": false + }, + "HealthWebHookIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "shared_key": { + "type": "string", + "nullable": true, + "title": "The JWS shared secret key", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The URL of the webhook", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "HealthWebHookIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "shared_key": { + "type": "string", + "nullable": true, + "title": "The JWS shared secret key", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The URL of the webhook", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "HttpLogIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of HttpLogIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "HTTP endpoint", + "x-isDateTime": false + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "HTTP headers to use in POST requests", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "extra", + "url", + "headers", + "tls_verify", + "excluded_services" + ], + "additionalProperties": false + }, + "HttpLogIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "HTTP endpoint", + "x-isDateTime": false + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "HTTP headers to use in POST requests", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "HttpLogIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "HTTP endpoint", + "x-isDateTime": false + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "HTTP headers to use in POST requests", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "Integration": { + "oneOf": [ + { + "$ref": "#/components/schemas/BitbucketIntegration" + }, + { + "$ref": "#/components/schemas/BitbucketServerIntegration" + }, + { + "$ref": "#/components/schemas/BlackfireIntegration" + }, + { + "$ref": "#/components/schemas/FastlyIntegration" + }, + { + "$ref": "#/components/schemas/GithubIntegration" + }, + { + "$ref": "#/components/schemas/GitLabIntegration" + }, + { + "$ref": "#/components/schemas/EmailIntegration" + }, + { + "$ref": "#/components/schemas/PagerDutyIntegration" + }, + { + "$ref": "#/components/schemas/SlackIntegration" + }, + { + "$ref": "#/components/schemas/HealthWebHookIntegration" + }, + { + "$ref": "#/components/schemas/HttpLogIntegration" + }, + { + "$ref": "#/components/schemas/NewRelicIntegration" + }, + { + "$ref": "#/components/schemas/HttpLogIntegration" + }, + { + "$ref": "#/components/schemas/ScriptIntegration" + }, + { + "$ref": "#/components/schemas/SplunkIntegration" + }, + { + "$ref": "#/components/schemas/SumologicIntegration" + }, + { + "$ref": "#/components/schemas/SyslogIntegration" + }, + { + "$ref": "#/components/schemas/WebHookIntegration" + } + ] + }, + "IntegrationCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration" + } + }, + "IntegrationCreateInput": { + "oneOf": [ + { + "$ref": "#/components/schemas/BitbucketIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/BitbucketServerIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/BlackfireIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/FastlyIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/GithubIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/GitLabIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/EmailIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/PagerDutyIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/SlackIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/HealthWebHookIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/HttpLogIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/NewRelicIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/HttpLogIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/ScriptIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/SplunkIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/SumologicIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/SyslogIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/WebHookIntegrationCreateInput" + } + ] + }, + "IntegrationPatch": { + "oneOf": [ + { + "$ref": "#/components/schemas/BitbucketIntegrationPatch" + }, + { + "$ref": "#/components/schemas/BitbucketServerIntegrationPatch" + }, + { + "$ref": "#/components/schemas/BlackfireIntegrationPatch" + }, + { + "$ref": "#/components/schemas/FastlyIntegrationPatch" + }, + { + "$ref": "#/components/schemas/GithubIntegrationPatch" + }, + { + "$ref": "#/components/schemas/GitLabIntegrationPatch" + }, + { + "$ref": "#/components/schemas/EmailIntegrationPatch" + }, + { + "$ref": "#/components/schemas/PagerDutyIntegrationPatch" + }, + { + "$ref": "#/components/schemas/SlackIntegrationPatch" + }, + { + "$ref": "#/components/schemas/HealthWebHookIntegrationPatch" + }, + { + "$ref": "#/components/schemas/HttpLogIntegrationPatch" + }, + { + "$ref": "#/components/schemas/NewRelicIntegrationPatch" + }, + { + "$ref": "#/components/schemas/HttpLogIntegrationPatch" + }, + { + "$ref": "#/components/schemas/ScriptIntegrationPatch" + }, + { + "$ref": "#/components/schemas/SplunkIntegrationPatch" + }, + { + "$ref": "#/components/schemas/SumologicIntegrationPatch" + }, + { + "$ref": "#/components/schemas/SyslogIntegrationPatch" + }, + { + "$ref": "#/components/schemas/WebHookIntegrationPatch" + } + ] + }, + "NewRelicIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of NewRelicIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The NewRelic Logs endpoint", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "extra", + "url", + "tls_verify", + "excluded_services" + ], + "additionalProperties": false + }, + "NewRelicIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The NewRelic Logs endpoint", + "x-isDateTime": false + }, + "license_key": { + "type": "string", + "title": "The NewRelic Logs License Key", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url", + "license_key" + ], + "additionalProperties": false + }, + "NewRelicIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The NewRelic Logs endpoint", + "x-isDateTime": false + }, + "license_key": { + "type": "string", + "title": "The NewRelic Logs License Key", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url", + "license_key" + ], + "additionalProperties": false + }, + "PagerDutyIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of PagerDutyIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "routing_key": { + "type": "string", + "title": "The PagerDuty routing key", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "routing_key" + ], + "additionalProperties": false + }, + "PagerDutyIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "routing_key": { + "type": "string", + "title": "The PagerDuty routing key", + "x-isDateTime": false + } + }, + "required": [ + "type", + "routing_key" + ], + "additionalProperties": false + }, + "PagerDutyIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "routing_key": { + "type": "string", + "title": "The PagerDuty routing key", + "x-isDateTime": false + } + }, + "required": [ + "type", + "routing_key" + ], + "additionalProperties": false + }, + "ProdDomainStorage": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of ProdDomainStorage", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Domain type", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "Project name", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "Domain name", + "x-isDateTime": false + }, + "registered_name": { + "type": "string", + "title": "Claimed domain name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "is_default": { + "type": "boolean", + "title": "Is this domain default", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "name", + "attributes" + ], + "additionalProperties": false + }, + "ProdDomainStorageCreateInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Domain name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "is_default": { + "type": "boolean", + "title": "Is this domain default", + "x-isDateTime": false + } + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "ProdDomainStoragePatch": { + "type": "object", + "properties": { + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "is_default": { + "type": "boolean", + "title": "Is this domain default", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "Project": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Project", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "title": { + "type": "string", + "title": "Title", + "x-isDateTime": false + }, + "description": { + "type": "string", + "title": "Description", + "x-isDateTime": false + }, + "owner": { + "type": "string", + "title": "Owner", + "deprecated": true, + "x-stability": "DEPRECATED", + "x-isDateTime": false + }, + "namespace": { + "type": "string", + "nullable": true, + "title": "The namespace the project belongs in", + "x-stability": "EXPERIMENTAL", + "x-isDateTime": false + }, + "organization": { + "type": "string", + "nullable": true, + "title": "The organization the project belongs in", + "x-stability": "EXPERIMENTAL", + "x-isDateTime": false + }, + "default_branch": { + "type": "string", + "nullable": true, + "title": "Default branch", + "x-isDateTime": false + }, + "status": { + "type": "object", + "properties": { + "code": { + "type": "string", + "title": "Status code" + }, + "message": { + "type": "string", + "title": "Status text" + } + }, + "required": [ + "code", + "message" + ], + "additionalProperties": false, + "title": "Status", + "x-isDateTime": false + }, + "timezone": { + "type": "string", + "title": "Timezone of the project", + "x-isDateTime": false + }, + "region": { + "type": "string", + "title": "Region", + "x-isDateTime": false + }, + "repository": { + "type": "object", + "properties": { + "url": { + "type": "string", + "title": "Git URL" + }, + "client_ssh_key": { + "type": "string", + "nullable": true, + "title": "SSH Key used to access external private repositories." + } + }, + "required": [ + "url", + "client_ssh_key" + ], + "additionalProperties": false, + "title": "Repository information", + "x-isDateTime": false + }, + "default_domain": { + "type": "string", + "nullable": true, + "title": "Default domain", + "x-isDateTime": false + }, + "subscription": { + "type": "object", + "properties": { + "license_uri": { + "type": "string", + "title": "URI of the subscription" + }, + "plan": { + "type": "string", + "enum": [ + "2xlarge", + "2xlarge-high-memory", + "4xlarge", + "8xlarge", + "development", + "large", + "large-high-memory", + "medium", + "medium-high-memory", + "standard", + "standard-high-memory", + "xlarge", + "xlarge-high-memory" + ], + "title": "Plan level" + }, + "environments": { + "type": "integer", + "title": "Number of environments" + }, + "storage": { + "type": "integer", + "title": "Size of storage (in MB)" + }, + "included_users": { + "type": "integer", + "title": "Number of users" + }, + "subscription_management_uri": { + "type": "string", + "title": "URI for managing the subscription" + }, + "restricted": { + "type": "boolean", + "title": "True if subscription attributes, like number of users, are frozen" + }, + "suspended": { + "type": "boolean", + "title": "Whether or not the subscription is suspended" + }, + "user_licenses": { + "type": "integer", + "title": "Current number of users" + }, + "resources": { + "type": "object", + "properties": { + "container_profiles": { + "type": "boolean", + "title": "Enable support for customizable container profiles." + }, + "production": { + "type": "object", + "properties": { + "legacy_development": { + "type": "boolean", + "title": "Enable legacy development sizing for this environment type." + }, + "max_cpu": { + "type": "number", + "format": "float", + "nullable": true, + "title": "Maximum number of allocated CPU units." + }, + "max_memory": { + "type": "integer", + "nullable": true, + "title": "Maximum amount of allocated RAM." + }, + "max_environments": { + "type": "integer", + "nullable": true, + "title": "Maximum number of environments" + } + }, + "required": [ + "legacy_development", + "max_cpu", + "max_memory", + "max_environments" + ], + "additionalProperties": false, + "title": "Resources for production environments" + }, + "development": { + "type": "object", + "properties": { + "legacy_development": { + "type": "boolean", + "title": "Enable legacy development sizing for this environment type." + }, + "max_cpu": { + "type": "number", + "format": "float", + "nullable": true, + "title": "Maximum number of allocated CPU units." + }, + "max_memory": { + "type": "integer", + "nullable": true, + "title": "Maximum amount of allocated RAM." + }, + "max_environments": { + "type": "integer", + "nullable": true, + "title": "Maximum number of environments" + } + }, + "required": [ + "legacy_development", + "max_cpu", + "max_memory", + "max_environments" + ], + "additionalProperties": false, + "title": "Resources for development environments" + } + }, + "required": [ + "container_profiles", + "production", + "development" + ], + "additionalProperties": false, + "title": "Resources limits" + }, + "resource_validation_url": { + "type": "string", + "title": "URL for resources validation" + }, + "image_types": { + "type": "object", + "properties": { + "only": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Image types to be allowed use." + }, + "exclude": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Image types to be denied use." + } + }, + "additionalProperties": false, + "title": "Restricted and denied image types" + } + }, + "required": [ + "license_uri", + "storage", + "included_users", + "subscription_management_uri", + "restricted", + "suspended", + "user_licenses" + ], + "additionalProperties": false, + "title": "Subscription information", + "x-isDateTime": false + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "attributes", + "title", + "description", + "owner", + "namespace", + "organization", + "default_branch", + "status", + "timezone", + "region", + "repository", + "default_domain", + "subscription" + ], + "additionalProperties": false + }, + "ProjectCapabilities": { + "type": "object", + "properties": { + "custom_domains": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, custom domains can be added to the project." + }, + "environments_with_domains_limit": { + "type": "integer", + "title": "Limit on the amount of non-production environments that can have domains set" + } + }, + "required": [ + "enabled", + "environments_with_domains_limit" + ], + "additionalProperties": false, + "title": "Custom Domains", + "x-isDateTime": false + }, + "source_operations": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, source operations can be triggered." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Source Operations", + "x-isDateTime": false + }, + "runtime_operations": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, runtime operations can be triggered." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Runtime Operations", + "x-isDateTime": false + }, + "outbound_firewall": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, outbound firewall can be used." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Outbound Firewall", + "x-isDateTime": false + }, + "metrics": { + "type": "object", + "properties": { + "max_range": { + "type": "string", + "title": "Limit on the maximum time range allowed in metrics retrieval" + } + }, + "required": [ + "max_range" + ], + "additionalProperties": false, + "title": "Metrics", + "x-isDateTime": false + }, + "logs_forwarding": { + "type": "object", + "properties": { + "max_extra_payload_size": { + "type": "integer", + "title": "Limit on the maximum size for the custom extra attributes added to the forwarded logs payload" + } + }, + "required": [ + "max_extra_payload_size" + ], + "additionalProperties": false, + "title": "Logs Forwarding", + "x-isDateTime": false + }, + "guaranteed_resources": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, guaranteed resources can be used" + }, + "instance_limit": { + "type": "integer", + "title": "Instance limit for guaranteed resources" + } + }, + "required": [ + "enabled", + "instance_limit" + ], + "additionalProperties": false, + "title": "Guaranteed Resources", + "x-isDateTime": false + }, + "images": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "available": { + "type": "boolean", + "title": "The image is available for deployment" + } + }, + "required": [ + "available" + ], + "additionalProperties": false + } + }, + "title": "Images", + "x-isDateTime": false + }, + "instance_limit": { + "type": "integer", + "title": "Maximum number of instance per service", + "x-isDateTime": false + }, + "build_resources": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, build resources can be modified." + }, + "max_cpu": { + "type": "number", + "format": "float", + "title": "CPU" + }, + "max_memory": { + "type": "integer", + "title": "Memory" + } + }, + "required": [ + "enabled", + "max_cpu", + "max_memory" + ], + "additionalProperties": false, + "title": "Build Resources", + "x-isDateTime": false + }, + "data_retention": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, data retention configuration can be modified." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Data Retention", + "x-isDateTime": false + }, + "autoscaling": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, autoscaling can be configured." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Autoscaling", + "x-isDateTime": false + }, + "integrations": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, integrations can be used" + }, + "config": { + "type": "object", + "properties": { + "newrelic": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "New Relic log-forwarding integration configurations" + }, + "sumologic": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Sumo Logic log-forwarding integration configurations" + }, + "splunk": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Splunk log-forwarding integration configurations" + }, + "httplog": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "HTTP log-forwarding integration configurations" + }, + "syslog": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Syslog log-forwarding integration configurations" + }, + "webhook": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Webhook integration configurations" + }, + "script": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Script integration configurations" + }, + "github": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "GitHub integration configurations" + }, + "gitlab": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "GitLab integration configurations" + }, + "bitbucket": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Bitbucket integration configurations" + }, + "bitbucket_server": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Bitbucket server integration configurations" + }, + "health.email": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Health Email notification integration configurations" + }, + "health.webhook": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Health Webhook notification integration configurations" + }, + "health.pagerduty": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Health PagerDuty notification integration configurations" + }, + "health.slack": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Health Slack notification integration configurations" + }, + "cdn.fastly": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Fastly CDN integration configurations" + }, + "blackfire": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Blackfire integration configurations" + }, + "otlp": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "OpenTelemetry log-forwarding integration configurations" + } + }, + "additionalProperties": false, + "title": "Config" + }, + "allowed_integrations": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of integrations allowed to be created" + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Integrations", + "x-isDateTime": false + } + }, + "required": [ + "metrics", + "logs_forwarding", + "guaranteed_resources", + "images", + "instance_limit", + "build_resources", + "data_retention", + "autoscaling" + ], + "additionalProperties": false + }, + "ProjectPatch": { + "type": "object", + "properties": { + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "title": { + "type": "string", + "title": "Title", + "x-isDateTime": false + }, + "description": { + "type": "string", + "title": "Description", + "x-isDateTime": false + }, + "default_branch": { + "type": "string", + "nullable": true, + "title": "Default branch", + "x-isDateTime": false + }, + "timezone": { + "type": "string", + "title": "Timezone of the project", + "x-isDateTime": false + }, + "region": { + "type": "string", + "title": "Region", + "x-isDateTime": false + }, + "default_domain": { + "type": "string", + "nullable": true, + "title": "Default domain", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "ProjectSettings": { + "type": "object", + "properties": { + "initialize": { + "type": "object", + "title": "Initialization key", + "x-isDateTime": false + }, + "product_name": { + "type": "string", + "title": "The name of the product.", + "x-isDateTime": false + }, + "product_code": { + "type": "string", + "title": "The lowercase ASCII code of the product.", + "x-isDateTime": false + }, + "ui_uri_template": { + "type": "string", + "title": "The template of the project UI uri", + "x-isDateTime": false + }, + "variables_prefix": { + "type": "string", + "title": "The prefix of the generated environment variables.", + "x-isDateTime": false + }, + "bot_email": { + "type": "string", + "title": "The email of the bot.", + "x-isDateTime": false + }, + "application_config_file": { + "type": "string", + "title": "The name of the application-specific configuration file.", + "x-isDateTime": false + }, + "project_config_dir": { + "type": "string", + "title": "The name of the project configuration directory.", + "x-isDateTime": false + }, + "use_drupal_defaults": { + "type": "boolean", + "title": "Whether to use the default Drupal-centric configuration files when missing from the repository.", + "x-isDateTime": false + }, + "use_legacy_subdomains": { + "type": "boolean", + "title": "Whether to use legacy subdomain scheme, that replaces `.` by `---` in development subdomains.", + "x-isDateTime": false + }, + "development_service_size": { + "type": "string", + "enum": [ + "2XL", + "4XL", + "L", + "M", + "S", + "XL" + ], + "title": "The size of development services.", + "x-isDateTime": false + }, + "development_application_size": { + "type": "string", + "enum": [ + "2XL", + "4XL", + "L", + "M", + "S", + "XL" + ], + "title": "The size of development applications.", + "x-isDateTime": false + }, + "enable_certificate_provisioning": { + "type": "boolean", + "title": "Enable automatic certificate provisioning.", + "x-isDateTime": false + }, + "certificate_style": { + "type": "string", + "enum": [ + "ecdsa", + "rsa" + ], + "title": "Certificate Style", + "x-isDateTime": false + }, + "certificate_renewal_activity": { + "type": "boolean", + "title": "Create an activity for certificate renewal", + "x-isDateTime": false + }, + "development_domain_template": { + "type": "string", + "nullable": true, + "title": "The template of the development domain, can include {project} and {environment} placeholders.", + "x-isDateTime": false + }, + "enable_state_api_deployments": { + "type": "boolean", + "title": "Enable the State API-driven deployments on regions that support them.", + "x-isDateTime": false + }, + "temporary_disk_size": { + "type": "integer", + "nullable": true, + "title": "Set the size of the temporary disk (/tmp, in MB).", + "x-isDateTime": false + }, + "local_disk_size": { + "type": "integer", + "nullable": true, + "title": "Set the size of the instance disk (in MB).", + "x-isDateTime": false + }, + "cron_minimum_interval": { + "type": "integer", + "title": "Minimum interval between cron runs (in minutes)", + "x-isDateTime": false + }, + "cron_maximum_jitter": { + "type": "integer", + "title": "Maximum jitter inserted in cron runs (in minutes)", + "x-isDateTime": false + }, + "cron_production_expiry_interval": { + "type": "integer", + "title": "The interval (in days) for which cron activity and logs are kept around", + "x-isDateTime": false + }, + "cron_non_production_expiry_interval": { + "type": "integer", + "title": "The interval (in days) for which cron activity and logs are kept around", + "x-isDateTime": false + }, + "concurrency_limits": { + "type": "object", + "additionalProperties": { + "type": "integer", + "nullable": true + }, + "title": "The concurrency limits applied to different kind of activities", + "x-isDateTime": false + }, + "flexible_build_cache": { + "type": "boolean", + "title": "Enable the flexible build cache implementation", + "x-isDateTime": false + }, + "strict_configuration": { + "type": "boolean", + "title": "Strict configuration validation.", + "x-isDateTime": false + }, + "has_sleepy_crons": { + "type": "boolean", + "title": "Enable sleepy crons.", + "x-isDateTime": false + }, + "crons_in_git": { + "type": "boolean", + "title": "Enable crons from git.", + "x-isDateTime": false + }, + "custom_error_template": { + "type": "string", + "nullable": true, + "title": "Custom error template for the router.", + "x-isDateTime": false + }, + "app_error_page_template": { + "type": "string", + "nullable": true, + "title": "Custom error template for the application.", + "x-isDateTime": false + }, + "environment_name_strategy": { + "type": "string", + "enum": [ + "hash", + "name-and-hash" + ], + "title": "The strategy used to generate environment machine names", + "x-isDateTime": false + }, + "data_retention": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "max_backups": { + "type": "integer", + "title": "The maximum number of backups per environment" + }, + "default_config": { + "type": "object", + "properties": { + "manual_count": { + "type": "integer", + "title": "The number of manual backups to keep." + }, + "schedule": { + "type": "array", + "items": { + "type": "object", + "properties": { + "interval": { + "type": "string", + "title": "The policy interval specification." + }, + "count": { + "type": "integer", + "title": "The number of backups to keep under this interval." + } + }, + "required": [ + "interval", + "count" + ], + "additionalProperties": false + }, + "title": "The backup schedule specification." + } + }, + "required": [ + "manual_count", + "schedule" + ], + "additionalProperties": false, + "title": "Default Config", + "x-stability": "EXPERIMENTAL" + } + }, + "required": [ + "max_backups", + "default_config" + ], + "additionalProperties": false + }, + "nullable": true, + "title": "Data retention configuration", + "x-isDateTime": false + }, + "enable_codesource_integration_push": { + "type": "boolean", + "title": "Enable pushing commits to codesource integration.", + "x-isDateTime": false + }, + "enforce_mfa": { + "type": "boolean", + "title": "Enforce multi-factor authentication.", + "x-isDateTime": false + }, + "systemd": { + "type": "boolean", + "title": "Use systemd images.", + "x-isDateTime": false + }, + "router_gen2": { + "type": "boolean", + "title": "Use the router v2 image.", + "x-isDateTime": false + }, + "build_resources": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "CPU" + }, + "memory": { + "type": "integer", + "title": "Memory" + } + }, + "required": [ + "cpu", + "memory" + ], + "additionalProperties": false, + "title": "Build Resources", + "x-isDateTime": false + }, + "outbound_restrictions_default_policy": { + "type": "string", + "enum": [ + "allow", + "deny" + ], + "title": "The default policy for firewall outbound restrictions", + "x-isDateTime": false + }, + "self_upgrade": { + "type": "boolean", + "title": "Whether self-upgrades are enabled", + "x-isDateTime": false + }, + "additional_hosts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "A mapping of hostname to ip address to be added to the container's hosts file", + "x-isDateTime": false + }, + "max_allowed_routes": { + "type": "integer", + "title": "Maximum number of routes allowed", + "x-isDateTime": false + }, + "max_allowed_redirects_paths": { + "type": "integer", + "title": "Maximum number of redirect paths allowed", + "x-isDateTime": false + }, + "enable_incremental_backups": { + "type": "boolean", + "title": "Enable incremental backups on regions that support them.", + "x-isDateTime": false + }, + "sizing_api_enabled": { + "type": "boolean", + "title": "Enable sizing api.", + "x-isDateTime": false + }, + "enable_cache_grace_period": { + "type": "boolean", + "title": "Enable cache grace period.", + "x-isDateTime": false + }, + "enable_zero_downtime_deployments": { + "type": "boolean", + "title": "Enable zero-downtime deployments for resource-only changes.", + "x-isDateTime": false + }, + "enable_admin_agent": { + "type": "boolean", + "title": "Enable admin agent", + "x-isDateTime": false + }, + "certifier_url": { + "type": "string", + "title": "The certifier url", + "x-isDateTime": false + }, + "centralized_permissions": { + "type": "boolean", + "title": "Whether centralized permissions are enabled", + "x-isDateTime": false + }, + "glue_server_max_request_size": { + "type": "integer", + "title": "Maximum size of request to glue-server (in MB)", + "x-isDateTime": false + }, + "persistent_endpoints_ssh": { + "type": "boolean", + "title": "Enable SSH access update with persistent endpoint", + "x-isDateTime": false + }, + "persistent_endpoints_ssl_certificates": { + "type": "boolean", + "title": "Enable SSL certificate update with persistent endpoint", + "x-isDateTime": false + }, + "enable_disk_health_monitoring": { + "type": "boolean", + "title": "Enable disk health monitoring", + "x-isDateTime": false + }, + "enable_paused_environments": { + "type": "boolean", + "title": "Enable paused environments", + "x-isDateTime": false + }, + "enable_unified_configuration": { + "type": "boolean", + "title": "Enable unified configuration files", + "x-isDateTime": false + }, + "enable_routes_tracing": { + "type": "boolean", + "title": "Enable tracing support in routes", + "x-isDateTime": false + }, + "image_deployment_validation": { + "type": "boolean", + "title": "Enable extended deployment validation by images", + "x-isDateTime": false + }, + "support_generic_images": { + "type": "boolean", + "title": "Support composable images", + "x-isDateTime": false + }, + "enable_github_app_token_exchange": { + "type": "boolean", + "title": "Enable fetching the GitHub App token from SIA.", + "x-isDateTime": false + }, + "continuous_profiling": { + "type": "object", + "properties": { + "supported_runtimes": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of images supported for continuous profiling" + } + }, + "required": [ + "supported_runtimes" + ], + "additionalProperties": false, + "title": "The continuous profiling configuration", + "x-isDateTime": false + }, + "disable_agent_error_reporter": { + "type": "boolean", + "title": "Disable agent error reporter", + "x-isDateTime": false + }, + "requires_domain_ownership": { + "type": "boolean", + "title": "Require ownership proof before domains are added to environments.", + "x-isDateTime": false + }, + "enable_guaranteed_resources": { + "type": "boolean", + "title": "Enable guaranteed resources feature", + "x-isDateTime": false + }, + "git_server": { + "type": "object", + "properties": { + "push_size_hard_limit": { + "type": "integer", + "title": "Push Size Reject Limit" + } + }, + "required": [ + "push_size_hard_limit" + ], + "additionalProperties": false, + "title": "Git Server configuration", + "x-isDateTime": false + }, + "activity_logs_max_size": { + "type": "integer", + "title": "The maximum size of activity logs in bytes. This limit is applied on the pre-compressed log size.", + "x-isDateTime": false + }, + "allow_manual_deployments": { + "type": "boolean", + "title": "If deployments can be manual, i.e. explicitly triggered by user.", + "x-isDateTime": false + }, + "allow_rolling_deployments": { + "type": "boolean", + "title": "If the project can use rolling deployments.", + "x-isDateTime": false + }, + "allow_burst": { + "type": "boolean", + "title": "Allow burst", + "x-isDateTime": false + }, + "router_resources": { + "type": "object", + "properties": { + "baseline_cpu": { + "type": "number", + "format": "float", + "title": "Router baseline CPU for flex plan" + }, + "baseline_memory": { + "type": "integer", + "title": "Router baseline memory (MB) for flex plan" + }, + "max_cpu": { + "type": "number", + "format": "float", + "title": "Router max CPU for flex plan" + }, + "max_memory": { + "type": "integer", + "title": "Router max memory (MB) for flex plan" + } + }, + "required": [ + "baseline_cpu", + "baseline_memory", + "max_cpu", + "max_memory" + ], + "additionalProperties": false, + "title": "Router resource settings for flex plan", + "x-isDateTime": false + } + }, + "required": [ + "initialize", + "product_name", + "product_code", + "ui_uri_template", + "variables_prefix", + "bot_email", + "application_config_file", + "project_config_dir", + "use_drupal_defaults", + "use_legacy_subdomains", + "development_service_size", + "development_application_size", + "enable_certificate_provisioning", + "certificate_style", + "certificate_renewal_activity", + "development_domain_template", + "enable_state_api_deployments", + "temporary_disk_size", + "local_disk_size", + "cron_minimum_interval", + "cron_maximum_jitter", + "cron_production_expiry_interval", + "cron_non_production_expiry_interval", + "concurrency_limits", + "flexible_build_cache", + "strict_configuration", + "has_sleepy_crons", + "crons_in_git", + "custom_error_template", + "app_error_page_template", + "environment_name_strategy", + "data_retention", + "enable_codesource_integration_push", + "enforce_mfa", + "systemd", + "router_gen2", + "build_resources", + "outbound_restrictions_default_policy", + "self_upgrade", + "additional_hosts", + "max_allowed_routes", + "max_allowed_redirects_paths", + "enable_incremental_backups", + "sizing_api_enabled", + "enable_cache_grace_period", + "enable_zero_downtime_deployments", + "enable_admin_agent", + "certifier_url", + "centralized_permissions", + "glue_server_max_request_size", + "persistent_endpoints_ssh", + "persistent_endpoints_ssl_certificates", + "enable_disk_health_monitoring", + "enable_paused_environments", + "enable_unified_configuration", + "enable_routes_tracing", + "image_deployment_validation", + "support_generic_images", + "enable_github_app_token_exchange", + "continuous_profiling", + "disable_agent_error_reporter", + "requires_domain_ownership", + "enable_guaranteed_resources", + "git_server", + "activity_logs_max_size", + "allow_manual_deployments", + "allow_rolling_deployments", + "allow_burst", + "router_resources" + ], + "additionalProperties": false + }, + "ProjectSettingsPatch": { + "type": "object", + "properties": { + "initialize": { + "type": "object", + "title": "Initialization key", + "x-isDateTime": false + }, + "data_retention": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "max_backups": { + "type": "integer", + "title": "The maximum number of backups per environment" + }, + "default_config": { + "type": "object", + "properties": { + "manual_count": { + "type": "integer", + "title": "The number of manual backups to keep." + }, + "schedule": { + "type": "array", + "items": { + "type": "object", + "properties": { + "interval": { + "type": "string", + "title": "The policy interval specification." + }, + "count": { + "type": "integer", + "title": "The number of backups to keep under this interval." + } + }, + "required": [ + "interval", + "count" + ], + "additionalProperties": false + }, + "title": "The backup schedule specification." + } + }, + "additionalProperties": false, + "title": "Default Config", + "x-stability": "EXPERIMENTAL" + } + }, + "required": [ + "default_config" + ], + "additionalProperties": false + }, + "nullable": true, + "title": "Data retention configuration", + "x-isDateTime": false + }, + "build_resources": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "CPU" + }, + "memory": { + "type": "integer", + "title": "Memory" + } + }, + "additionalProperties": false, + "title": "Build Resources", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "ProjectVariable": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of ProjectVariable", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "value": { + "type": "string", + "title": "Value", + "x-isDateTime": false + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string", + "x-isDateTime": false + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive", + "x-isDateTime": false + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build", + "x-isDateTime": false + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime", + "x-isDateTime": false + }, + "application_scope": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Applications that have access to this variable", + "x-isDateTime": false + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "name", + "attributes", + "is_json", + "is_sensitive", + "visible_build", + "visible_runtime", + "application_scope" + ], + "additionalProperties": false + }, + "ProjectVariableCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProjectVariable" + } + }, + "ProjectVariableCreateInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "value": { + "type": "string", + "title": "Value", + "x-isDateTime": false + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string", + "x-isDateTime": false + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive", + "x-isDateTime": false + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build", + "x-isDateTime": false + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime", + "x-isDateTime": false + }, + "application_scope": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Applications that have access to this variable", + "x-isDateTime": false + } + }, + "required": [ + "name", + "value" + ], + "additionalProperties": false + }, + "ProjectVariablePatch": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "value": { + "type": "string", + "title": "Value", + "x-isDateTime": false + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string", + "x-isDateTime": false + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive", + "x-isDateTime": false + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build", + "x-isDateTime": false + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime", + "x-isDateTime": false + }, + "application_scope": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Applications that have access to this variable", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "ProxyRoute": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of ProxyRoute", + "nullable": true, + "x-isDateTime": false + }, + "primary": { + "type": "boolean", + "nullable": true, + "title": "This route is the primary route of the environment", + "x-isDateTime": false + }, + "production_url": { + "type": "string", + "nullable": true, + "title": "How this URL route would look on production environment", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "proxy", + "redirect", + "upstream" + ], + "title": "Route type.", + "x-isDateTime": false + }, + "tls": { + "type": "object", + "properties": { + "strict_transport_security": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Whether strict transport security is enabled or not." + }, + "include_subdomains": { + "type": "boolean", + "nullable": true, + "title": "Whether the strict transport security policy should include all subdomains." + }, + "preload": { + "type": "boolean", + "nullable": true, + "title": "Whether the strict transport security policy should be preloaded in browsers." + } + }, + "required": [ + "enabled", + "include_subdomains", + "preload" + ], + "additionalProperties": false, + "title": "Strict-Transport-Security options." + }, + "min_version": { + "type": "string", + "enum": [ + "TLSv1.0", + "TLSv1.1", + "TLSv1.2", + "TLSv1.3" + ], + "nullable": true, + "title": "The minimum TLS version to support." + }, + "client_authentication": { + "type": "string", + "enum": [ + "request", + "require" + ], + "nullable": true, + "title": "The type of client authentication to request." + }, + "client_certificate_authorities": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Certificate authorities to validate the client certificate against. If not specified, a default set of trusted CAs will be used." + } + }, + "required": [ + "strict_transport_security", + "min_version", + "client_authentication", + "client_certificate_authorities" + ], + "additionalProperties": false, + "title": "TLS settings for the route.", + "x-isDateTime": false + }, + "to": { + "type": "string", + "title": "Proxy destination", + "x-isDateTime": false + }, + "redirects": { + "type": "object", + "properties": { + "expires": { + "type": "string", + "title": "The amount of time, in seconds, to cache the redirects." + }, + "paths": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "regexp": { + "type": "boolean", + "title": "Whether the path is a regular expression." + }, + "to": { + "type": "string", + "title": "The URL to redirect to." + }, + "prefix": { + "type": "boolean", + "nullable": true, + "title": "Whether to redirect all the paths that start with the path." + }, + "append_suffix": { + "type": "boolean", + "nullable": true, + "title": "Whether to append the incoming suffix to the redirected URL." + }, + "code": { + "type": "integer", + "enum": [ + 301, + 302, + 307, + 308 + ], + "title": "The redirect code to use." + }, + "expires": { + "type": "string", + "nullable": true, + "title": "The amount of time, in seconds, to cache the redirects." + } + }, + "required": [ + "regexp", + "to", + "prefix", + "append_suffix", + "code", + "expires" + ], + "additionalProperties": false + }, + "title": "The paths to redirect" + } + }, + "required": [ + "expires", + "paths" + ], + "additionalProperties": false, + "title": "The configuration of the redirects.", + "nullable": true, + "x-isDateTime": false + }, + "cache": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether the cache is enabled." + }, + "default_ttl": { + "type": "integer", + "title": "The TTL to apply when the response doesn't specify one. Only applies to static files." + }, + "cookies": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The cookies to take into account for the cache key." + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The headers to take into account for the cache key." + } + }, + "required": [ + "enabled", + "default_ttl", + "cookies", + "headers" + ], + "additionalProperties": false, + "title": "Cache configuration.", + "nullable": true, + "x-isDateTime": false + }, + "ssi": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether SSI include is enabled." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Server-Side Include configuration.", + "nullable": true, + "x-isDateTime": false + }, + "upstream": { + "type": "string", + "title": "The upstream to use for this route.", + "nullable": true, + "x-isDateTime": false + }, + "sticky": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether sticky routing is enabled." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Sticky routing configuration.", + "nullable": true, + "x-isDateTime": false + } + }, + "required": [ + "attributes", + "type", + "tls", + "to" + ], + "additionalProperties": false + }, + "RedirectRoute": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of RedirectRoute", + "nullable": true, + "x-isDateTime": false + }, + "primary": { + "type": "boolean", + "nullable": true, + "title": "This route is the primary route of the environment", + "x-isDateTime": false + }, + "production_url": { + "type": "string", + "nullable": true, + "title": "How this URL route would look on production environment", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "proxy", + "redirect", + "upstream" + ], + "title": "Route type.", + "x-isDateTime": false + }, + "tls": { + "type": "object", + "properties": { + "strict_transport_security": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Whether strict transport security is enabled or not." + }, + "include_subdomains": { + "type": "boolean", + "nullable": true, + "title": "Whether the strict transport security policy should include all subdomains." + }, + "preload": { + "type": "boolean", + "nullable": true, + "title": "Whether the strict transport security policy should be preloaded in browsers." + } + }, + "required": [ + "enabled", + "include_subdomains", + "preload" + ], + "additionalProperties": false, + "title": "Strict-Transport-Security options." + }, + "min_version": { + "type": "string", + "enum": [ + "TLSv1.0", + "TLSv1.1", + "TLSv1.2", + "TLSv1.3" + ], + "nullable": true, + "title": "The minimum TLS version to support." + }, + "client_authentication": { + "type": "string", + "enum": [ + "request", + "require" + ], + "nullable": true, + "title": "The type of client authentication to request." + }, + "client_certificate_authorities": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Certificate authorities to validate the client certificate against. If not specified, a default set of trusted CAs will be used." + } + }, + "required": [ + "strict_transport_security", + "min_version", + "client_authentication", + "client_certificate_authorities" + ], + "additionalProperties": false, + "title": "TLS settings for the route.", + "x-isDateTime": false + }, + "to": { + "type": "string", + "title": "Redirect destination", + "x-isDateTime": false + }, + "redirects": { + "type": "object", + "properties": { + "expires": { + "type": "string", + "title": "The amount of time, in seconds, to cache the redirects." + }, + "paths": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "regexp": { + "type": "boolean", + "title": "Whether the path is a regular expression." + }, + "to": { + "type": "string", + "title": "The URL to redirect to." + }, + "prefix": { + "type": "boolean", + "nullable": true, + "title": "Whether to redirect all the paths that start with the path." + }, + "append_suffix": { + "type": "boolean", + "nullable": true, + "title": "Whether to append the incoming suffix to the redirected URL." + }, + "code": { + "type": "integer", + "enum": [ + 301, + 302, + 307, + 308 + ], + "title": "The redirect code to use." + }, + "expires": { + "type": "string", + "nullable": true, + "title": "The amount of time, in seconds, to cache the redirects." + } + }, + "required": [ + "regexp", + "to", + "prefix", + "append_suffix", + "code", + "expires" + ], + "additionalProperties": false + }, + "title": "The paths to redirect" + } + }, + "required": [ + "expires", + "paths" + ], + "additionalProperties": false, + "title": "The configuration of the redirects.", + "nullable": true, + "x-isDateTime": false + }, + "cache": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether the cache is enabled." + }, + "default_ttl": { + "type": "integer", + "title": "The TTL to apply when the response doesn't specify one. Only applies to static files." + }, + "cookies": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The cookies to take into account for the cache key." + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The headers to take into account for the cache key." + } + }, + "required": [ + "enabled", + "default_ttl", + "cookies", + "headers" + ], + "additionalProperties": false, + "title": "Cache configuration.", + "nullable": true, + "x-isDateTime": false + }, + "ssi": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether SSI include is enabled." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Server-Side Include configuration.", + "nullable": true, + "x-isDateTime": false + }, + "upstream": { + "type": "string", + "title": "The upstream to use for this route.", + "nullable": true, + "x-isDateTime": false + }, + "sticky": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether sticky routing is enabled." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Sticky routing configuration.", + "nullable": true, + "x-isDateTime": false + } + }, + "required": [ + "attributes", + "type", + "tls", + "to" + ], + "additionalProperties": false + }, + "Ref": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Ref", + "x-isDateTime": false + }, + "ref": { + "type": "string", + "title": "The name of the reference", + "x-isDateTime": false + }, + "object": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "The type of object pointed to" + }, + "sha": { + "type": "string", + "title": "The SHA of the object pointed to" + } + }, + "required": [ + "type", + "sha" + ], + "additionalProperties": false, + "title": "The object the reference points to", + "x-isDateTime": false + }, + "sha": { + "type": "string", + "title": "The commit sha of the ref", + "x-isDateTime": false + } + }, + "required": [ + "id", + "ref", + "object", + "sha" + ], + "additionalProperties": false + }, + "RefCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Ref" + } + }, + "ReplacementDomainStorage": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of ReplacementDomainStorage", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Domain type", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "Project name", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "Domain name", + "x-isDateTime": false + }, + "registered_name": { + "type": "string", + "title": "Claimed domain name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "replacement_for": { + "type": "string", + "title": "Prod domain which will be replaced by this domain.", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "name", + "attributes" + ], + "additionalProperties": false + }, + "ReplacementDomainStorageCreateInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Domain name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "replacement_for": { + "type": "string", + "title": "Prod domain which will be replaced by this domain.", + "x-isDateTime": false + } + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "ReplacementDomainStoragePatch": { + "type": "object", + "properties": { + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "Route": { + "oneOf": [ + { + "$ref": "#/components/schemas/ProxyRoute" + }, + { + "$ref": "#/components/schemas/RedirectRoute" + }, + { + "$ref": "#/components/schemas/UpstreamRoute" + } + ] + }, + "RouteCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Route" + } + }, + "ScriptIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of ScriptIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "script": { + "type": "string", + "title": "The script to run", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "events", + "environments", + "excluded_environments", + "states", + "result", + "script" + ], + "additionalProperties": false + }, + "ScriptIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "script": { + "type": "string", + "title": "The script to run", + "x-isDateTime": false + } + }, + "required": [ + "type", + "script" + ], + "additionalProperties": false + }, + "ScriptIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "script": { + "type": "string", + "title": "The script to run", + "x-isDateTime": false + } + }, + "required": [ + "type", + "script" + ], + "additionalProperties": false + }, + "SlackIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of SlackIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "channel": { + "type": "string", + "title": "The Slack channel to post messages to", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "channel" + ], + "additionalProperties": false + }, + "SlackIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The Slack token to use", + "x-isDateTime": false + }, + "channel": { + "type": "string", + "title": "The Slack channel to post messages to", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "channel" + ], + "additionalProperties": false + }, + "SlackIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The Slack token to use", + "x-isDateTime": false + }, + "channel": { + "type": "string", + "title": "The Slack channel to post messages to", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "channel" + ], + "additionalProperties": false + }, + "SplunkIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of SplunkIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The Splunk HTTP Event Connector REST API endpoint", + "x-isDateTime": false + }, + "index": { + "type": "string", + "title": "The Splunk Index", + "x-isDateTime": false + }, + "sourcetype": { + "type": "string", + "title": "The event 'sourcetype'", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "extra", + "url", + "index", + "sourcetype", + "tls_verify", + "excluded_services" + ], + "additionalProperties": false + }, + "SplunkIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The Splunk HTTP Event Connector REST API endpoint", + "x-isDateTime": false + }, + "index": { + "type": "string", + "title": "The Splunk Index", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The Splunk Authorization Token", + "x-isDateTime": false + }, + "sourcetype": { + "type": "string", + "title": "The event 'sourcetype'", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url", + "index", + "token" + ], + "additionalProperties": false + }, + "SplunkIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The Splunk HTTP Event Connector REST API endpoint", + "x-isDateTime": false + }, + "index": { + "type": "string", + "title": "The Splunk Index", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The Splunk Authorization Token", + "x-isDateTime": false + }, + "sourcetype": { + "type": "string", + "title": "The event 'sourcetype'", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url", + "index", + "token" + ], + "additionalProperties": false + }, + "SumologicIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of SumologicIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The Sumologic HTTPS endpoint", + "x-isDateTime": false + }, + "category": { + "type": "string", + "title": "The Category used to easy filtering (sent as X-Sumo-Category header)", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "extra", + "url", + "category", + "tls_verify", + "excluded_services" + ], + "additionalProperties": false + }, + "SumologicIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The Sumologic HTTPS endpoint", + "x-isDateTime": false + }, + "category": { + "type": "string", + "title": "The Category used to easy filtering (sent as X-Sumo-Category header)", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "SumologicIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The Sumologic HTTPS endpoint", + "x-isDateTime": false + }, + "category": { + "type": "string", + "title": "The Category used to easy filtering (sent as X-Sumo-Category header)", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "SyslogIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of SyslogIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "host": { + "type": "string", + "title": "Syslog relay/collector host", + "x-isDateTime": false + }, + "port": { + "type": "integer", + "title": "Syslog relay/collector port", + "x-isDateTime": false + }, + "protocol": { + "type": "string", + "enum": [ + "tcp", + "tls", + "udp" + ], + "title": "Transport protocol", + "x-isDateTime": false + }, + "facility": { + "type": "integer", + "title": "Syslog facility", + "x-isDateTime": false + }, + "message_format": { + "type": "string", + "enum": [ + "rfc3164", + "rfc5424" + ], + "title": "Syslog message format", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "extra", + "host", + "port", + "protocol", + "facility", + "message_format", + "tls_verify", + "excluded_services" + ], + "additionalProperties": false + }, + "SyslogIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "host": { + "type": "string", + "title": "Syslog relay/collector host", + "x-isDateTime": false + }, + "port": { + "type": "integer", + "title": "Syslog relay/collector port", + "x-isDateTime": false + }, + "protocol": { + "type": "string", + "enum": [ + "tcp", + "tls", + "udp" + ], + "title": "Transport protocol", + "x-isDateTime": false + }, + "facility": { + "type": "integer", + "title": "Syslog facility", + "x-isDateTime": false + }, + "message_format": { + "type": "string", + "enum": [ + "rfc3164", + "rfc5424" + ], + "title": "Syslog message format", + "x-isDateTime": false + }, + "auth_token": { + "type": "string", + "title": "Authentication token", + "x-isDateTime": false + }, + "auth_mode": { + "type": "string", + "enum": [ + "prefix", + "structured_data" + ], + "title": "Authentication mode", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + "SyslogIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "host": { + "type": "string", + "title": "Syslog relay/collector host", + "x-isDateTime": false + }, + "port": { + "type": "integer", + "title": "Syslog relay/collector port", + "x-isDateTime": false + }, + "protocol": { + "type": "string", + "enum": [ + "tcp", + "tls", + "udp" + ], + "title": "Transport protocol", + "x-isDateTime": false + }, + "facility": { + "type": "integer", + "title": "Syslog facility", + "x-isDateTime": false + }, + "message_format": { + "type": "string", + "enum": [ + "rfc3164", + "rfc5424" + ], + "title": "Syslog message format", + "x-isDateTime": false + }, + "auth_token": { + "type": "string", + "title": "Authentication token", + "x-isDateTime": false + }, + "auth_mode": { + "type": "string", + "enum": [ + "prefix", + "structured_data" + ], + "title": "Authentication mode", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + "SystemInformation": { + "type": "object", + "properties": { + "version": { + "type": "string", + "title": "The version of this project server", + "x-isDateTime": false + }, + "image": { + "type": "string", + "title": "The image version of the project server", + "x-isDateTime": false + }, + "started_at": { + "type": "string", + "format": "date-time", + "title": "Started At", + "x-isDateTime": true + } + }, + "required": [ + "version", + "image", + "started_at" + ], + "additionalProperties": false + }, + "Tree": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Tree", + "x-isDateTime": false + }, + "sha": { + "type": "string", + "title": "The identifier of the tree", + "x-isDateTime": false + }, + "tree": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "title": "The path of the item" + }, + "mode": { + "type": "string", + "enum": [ + "040000", + "100644", + "100755", + "120000", + "160000" + ], + "title": "The mode of the item" + }, + "type": { + "type": "string", + "title": "The type of the item (blob or tree)" + }, + "sha": { + "type": "string", + "nullable": true, + "title": "The sha of the item" + } + }, + "required": [ + "path", + "mode", + "type", + "sha" + ], + "additionalProperties": false + }, + "title": "The tree items", + "x-isDateTime": false + } + }, + "required": [ + "id", + "sha", + "tree" + ], + "additionalProperties": false + }, + "UpstreamRoute": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of UpstreamRoute", + "nullable": true, + "x-isDateTime": false + }, + "primary": { + "type": "boolean", + "nullable": true, + "title": "This route is the primary route of the environment", + "x-isDateTime": false + }, + "production_url": { + "type": "string", + "nullable": true, + "title": "How this URL route would look on production environment", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "proxy", + "redirect", + "upstream" + ], + "title": "Route type.", + "x-isDateTime": false + }, + "tls": { + "type": "object", + "properties": { + "strict_transport_security": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Whether strict transport security is enabled or not." + }, + "include_subdomains": { + "type": "boolean", + "nullable": true, + "title": "Whether the strict transport security policy should include all subdomains." + }, + "preload": { + "type": "boolean", + "nullable": true, + "title": "Whether the strict transport security policy should be preloaded in browsers." + } + }, + "required": [ + "enabled", + "include_subdomains", + "preload" + ], + "additionalProperties": false, + "title": "Strict-Transport-Security options." + }, + "min_version": { + "type": "string", + "enum": [ + "TLSv1.0", + "TLSv1.1", + "TLSv1.2", + "TLSv1.3" + ], + "nullable": true, + "title": "The minimum TLS version to support." + }, + "client_authentication": { + "type": "string", + "enum": [ + "request", + "require" + ], + "nullable": true, + "title": "The type of client authentication to request." + }, + "client_certificate_authorities": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Certificate authorities to validate the client certificate against. If not specified, a default set of trusted CAs will be used." + } + }, + "required": [ + "strict_transport_security", + "min_version", + "client_authentication", + "client_certificate_authorities" + ], + "additionalProperties": false, + "title": "TLS settings for the route.", + "x-isDateTime": false + }, + "cache": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether the cache is enabled." + }, + "default_ttl": { + "type": "integer", + "title": "The TTL to apply when the response doesn't specify one. Only applies to static files." + }, + "cookies": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The cookies to take into account for the cache key." + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The headers to take into account for the cache key." + } + }, + "required": [ + "enabled", + "default_ttl", + "cookies", + "headers" + ], + "additionalProperties": false, + "title": "Cache configuration.", + "nullable": true, + "x-isDateTime": false + }, + "ssi": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether SSI include is enabled." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Server-Side Include configuration.", + "nullable": true, + "x-isDateTime": false + }, + "upstream": { + "type": "string", + "title": "The upstream to use for this route.", + "nullable": true, + "x-isDateTime": false + }, + "redirects": { + "type": "object", + "properties": { + "expires": { + "type": "string", + "title": "The amount of time, in seconds, to cache the redirects." + }, + "paths": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "regexp": { + "type": "boolean", + "title": "Whether the path is a regular expression." + }, + "to": { + "type": "string", + "title": "The URL to redirect to." + }, + "prefix": { + "type": "boolean", + "nullable": true, + "title": "Whether to redirect all the paths that start with the path." + }, + "append_suffix": { + "type": "boolean", + "nullable": true, + "title": "Whether to append the incoming suffix to the redirected URL." + }, + "code": { + "type": "integer", + "enum": [ + 301, + 302, + 307, + 308 + ], + "title": "The redirect code to use." + }, + "expires": { + "type": "string", + "nullable": true, + "title": "The amount of time, in seconds, to cache the redirects." + } + }, + "required": [ + "regexp", + "to", + "prefix", + "append_suffix", + "code", + "expires" + ], + "additionalProperties": false + }, + "title": "The paths to redirect" + } + }, + "required": [ + "expires", + "paths" + ], + "additionalProperties": false, + "title": "The configuration of the redirects.", + "nullable": true, + "x-isDateTime": false + }, + "sticky": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether sticky routing is enabled." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Sticky routing configuration.", + "nullable": true, + "x-isDateTime": false + }, + "to": { + "type": "string", + "title": "Proxy destination", + "nullable": true, + "x-isDateTime": false + } + }, + "required": [ + "attributes", + "type", + "tls" + ], + "additionalProperties": false + }, + "Version": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Version", + "x-isDateTime": false + }, + "commit": { + "type": "string", + "nullable": true, + "title": "The SHA of the commit of this version", + "x-isDateTime": false + }, + "locked": { + "type": "boolean", + "title": "Whether this version is locked and cannot be modified", + "x-isDateTime": false + }, + "routing": { + "type": "object", + "properties": { + "percentage": { + "type": "integer", + "title": "The percentage of traffic routed to this version" + } + }, + "required": [ + "percentage" + ], + "additionalProperties": false, + "title": "Configuration about the traffic routed to this version", + "x-isDateTime": false + } + }, + "required": [ + "id", + "commit", + "locked", + "routing" + ], + "additionalProperties": false + }, + "VersionCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Version" + } + }, + "VersionCreateInput": { + "type": "object", + "properties": { + "routing": { + "type": "object", + "properties": { + "percentage": { + "type": "integer", + "title": "The percentage of traffic routed to this version" + } + }, + "additionalProperties": false, + "title": "Configuration about the traffic routed to this version", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "VersionPatch": { + "type": "object", + "properties": { + "routing": { + "type": "object", + "properties": { + "percentage": { + "type": "integer", + "title": "The percentage of traffic routed to this version" + } + }, + "additionalProperties": false, + "title": "Configuration about the traffic routed to this version", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "WebHookIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of WebHookIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "shared_key": { + "type": "string", + "nullable": true, + "title": "The JWS shared secret key", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The URL of the webhook", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "events", + "environments", + "excluded_environments", + "states", + "result", + "shared_key", + "url" + ], + "additionalProperties": false + }, + "WebHookIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "shared_key": { + "type": "string", + "nullable": true, + "title": "The JWS shared secret key", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The URL of the webhook", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "WebHookIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "shared_key": { + "type": "string", + "nullable": true, + "title": "The JWS shared secret key", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The URL of the webhook", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "AutoscalerAlertPartial": { + "properties": { + "name": { + "description": "User friendly name for the alert", + "title": "Name", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "User friendly name for the alert" + ] + }, + "environment": { + "type": "string", + "nullable": true, + "title": "Environment", + "description": "Environment for which the alert was received", + "x-isDateTime": false, + "x-description": [ + "Environment for which the alert was received" + ] + }, + "service": { + "description": "Service for which the alert was received", + "title": "Service", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Service for which the alert was received" + ] + }, + "resource": { + "type": "string", + "nullable": true, + "title": "Resource", + "description": "Name of resource that triggered the alert", + "x-isDateTime": false, + "x-description": [ + "Name of resource that triggered the alert" + ] + }, + "condition": { + "description": "Comparison condition to use when evaluating the alert", + "title": "Condition", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Comparison condition to use when evaluating the alert" + ] + }, + "threshold": { + "description": "Value that has to be crossed for the alert to be considered triggered", + "title": "Threshold", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "Value that has to be crossed for the alert to be considered triggered" + ] + }, + "duration": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerDuration" + }, + "nullable": true, + "description": "Number of seconds during which the condition was satisfied", + "x-isDateTime": false, + "x-description": [ + "Number of seconds during which the condition was satisfied" + ] + }, + "value": { + "description": "Current value for the received alert", + "title": "Value", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "Current value for the received alert" + ] + } + }, + "required": [ + "name", + "service", + "condition", + "threshold", + "value" + ], + "title": "AutoscalerAlertPartial", + "type": "object" + }, + "AutoscalerCPUPressureTrigger": { + "description": "CPU pressure trigger settings.\n\nWhen CPU pressure goes below lower bound, service will be scaled down.\nWhen CPU pressure goes above upper bound, service will be scaled up.", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Enabled", + "description": "Whether the trigger is enabled", + "x-isDateTime": false, + "x-description": [ + "Whether the trigger is enabled" + ] + }, + "down": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Lower bound on resource usage" + } + ], + "x-isDateTime": false + }, + "up": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Upper bound on resource usage" + } + ], + "x-isDateTime": false + } + }, + "title": "AutoscalerCPUPressureTrigger", + "type": "object", + "x-description": [ + "CPU pressure trigger settings. When CPU pressure goes below lower bound, service will be scaled down. When CPU", + "pressure goes above upper bound, service will be scaled up." + ] + }, + "AutoscalerCPUResources": { + "description": "CPU scaling settings", + "properties": { + "min": { + "description": "Minimum CPUs when scaling down vertically", + "minimum": 0, + "title": "Min", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "Minimum CPUs when scaling down vertically" + ] + }, + "max": { + "description": "Maximum CPUs when scaling up vertically", + "minimum": 0, + "title": "Max", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "Maximum CPUs when scaling up vertically" + ] + } + }, + "title": "AutoscalerCPUResources", + "type": "object", + "x-description": [ + "CPU scaling settings" + ] + }, + "AutoscalerCPUTrigger": { + "description": "CPU resource trigger settings.\n\nWhen CPU usage goes below lower bound, service will be scaled down.\nWhen CPU usage goes above upper bound, service will be scaled up.", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Enabled", + "description": "Whether the trigger is enabled", + "x-isDateTime": false, + "x-description": [ + "Whether the trigger is enabled" + ] + }, + "down": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Lower bound on resource usage" + } + ], + "x-isDateTime": false + }, + "up": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Upper bound on resource usage" + } + ], + "x-isDateTime": false + } + }, + "title": "AutoscalerCPUTrigger", + "type": "object", + "x-description": [ + "CPU resource trigger settings. When CPU usage goes below lower bound, service will be scaled down. When CPU usage", + "goes above upper bound, service will be scaled up." + ] + }, + "AutoscalerCondition": { + "description": "Trigger condition settings", + "properties": { + "threshold": { + "description": "Value at which the condition is satisfied", + "maximum": 100, + "minimum": 0, + "title": "Threshold", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "Value at which the condition is satisfied" + ] + }, + "duration": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerDuration" + }, + { + "description": "Number of seconds during which the condition must be satisfied" + } + ], + "x-isDateTime": false + }, + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Enabled", + "description": "Whether the condition should be used for generating alerts", + "x-isDateTime": false, + "x-description": [ + "Whether the condition should be used for generating alerts" + ] + } + }, + "required": [ + "threshold" + ], + "title": "AutoscalerCondition", + "type": "object", + "x-description": [ + "Trigger condition settings" + ] + }, + "AutoscalerDuration": { + "enum": [ + 60, + 120, + 300, + 600, + 1800, + 3600 + ], + "title": "AutoscalerDuration", + "type": "integer" + }, + "AutoscalerEmptyBody": { + "description": "Empty body", + "properties": {}, + "title": "AutoscalerEmptyBody", + "type": "object", + "x-description": [ + "Empty body" + ] + }, + "AutoscalerInstances": { + "description": "Horizontal scaling settings", + "properties": { + "min": { + "description": "Minimum number of instances when scaling down horizontally", + "title": "Min", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Minimum number of instances when scaling down horizontally" + ] + }, + "max": { + "description": "Maximum number of instances when scaling up horizontally", + "title": "Max", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Maximum number of instances when scaling up horizontally" + ] + } + }, + "title": "AutoscalerInstances", + "type": "object", + "x-description": [ + "Horizontal scaling settings" + ] + }, + "AutoscalerMemoryPressureTrigger": { + "description": "Memory pressure trigger settings.\n\nWhen memory pressure goes below lower bound, service will be scaled down.\nWhen memory pressure goes above upper bound, service will be scaled up.", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Enabled", + "description": "Whether the trigger is enabled", + "x-isDateTime": false, + "x-description": [ + "Whether the trigger is enabled" + ] + }, + "down": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Lower bound on resource usage" + } + ], + "x-isDateTime": false + }, + "up": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Upper bound on resource usage" + } + ], + "x-isDateTime": false + } + }, + "title": "AutoscalerMemoryPressureTrigger", + "type": "object", + "x-description": [ + "Memory pressure trigger settings. When memory pressure goes below lower bound, service will be scaled down. When", + "memory pressure goes above upper bound, service will be scaled up." + ] + }, + "AutoscalerMemoryResources": { + "description": "Memory scaling settings", + "properties": { + "min": { + "description": "Minimum memory (bytes) when scaling down vertically", + "minimum": 0, + "title": "Min", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Minimum memory (bytes) when scaling down vertically" + ] + }, + "max": { + "description": "Maximum memory (bytes) when scaling up vertically", + "minimum": 0, + "title": "Max", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Maximum memory (bytes) when scaling up vertically" + ] + } + }, + "title": "AutoscalerMemoryResources", + "type": "object", + "x-description": [ + "Memory scaling settings" + ] + }, + "AutoscalerMemoryTrigger": { + "description": "Memory resource trigger settings.\n\nWhen memory usage goes below lower bound, service will be scaled down.\nWhen memory usage goes above upper bound, service will be scaled up.", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Enabled", + "description": "Whether the trigger is enabled", + "x-isDateTime": false, + "x-description": [ + "Whether the trigger is enabled" + ] + }, + "down": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Lower bound on resource usage" + } + ], + "x-isDateTime": false + }, + "up": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Upper bound on resource usage" + } + ], + "x-isDateTime": false + } + }, + "title": "AutoscalerMemoryTrigger", + "type": "object", + "x-description": [ + "Memory resource trigger settings. When memory usage goes below lower bound, service will be scaled down. When", + "memory usage goes above upper bound, service will be scaled up." + ] + }, + "AutoscalerResources": { + "description": "Vertical scaling settings", + "properties": { + "cpu": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerCPUResources" + }, + "nullable": true, + "description": "Lower/Upper bounds on CPU allocation when scaling", + "x-isDateTime": false, + "x-description": [ + "Lower/Upper bounds on CPU allocation when scaling" + ] + }, + "memory": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerMemoryResources" + }, + "nullable": true, + "description": "Lower/Upper bounds on Memory allocation when scaling", + "x-isDateTime": false, + "x-description": [ + "Lower/Upper bounds on Memory allocation when scaling" + ] + } + }, + "title": "AutoscalerResources", + "type": "object", + "x-description": [ + "Vertical scaling settings" + ] + }, + "AutoscalerScalingCooldown": { + "description": "Scaling cooldown settings", + "properties": { + "up": { + "description": "Number of seconds to wait until scaling up can be done again (since last attempt)", + "minimum": 0, + "title": "Up", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Number of seconds to wait until scaling up can be done again (since last attempt)" + ] + }, + "down": { + "description": "Number of seconds to wait until scaling down can be done again (since last attempt)", + "minimum": 0, + "title": "Down", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Number of seconds to wait until scaling down can be done again (since last attempt)" + ] + } + }, + "title": "AutoscalerScalingCooldown", + "type": "object", + "x-description": [ + "Scaling cooldown settings" + ] + }, + "AutoscalerScalingFactor": { + "description": "Scaling factor settings", + "properties": { + "up": { + "description": "Number of instances to add when scaling up horizontally", + "minimum": 0, + "title": "Up", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Number of instances to add when scaling up horizontally" + ] + }, + "down": { + "description": "Number of instances to remove when scaling down horizontally", + "minimum": 0, + "title": "Down", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Number of instances to remove when scaling down horizontally" + ] + } + }, + "title": "AutoscalerScalingFactor", + "type": "object", + "x-description": [ + "Scaling factor settings" + ] + }, + "AutoscalerServiceSettings": { + "description": "Autoscaling settings for a specific service", + "properties": { + "triggers": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerTriggers" + }, + { + "description": "Metrics should be evaluated as triggers for autoscaling" + } + ], + "x-isDateTime": false + }, + "instances": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerInstances" + }, + { + "description": "Lower/Upper bounds on number of instances for horizontal scaling" + } + ], + "x-isDateTime": false + }, + "resources": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerResources" + }, + { + "description": "Lower/Upper bounds on cpu/memory for vertical scaling" + } + ], + "x-isDateTime": false + }, + "scale_factor": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerScalingFactor" + }, + { + "description": "How many instances to add/remove on each scaling attempt" + } + ], + "x-isDateTime": false + }, + "scale_cooldown": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerScalingCooldown" + }, + { + "description": "How long to wait before the next scaling attempt can be performed" + } + ], + "x-isDateTime": false + } + }, + "title": "AutoscalerServiceSettings", + "type": "object", + "x-description": [ + "Autoscaling settings for a specific service" + ] + }, + "AutoscalerSettings": { + "description": "Update model for autoscaling settings.\n\nThis model is mainly used for partial updates (PATCH), therefore all its\nattributes are optional.", + "properties": { + "services": { + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerServiceSettings" + }, + "nullable": true + }, + "type": "object", + "nullable": true, + "title": "Services", + "description": "Each service for which autoscaling is configured is listed in the key", + "x-isDateTime": false, + "x-description": [ + "Each service for which autoscaling is configured is listed in the key" + ] + } + }, + "title": "AutoscalerSettings", + "type": "object", + "x-description": [ + "Update model for autoscaling settings. This model is mainly used for partial updates (PATCH), therefore all its", + "attributes are optional." + ] + }, + "AutoscalerTriggers": { + "additionalProperties": false, + "description": "Scaling triggers settings", + "properties": { + "cpu": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerCPUTrigger" + }, + "nullable": true, + "description": "Settings for scaling based on CPU usage", + "x-isDateTime": false, + "x-description": [ + "Settings for scaling based on CPU usage" + ] + }, + "memory": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerMemoryTrigger" + }, + "nullable": true, + "description": "Settings for scaling based on Memory usage", + "x-isDateTime": false, + "x-description": [ + "Settings for scaling based on Memory usage" + ] + }, + "cpu_pressure": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerCPUPressureTrigger" + }, + "nullable": true, + "description": "Settings for scaling based on CPU pressure", + "x-isDateTime": false, + "x-description": [ + "Settings for scaling based on CPU pressure" + ] + }, + "memory_pressure": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerMemoryPressureTrigger" + }, + "nullable": true, + "description": "Settings for scaling based on Memory pressure", + "x-isDateTime": false, + "x-description": [ + "Settings for scaling based on Memory pressure" + ] + } + }, + "title": "AutoscalerTriggers", + "type": "object", + "x-description": [ + "Scaling triggers settings" + ] + }, + "Invoice": { + "type": "object", + "description": "The invoice object.", + "properties": { + "id": { + "type": "string", + "description": "The invoice id.", + "x-isDateTime": false, + "x-description": [ + "The invoice id." + ] + }, + "invoice_number": { + "description": "The invoice number.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The invoice number." + ] + }, + "type": { + "description": "Invoice type.", + "type": "string", + "enum": [ + "invoice", + "credit_memo" + ], + "x-isDateTime": false, + "x-description": [ + "Invoice type." + ] + }, + "order_id": { + "description": "The id of the related order.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The id of the related order." + ] + }, + "related_invoice_id": { + "description": "If the invoice is a credit memo (type=credit_memo), this field stores the id of the related/original invoice.", + "type": "string", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "If the invoice is a credit memo (type=credit_memo), this field stores the id of the related/original invoice." + ] + }, + "status": { + "description": "The invoice status.", + "type": "string", + "enum": [ + "paid", + "charged_off", + "pending", + "refunded", + "canceled", + "refund_pending" + ], + "x-isDateTime": false, + "x-description": [ + "The invoice status." + ] + }, + "owner": { + "description": "The ULID of the owner.", + "type": "string", + "format": "ulid", + "x-isDateTime": false, + "x-description": [ + "The ULID of the owner." + ] + }, + "invoice_date": { + "description": "The invoice date.", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The invoice date." + ] + }, + "invoice_due": { + "description": "The invoice due date.", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The invoice due date." + ] + }, + "created": { + "description": "The time when the invoice was created.", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The time when the invoice was created." + ] + }, + "changed": { + "description": "The time when the invoice was changed.", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The time when the invoice was changed." + ] + }, + "company": { + "description": "Company name (if any).", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Company name (if any)." + ] + }, + "total": { + "description": "The invoice total.", + "type": "number", + "format": "double", + "x-isDateTime": false, + "x-description": [ + "The invoice total." + ] + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "notes": { + "description": "The invoice note.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The invoice note." + ] + }, + "invoice_pdf": { + "$ref": "#/components/schemas/InvoicePDF" + } + }, + "x-description": [ + "The invoice object." + ] + }, + "Organization": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "ulid", + "description": "The ID of the organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization." + ] + }, + "type": { + "type": "string", + "description": "The type of the organization.", + "enum": [ + "fixed", + "flexible" + ], + "x-isDateTime": false, + "x-description": [ + "The type of the organization." + ] + }, + "owner_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the owner.", + "x-isDateTime": false, + "x-description": [ + "The ID of the owner." + ] + }, + "namespace": { + "type": "string", + "description": "The namespace in which the organization name is unique.", + "x-isDateTime": false, + "x-description": [ + "The namespace in which the organization name is unique." + ] + }, + "name": { + "type": "string", + "description": "A unique machine name representing the organization.", + "x-isDateTime": false, + "x-description": [ + "A unique machine name representing the organization." + ] + }, + "label": { + "type": "string", + "description": "The human-readable label of the organization.", + "x-isDateTime": false, + "x-description": [ + "The human-readable label of the organization." + ] + }, + "country": { + "type": "string", + "description": "The organization country (2-letter country code).", + "maxLength": 2, + "x-isDateTime": false, + "x-description": [ + "The organization country (2-letter country code)." + ] + }, + "capabilities": { + "type": "array", + "description": "The organization capabilities.", + "items": { + "type": "string" + }, + "uniqueItems": true, + "x-isDateTime": false, + "x-description": [ + "The organization capabilities." + ] + }, + "vendor": { + "type": "string", + "description": "The vendor.", + "x-isDateTime": false, + "x-description": [ + "The vendor." + ] + }, + "billing_account_id": { + "type": "string", + "description": "The Billing Account ID.", + "x-isDateTime": false, + "x-description": [ + "The Billing Account ID." + ] + }, + "billing_legacy": { + "type": "boolean", + "description": "Whether the account is billed with the legacy system.", + "x-isDateTime": false, + "x-description": [ + "Whether the account is billed with the legacy system." + ] + }, + "status": { + "type": "string", + "description": "The status of the organization.", + "enum": [ + "active", + "restricted", + "suspended", + "deleted" + ], + "x-isDateTime": false, + "x-description": [ + "The status of the organization." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the organization was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the organization was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the organization was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the organization was last updated." + ] + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current organization.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization." + ] + }, + "update": { + "type": "object", + "description": "Link for updating the current organization.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for updating the current organization." + ] + }, + "delete": { + "type": "object", + "description": "Link for deleting the current organization.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for deleting the current organization." + ] + }, + "members": { + "type": "object", + "description": "Link to the current organization's members.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's members." + ] + }, + "create-member": { + "type": "object", + "description": "Link for creating a new organization member.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for creating a new organization member." + ] + }, + "address": { + "type": "object", + "description": "Link to the current organization's address.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's address." + ] + }, + "profile": { + "type": "object", + "description": "Link to the current organization's profile.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's profile." + ] + }, + "payment-source": { + "type": "object", + "description": "Link to the current organization's payment source.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's payment source." + ] + }, + "orders": { + "type": "object", + "description": "Link to the current organization's orders.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's orders." + ] + }, + "vouchers": { + "type": "object", + "description": "Link to the current organization's vouchers.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's vouchers." + ] + }, + "apply-voucher": { + "type": "object", + "description": "Link for applying a voucher for the current organization.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for applying a voucher for the current organization." + ] + }, + "subscriptions": { + "type": "object", + "description": "Link to the current organization's subscriptions.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's subscriptions." + ] + }, + "create-subscription": { + "type": "object", + "description": "Link for creating a new organization subscription.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for creating a new organization subscription." + ] + }, + "estimate-subscription": { + "type": "object", + "description": "Link for estimating the price of a new subscription.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link for estimating the price of a new subscription." + ] + }, + "mfa-enforcement": { + "type": "object", + "description": "Link to the current organization's MFA enforcement settings.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's MFA enforcement settings." + ] + } + } + } + } + }, + "OrganizationReference": { + "description": "The referenced organization, or null if it no longer exists.", + "type": "object", + "nullable": true, + "properties": { + "id": { + "type": "string", + "format": "ulid", + "description": "The ID of the organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization." + ] + }, + "type": { + "type": "string", + "description": "The type of the organization.", + "x-isDateTime": false, + "x-description": [ + "The type of the organization." + ] + }, + "owner_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the owner.", + "x-isDateTime": false, + "x-description": [ + "The ID of the owner." + ] + }, + "name": { + "type": "string", + "description": "A unique machine name representing the organization.", + "x-isDateTime": false, + "x-description": [ + "A unique machine name representing the organization." + ] + }, + "label": { + "type": "string", + "description": "The human-readable label of the organization.", + "x-isDateTime": false, + "x-description": [ + "The human-readable label of the organization." + ] + }, + "vendor": { + "type": "string", + "description": "The vendor.", + "x-isDateTime": false, + "x-description": [ + "The vendor." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the organization was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the organization was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the organization was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the organization was last updated." + ] + } + }, + "x-description": [ + "The referenced organization, or null if it no longer exists." + ] + }, + "OrganizationMember": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "deprecated": true, + "x-isDateTime": false, + "x-description": [ + "The ID of the user." + ] + }, + "organization_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization." + ] + }, + "user_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-isDateTime": false, + "x-description": [ + "The ID of the user." + ] + }, + "permissions": { + "$ref": "#/components/schemas/Permissions" + }, + "level": { + "type": "string", + "description": "Access level of the member.", + "enum": [ + "admin", + "viewer" + ], + "x-isDateTime": false, + "x-description": [ + "Access level of the member." + ] + }, + "owner": { + "type": "boolean", + "description": "Whether the member is the organization owner.", + "x-isDateTime": false, + "x-description": [ + "Whether the member is the organization owner." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the member was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the member was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the member was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the member was last updated." + ] + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current member.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current member." + ] + }, + "update": { + "type": "object", + "description": "Link for updating the current member.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for updating the current member." + ] + }, + "delete": { + "type": "object", + "description": "Link for deleting the current member.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for deleting the current member." + ] + } + } + } + } + }, + "Vouchers": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "description": "The uuid of the user.", + "x-isDateTime": false, + "x-description": [ + "The uuid of the user." + ] + }, + "vouchers_total": { + "type": "string", + "description": "The total voucher credit given to the user.", + "x-isDateTime": false, + "x-description": [ + "The total voucher credit given to the user." + ] + }, + "vouchers_applied": { + "type": "string", + "description": "The part of total voucher credit applied to orders.", + "x-isDateTime": false, + "x-description": [ + "The part of total voucher credit applied to orders." + ] + }, + "vouchers_remaining_balance": { + "type": "string", + "description": "The remaining voucher credit, available for future orders.", + "x-isDateTime": false, + "x-description": [ + "The remaining voucher credit, available for future orders." + ] + }, + "currency": { + "type": "string", + "description": "The currency of the vouchers.", + "x-isDateTime": false, + "x-description": [ + "The currency of the vouchers." + ] + }, + "vouchers": { + "description": "Array of vouchers.", + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The voucher code." + }, + "amount": { + "type": "string", + "description": "The total voucher credit." + }, + "currency": { + "type": "string", + "description": "The currency of the voucher." + }, + "orders": { + "type": "array", + "description": "Array of orders to which a voucher applied.", + "items": { + "type": "object", + "properties": { + "order_id": { + "type": "string", + "description": "The id of the order." + }, + "status": { + "type": "string", + "description": "The status of the order." + }, + "billing_period_start": { + "type": "string", + "description": "The billing period start timestamp of the order (ISO 8601)." + }, + "billing_period_end": { + "type": "string", + "description": "The billing period end timestamp of the order (ISO 8601)." + }, + "order_total": { + "type": "string", + "description": "The total of the order." + }, + "order_discount": { + "type": "string", + "description": "The total voucher credit applied to the order." + }, + "currency": { + "type": "string", + "description": "The currency of the order." + } + } + } + } + } + }, + "x-isDateTime": false, + "x-description": [ + "Array of vouchers." + ] + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current resource.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current resource." + ] + } + } + } + } + }, + "Permissions": { + "type": "array", + "description": "The organization member permissions.", + "items": { + "type": "string", + "enum": [ + "admin", + "billing", + "members", + "plans", + "projects:create", + "projects:list" + ] + }, + "x-description": [ + "The organization member permissions." + ] + }, + "EstimationObject": { + "type": "object", + "description": "A price estimate object.", + "properties": { + "plan": { + "type": "string", + "description": "The monthly price of the plan.", + "x-isDateTime": false, + "x-description": [ + "The monthly price of the plan." + ] + }, + "user_licenses": { + "type": "string", + "description": "The monthly price of the user licenses.", + "x-isDateTime": false, + "x-description": [ + "The monthly price of the user licenses." + ] + }, + "environments": { + "type": "string", + "description": "The monthly price of the environments.", + "x-isDateTime": false, + "x-description": [ + "The monthly price of the environments." + ] + }, + "storage": { + "type": "string", + "description": "The monthly price of the storage.", + "x-isDateTime": false, + "x-description": [ + "The monthly price of the storage." + ] + }, + "total": { + "type": "string", + "description": "The total monthly price.", + "x-isDateTime": false, + "x-description": [ + "The total monthly price." + ] + }, + "options": { + "type": "object", + "description": "The unit prices of the options.", + "x-isDateTime": false, + "x-description": [ + "The unit prices of the options." + ] + } + }, + "x-description": [ + "A price estimate object." + ] + }, + "OrganizationEstimationObject": { + "type": "object", + "description": "An estimation of all organization spend.", + "properties": { + "total": { + "type": "string", + "description": "The total estimated price for the organization.", + "x-isDateTime": false, + "x-description": [ + "The total estimated price for the organization." + ] + }, + "sub_total": { + "type": "string", + "description": "The sub total for all projects and sellables.", + "x-isDateTime": false, + "x-description": [ + "The sub total for all projects and sellables." + ] + }, + "vouchers": { + "type": "string", + "description": "The total amount of vouchers.", + "x-isDateTime": false, + "x-description": [ + "The total amount of vouchers." + ] + }, + "user_licenses": { + "type": "object", + "description": "An estimation of user licenses cost.", + "properties": { + "base": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "The number of base user licenses.", + "x-description": [ + "The number of base user licenses." + ] + }, + "total": { + "type": "string", + "description": "The total price for base user licenses.", + "x-description": [ + "The total price for base user licenses." + ] + }, + "list": { + "type": "object", + "properties": { + "admin_user": { + "type": "object", + "description": "An estimation of admin users cost.", + "properties": { + "count": { + "type": "integer", + "description": "The number of admin user licenses.", + "x-description": [ + "The number of admin user licenses." + ] + }, + "total": { + "type": "string", + "description": "The total price for admin user licenses.", + "x-description": [ + "The total price for admin user licenses." + ] + } + }, + "x-description": [ + "An estimation of admin users cost." + ] + }, + "viewer_user": { + "type": "object", + "description": "An estimation of viewer users cost.", + "properties": { + "count": { + "type": "integer", + "description": "The number of viewer user licenses.", + "x-description": [ + "The number of viewer user licenses." + ] + }, + "total": { + "type": "string", + "description": "The total price for viewer user licenses.", + "x-description": [ + "The total price for viewer user licenses." + ] + } + }, + "x-description": [ + "An estimation of viewer users cost." + ] + } + } + } + } + }, + "user_management": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "The number of user_management licenses.", + "x-description": [ + "The number of user_management licenses." + ] + }, + "total": { + "type": "string", + "description": "The total price for user_management licenses.", + "x-description": [ + "The total price for user_management licenses." + ] + }, + "list": { + "type": "object", + "properties": { + "standard_management_user": { + "type": "object", + "description": "An estimation of standard_management_user cost.", + "properties": { + "count": { + "type": "integer", + "description": "The number of standard_management_user licenses.", + "x-description": [ + "The number of standard_management_user licenses." + ] + }, + "total": { + "type": "string", + "description": "The total price for standard_management_user licenses.", + "x-description": [ + "The total price for standard_management_user licenses." + ] + } + }, + "x-description": [ + "An estimation of standard_management_user cost." + ] + }, + "advanced_management_user": { + "type": "object", + "description": "An estimation of advanced_management_user cost.", + "properties": { + "count": { + "type": "integer", + "description": "The number of advanced_management_user licenses.", + "x-description": [ + "The number of advanced_management_user licenses." + ] + }, + "total": { + "type": "string", + "description": "The total price for advanced_management_user licenses.", + "x-description": [ + "The total price for advanced_management_user licenses." + ] + } + }, + "x-description": [ + "An estimation of advanced_management_user cost." + ] + } + } + } + } + } + }, + "x-isDateTime": false, + "x-description": [ + "An estimation of user licenses cost." + ] + }, + "user_management": { + "type": "string", + "description": "An estimation of the advanced user management sellable cost.", + "x-isDateTime": false, + "x-description": [ + "An estimation of the advanced user management sellable cost." + ] + }, + "support_level": { + "type": "string", + "description": "The total monthly price for premium support.", + "x-isDateTime": false, + "x-description": [ + "The total monthly price for premium support." + ] + }, + "subscriptions": { + "type": "object", + "description": "An estimation of subscriptions cost.", + "properties": { + "total": { + "type": "string", + "description": "The total price for subscriptions.", + "x-description": [ + "The total price for subscriptions." + ] + }, + "list": { + "type": "array", + "description": "The list of active subscriptions.", + "items": { + "description": "Details of a subscription", + "type": "object", + "properties": { + "license_id": { + "type": "string", + "description": "The id of the subscription." + }, + "project_title": { + "type": "string", + "description": "The name of the project." + }, + "total": { + "type": "string", + "description": "The total price for the subscription." + }, + "usage": { + "type": "object", + "description": "The detail of the usage for the subscription.", + "properties": { + "cpu": { + "type": "number", + "description": "The total cpu for this subsciption." + }, + "memory": { + "type": "number", + "description": "The total memory for this subsciption." + }, + "storage": { + "type": "number", + "description": "The total storage for this subsciption." + }, + "environments": { + "type": "integer", + "description": "The total environments for this subsciption." + } + } + } + } + }, + "x-description": [ + "The list of active subscriptions." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "An estimation of subscriptions cost." + ] + } + }, + "x-description": [ + "An estimation of all organization spend." + ] + }, + "OrganizationAddonsObject": { + "type": "object", + "description": "The list of available and current add-ons of an organization.", + "properties": { + "available": { + "type": "object", + "description": "The list of available add-ons and their possible values.", + "properties": { + "user_management": { + "type": "object", + "description": "Information about the levels of user management that are available.", + "additionalProperties": { + "type": "number", + "description": "The number of commitment days required for the addon." + }, + "x-description": [ + "Information about the levels of user management that are available." + ] + }, + "support_level": { + "type": "object", + "description": "Information about the levels of support available.", + "additionalProperties": { + "type": "number", + "description": "The number of commitment days required for the addon." + }, + "x-description": [ + "Information about the levels of support available." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The list of available add-ons and their possible values." + ] + }, + "current": { + "type": "object", + "description": "The list of existing add-ons and their current values.", + "properties": { + "user_management": { + "type": "object", + "description": "Information about the type of user management currently selected.", + "additionalProperties": { + "type": "number", + "description": "The number of commitment days that remain for the addon." + }, + "x-description": [ + "Information about the type of user management currently selected." + ] + }, + "support_level": { + "type": "object", + "description": "Information about the level of support currently selected.", + "additionalProperties": { + "type": "number", + "description": "The number of commitment days that remain for the addon." + }, + "x-description": [ + "Information about the level of support currently selected." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The list of existing add-ons and their current values." + ] + }, + "upgrades_available": { + "type": "object", + "description": "The upgrades available for current add-ons.", + "properties": { + "user_management": { + "type": "array", + "description": "Available upgrade options for user management.", + "items": { + "type": "string" + }, + "x-description": [ + "Available upgrade options for user management." + ] + }, + "support_level": { + "type": "array", + "description": "Available upgrade options for support.", + "items": { + "type": "string" + }, + "x-description": [ + "Available upgrade options for support." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The upgrades available for current add-ons." + ] + } + }, + "x-description": [ + "The list of available and current add-ons of an organization." + ] + }, + "SubscriptionAddonsObject": { + "type": "object", + "description": "The list of available and current addons for the license.", + "properties": { + "available": { + "type": "object", + "description": "The list of available addons.", + "properties": { + "continuous_profiling": { + "type": "object", + "description": "Information about the continuous profiling options available.", + "additionalProperties": { + "type": "number", + "description": "The number of commitment days for the addon." + }, + "x-description": [ + "Information about the continuous profiling options available." + ] + }, + "project_support_level": { + "type": "object", + "description": "Information about the project uptime options available.", + "additionalProperties": { + "type": "number", + "description": "The number of commitment days for the addon." + }, + "x-description": [ + "Information about the project uptime options available." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The list of available addons." + ] + }, + "current": { + "type": "object", + "description": "The list of existing addons and their current values.", + "properties": { + "continuous_profiling": { + "type": "object", + "description": "The current continuous profiling level of the license.", + "additionalProperties": { + "type": "number", + "description": "The number of remaining commitment days for the addon." + }, + "x-description": [ + "The current continuous profiling level of the license." + ] + }, + "project_support_level": { + "type": "object", + "description": "The current project uptime level of the license.", + "additionalProperties": { + "type": "number", + "description": "The number of remaining commitment days for the addon." + }, + "x-description": [ + "The current project uptime level of the license." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The list of existing addons and their current values." + ] + }, + "upgrades_available": { + "type": "object", + "description": "The upgrades available for current addons.", + "properties": { + "continuous_profiling": { + "type": "array", + "description": "Available upgrade options for continuous profiling.", + "items": { + "type": "string" + }, + "x-description": [ + "Available upgrade options for continuous profiling." + ] + }, + "project_support_level": { + "type": "array", + "description": "Available upgrade options for project uptime.", + "items": { + "type": "string" + }, + "x-description": [ + "Available upgrade options for project uptime." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The upgrades available for current addons." + ] + } + }, + "x-description": [ + "The list of available and current addons for the license." + ] + }, + "OrganizationAlertConfig": { + "type": "object", + "description": "The alert configuration for an organization.", + "properties": { + "id": { + "type": "string", + "description": "Type of alert (e.g. \"billing\")", + "x-isDateTime": false, + "x-description": [ + "Type of alert (e.g. \"billing\")" + ] + }, + "active": { + "type": "boolean", + "description": "Whether the billing alert should be active or not.", + "x-isDateTime": false, + "x-description": [ + "Whether the billing alert should be active or not." + ] + }, + "alerts_sent": { + "type": "number", + "description": "Number of alerts sent.", + "x-isDateTime": false, + "x-description": [ + "Number of alerts sent." + ] + }, + "last_alert_at": { + "type": "string", + "description": "The datetime the alert was last sent.", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The datetime the alert was last sent." + ] + }, + "updated_at": { + "type": "string", + "description": "The datetime the alert was last updated.", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The datetime the alert was last updated." + ] + }, + "config": { + "type": "object", + "nullable": true, + "description": "Configuration for threshold and mode.", + "properties": { + "threshold": { + "type": "object", + "description": "Data regarding threshold spend.", + "properties": { + "formatted": { + "type": "string", + "description": "Formatted threshold value.", + "x-description": [ + "Formatted threshold value." + ] + }, + "amount": { + "type": "number", + "description": "Threshold value.", + "x-description": [ + "Threshold value." + ] + }, + "currency_code": { + "type": "string", + "description": "Threshold currency code.", + "x-description": [ + "Threshold currency code." + ] + }, + "currency_symbol": { + "type": "string", + "description": "Threshold currency symbol.", + "x-description": [ + "Threshold currency symbol." + ] + } + }, + "x-description": [ + "Data regarding threshold spend." + ] + }, + "mode": { + "type": "string", + "description": "The mode of alert.", + "x-description": [ + "The mode of alert." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "Configuration for threshold and mode." + ] + } + }, + "x-description": [ + "The alert configuration for an organization." + ] + }, + "UsageAlert": { + "type": "object", + "description": "The usage alert for a subscription.", + "properties": { + "id": { + "type": "string", + "description": "Tidentifier of the alert.", + "x-isDateTime": false, + "x-description": [ + "Tidentifier of the alert." + ] + }, + "active": { + "type": "boolean", + "description": "Whether the usage alert is activated.", + "x-isDateTime": false, + "x-description": [ + "Whether the usage alert is activated." + ] + }, + "alerts_sent": { + "type": "number", + "description": "Number of alerts sent.", + "x-isDateTime": false, + "x-description": [ + "Number of alerts sent." + ] + }, + "last_alert_at": { + "type": "string", + "description": "The datetime the alert was last sent.", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The datetime the alert was last sent." + ] + }, + "updated_at": { + "type": "string", + "description": "The datetime the alert was last updated.", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The datetime the alert was last updated." + ] + }, + "config": { + "type": "object", + "nullable": true, + "description": "Configuration for the usage alert.", + "properties": { + "threshold": { + "type": "object", + "description": "Data regarding threshold spend.", + "properties": { + "formatted": { + "type": "string", + "description": "Formatted threshold value.", + "x-description": [ + "Formatted threshold value." + ] + }, + "amount": { + "type": "number", + "description": "Threshold value.", + "x-description": [ + "Threshold value." + ] + }, + "unit": { + "type": "string", + "description": "Threshold unit.", + "x-description": [ + "Threshold unit." + ] + } + }, + "x-description": [ + "Data regarding threshold spend." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "Configuration for the usage alert." + ] + } + }, + "x-description": [ + "The usage alert for a subscription." + ] + }, + "PrepaymentObject": { + "type": "object", + "description": "Prepayment information for an organization.", + "properties": { + "prepayment": { + "type": "object", + "description": "Prepayment information for an organization.", + "properties": { + "organization_id": { + "type": "string", + "description": "Organization ID", + "x-description": [ + "Organization ID" + ] + }, + "balance": { + "type": "object", + "description": "The prepayment balance in complex format.", + "properties": { + "formatted": { + "type": "string", + "description": "Formatted balance.", + "x-description": [ + "Formatted balance." + ] + }, + "amount": { + "type": "number", + "description": "The balance amount.", + "x-description": [ + "The balance amount." + ] + }, + "currency_code": { + "type": "string", + "description": "The balance currency code.", + "x-description": [ + "The balance currency code." + ] + }, + "currency_symbol": { + "type": "string", + "description": "The balance currency symbol.", + "x-description": [ + "The balance currency symbol." + ] + } + }, + "x-description": [ + "The prepayment balance in complex format." + ] + }, + "last_updated_at": { + "type": "string", + "nullable": true, + "description": "The date the prepayment balance was last updated.", + "x-description": [ + "The date the prepayment balance was last updated." + ] + }, + "sufficient": { + "type": "boolean", + "description": "Whether the prepayment balance is enough to cover the upcoming order.", + "x-description": [ + "Whether the prepayment balance is enough to cover the upcoming order." + ] + }, + "fallback": { + "type": "string", + "nullable": true, + "description": "The fallback payment method, if any, to be used in case prepayment balance is not enough to cover an order.", + "x-description": [ + "The fallback payment method, if any, to be used in case prepayment balance is not enough to cover an order." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "Prepayment information for an organization." + ] + } + }, + "x-description": [ + "Prepayment information for an organization." + ] + }, + "PrepaymentTransactionObject": { + "type": "object", + "description": "Prepayment transaction for an organization.", + "properties": { + "order_id": { + "type": "string", + "description": "Order ID", + "x-isDateTime": false, + "x-description": [ + "Order ID" + ] + }, + "message": { + "type": "string", + "description": "The message associated with transaction.", + "x-isDateTime": false, + "x-description": [ + "The message associated with transaction." + ] + }, + "status": { + "type": "string", + "description": "Whether the transactions was successful or a failure.", + "x-isDateTime": false, + "x-description": [ + "Whether the transactions was successful or a failure." + ] + }, + "amount": { + "type": "object", + "description": "The prepayment balance in complex format.", + "properties": { + "formatted": { + "type": "string", + "description": "Formatted balance.", + "x-description": [ + "Formatted balance." + ] + }, + "amount": { + "type": "number", + "description": "The balance amount.", + "x-description": [ + "The balance amount." + ] + }, + "currency_code": { + "type": "string", + "description": "The balance currency code.", + "x-description": [ + "The balance currency code." + ] + }, + "currency_symbol": { + "type": "string", + "description": "The balance currency symbol.", + "x-description": [ + "The balance currency symbol." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The prepayment balance in complex format." + ] + }, + "created": { + "type": "string", + "description": "Time the transaction was created.", + "x-isDateTime": false, + "x-description": [ + "Time the transaction was created." + ] + }, + "updated": { + "type": "string", + "description": "Time the transaction was last updated.", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "Time the transaction was last updated." + ] + }, + "expire_date": { + "type": "string", + "description": "The expiration date of the transaction (deposits only).", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The expiration date of the transaction (deposits only)." + ] + } + }, + "x-description": [ + "Prepayment transaction for an organization." + ] + }, + "ArrayFilter": { + "type": "object", + "properties": { + "eq": { + "type": "string", + "description": "Equal", + "x-isDateTime": false, + "x-description": [ + "Equal" + ] + }, + "ne": { + "type": "string", + "description": "Not equal", + "x-isDateTime": false, + "x-description": [ + "Not equal" + ] + }, + "in": { + "type": "string", + "description": "In (comma-separated list)", + "x-isDateTime": false, + "x-description": [ + "In (comma-separated list)" + ] + }, + "nin": { + "type": "string", + "description": "Not in (comma-separated list)", + "x-isDateTime": false, + "x-description": [ + "Not in (comma-separated list)" + ] + } + } + }, + "OrganizationProject": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/ProjectID" + }, + "organization_id": { + "$ref": "#/components/schemas/OrganizationID" + }, + "subscription_id": { + "$ref": "#/components/schemas/SubscriptionID" + }, + "vendor": { + "type": "string", + "description": "Vendor of the project.", + "x-isDateTime": false, + "x-description": [ + "Vendor of the project." + ] + }, + "region": { + "$ref": "#/components/schemas/RegionID" + }, + "title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "type": { + "$ref": "#/components/schemas/ProjectType" + }, + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "timezone": { + "$ref": "#/components/schemas/ProjectTimeZone" + }, + "default_branch": { + "$ref": "#/components/schemas/ProjectDefaultBranch" + }, + "status": { + "$ref": "#/components/schemas/ProjectStatus" + }, + "trial_plan": { + "$ref": "#/components/schemas/ProjectTrialPlan" + }, + "project_ui": { + "$ref": "#/components/schemas/ProjectUI" + }, + "locked": { + "$ref": "#/components/schemas/ProjectLocked" + }, + "cse_notes": { + "$ref": "#/components/schemas/ProjectCSENotes" + }, + "dedicated_tag": { + "$ref": "#/components/schemas/ProjectDedicatedTag" + }, + "created_at": { + "$ref": "#/components/schemas/CreatedAt" + }, + "updated_at": { + "$ref": "#/components/schemas/UpdatedAt" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current project.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current project." + ] + }, + "update": { + "type": "object", + "description": "Link for updating the current project.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for updating the current project." + ] + }, + "delete": { + "type": "object", + "description": "Link for deleting the current project.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for deleting the current project." + ] + }, + "activities": { + "type": "object", + "description": "Link to the project's activities.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the project's activities." + ] + }, + "addons": { + "type": "object", + "description": "Link to the project's add-ons.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the project's add-ons." + ] + } + } + } + } + }, + "OrganizationCarbon": { + "type": "object", + "properties": { + "organization_id": { + "$ref": "#/components/schemas/OrganizationID" + }, + "meta": { + "$ref": "#/components/schemas/MetricsMetadata" + }, + "projects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationProjectCarbon" + }, + "x-isDateTime": false + }, + "total": { + "$ref": "#/components/schemas/CarbonTotal" + } + } + }, + "ProjectCarbon": { + "type": "object", + "properties": { + "project_id": { + "$ref": "#/components/schemas/ProjectID" + }, + "project_title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "meta": { + "$ref": "#/components/schemas/MetricsMetadata" + }, + "values": { + "$ref": "#/components/schemas/MetricsValues" + }, + "total": { + "$ref": "#/components/schemas/CarbonTotal" + } + } + }, + "OrganizationProjectCarbon": { + "type": "object", + "properties": { + "project_id": { + "$ref": "#/components/schemas/ProjectID" + }, + "project_title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "values": { + "$ref": "#/components/schemas/MetricsValues" + }, + "total": { + "$ref": "#/components/schemas/CarbonTotal" + } + } + }, + "ProjectPlan": { + "type": "string", + "description": "The project plan.", + "x-description": [ + "The project plan." + ] + }, + "ProjectReference": { + "description": "The referenced project, or null if it no longer exists.", + "type": "object", + "nullable": true, + "required": [ + "id", + "organization_id", + "subscription_id", + "region", + "title", + "type", + "plan", + "status", + "agency_site", + "support_tier", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ProjectID" + }, + "organization_id": { + "$ref": "#/components/schemas/OrganizationID" + }, + "subscription_id": { + "$ref": "#/components/schemas/SubscriptionID" + }, + "region": { + "$ref": "#/components/schemas/RegionID" + }, + "title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "type": { + "$ref": "#/components/schemas/ProjectType" + }, + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "status": { + "$ref": "#/components/schemas/ProjectStatus" + }, + "created_at": { + "$ref": "#/components/schemas/CreatedAt" + }, + "updated_at": { + "$ref": "#/components/schemas/UpdatedAt" + } + }, + "x-description": [ + "The referenced project, or null if it no longer exists." + ] + }, + "RegionReference": { + "description": "The referenced region, or null if it no longer exists.", + "type": "object", + "nullable": true, + "required": [ + "id", + "label", + "zone", + "selection_label", + "project_label", + "timezone", + "available", + "endpoint", + "provider", + "datacenter", + "compliance", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/RegionID" + }, + "label": { + "$ref": "#/components/schemas/RegionLabel" + }, + "zone": { + "$ref": "#/components/schemas/RegionZone" + }, + "selection_label": { + "$ref": "#/components/schemas/RegionSelectionLabel" + }, + "project_label": { + "$ref": "#/components/schemas/RegionProjectLabel" + }, + "timezone": { + "$ref": "#/components/schemas/RegionTimezone" + }, + "available": { + "$ref": "#/components/schemas/RegionAvailable" + }, + "private": { + "$ref": "#/components/schemas/RegionPrivate" + }, + "endpoint": { + "$ref": "#/components/schemas/RegionEndpoint" + }, + "code": { + "$ref": "#/components/schemas/RegionCode" + }, + "provider": { + "$ref": "#/components/schemas/RegionProvider" + }, + "datacenter": { + "$ref": "#/components/schemas/RegionDataCenter" + }, + "envimpact": { + "$ref": "#/components/schemas/RegionEnvImpact" + }, + "compliance": { + "$ref": "#/components/schemas/RegionCompliance" + }, + "created_at": { + "$ref": "#/components/schemas/CreatedAt" + }, + "updated_at": { + "$ref": "#/components/schemas/UpdatedAt" + } + }, + "x-description": [ + "The referenced region, or null if it no longer exists." + ] + }, + "ProjectID": { + "type": "string", + "description": "The ID of the project.", + "x-description": [ + "The ID of the project." + ] + }, + "OrganizationID": { + "type": "string", + "description": "The ID of the organization.", + "x-description": [ + "The ID of the organization." + ] + }, + "SubscriptionID": { + "type": "string", + "description": "The ID of the subscription.", + "x-description": [ + "The ID of the subscription." + ] + }, + "RegionID": { + "type": "string", + "description": "The machine name of the region where the project is located.", + "x-description": [ + "The machine name of the region where the project is located." + ] + }, + "ProjectTitle": { + "type": "string", + "description": "The title of the project.", + "x-description": [ + "The title of the project." + ] + }, + "ProjectType": { + "type": "string", + "description": "The type of projects.", + "enum": [ + "grid", + "dedicated" + ], + "x-description": [ + "The type of projects." + ] + }, + "ProjectTimeZone": { + "type": "string", + "description": "Timezone of the project.", + "x-description": [ + "Timezone of the project." + ] + }, + "ProjectDefaultBranch": { + "type": "string", + "description": "Default branch.", + "x-description": [ + "Default branch." + ] + }, + "ProjectLocked": { + "type": "boolean", + "description": "Locked", + "x-description": [ + "Locked" + ] + }, + "ProjectCSENotes": { + "type": "string", + "description": "CSE notes.", + "x-description": [ + "CSE notes." + ] + }, + "ProjectStatus": { + "type": "string", + "description": "The status of the project.", + "enum": [ + "requested", + "active", + "failed", + "suspended", + "deleted" + ], + "x-description": [ + "The status of the project." + ] + }, + "ProjectDedicatedTag": { + "type": "string", + "description": "Dedicated tag.", + "x-description": [ + "Dedicated tag." + ] + }, + "ProjectUI": { + "description": "The URL for the project's user interface.", + "type": "string", + "x-description": [ + "The URL for the project's user interface." + ] + }, + "ProjectTrialPlan": { + "description": "Whether the project is currently on a trial plan.", + "type": "boolean", + "x-description": [ + "Whether the project is currently on a trial plan." + ] + }, + "RegionLabel": { + "type": "string", + "description": "The human-readable name of the region.", + "x-description": [ + "The human-readable name of the region." + ] + }, + "RegionZone": { + "type": "string", + "description": "The geographical zone of the region.", + "x-description": [ + "The geographical zone of the region." + ] + }, + "RegionSelectionLabel": { + "type": "string", + "description": "The label to display when choosing between regions for new projects.", + "x-description": [ + "The label to display when choosing between regions for new projects." + ] + }, + "RegionProjectLabel": { + "type": "string", + "description": "The label to display on existing projects.", + "x-description": [ + "The label to display on existing projects." + ] + }, + "RegionTimezone": { + "type": "string", + "description": "Default timezone of the region.", + "x-description": [ + "Default timezone of the region." + ] + }, + "RegionAvailable": { + "type": "boolean", + "description": "Indicator whether or not this region is selectable during the checkout. Not available regions will never show up during checkout.", + "x-description": [ + "Indicator whether or not this region is selectable during the checkout. Not available regions will never show up", + "during checkout." + ] + }, + "RegionPrivate": { + "type": "boolean", + "description": "Indicator whether or not this platform is for private use only.", + "x-description": [ + "Indicator whether or not this platform is for private use only." + ] + }, + "RegionEndpoint": { + "type": "string", + "description": "Link to the region API endpoint.", + "x-description": [ + "Link to the region API endpoint." + ] + }, + "RegionCode": { + "type": "string", + "description": "The code of the region", + "x-description": [ + "The code of the region" + ] + }, + "RegionProvider": { + "type": "object", + "description": "Information about the region provider.", + "x-description": [ + "Information about the region provider." + ] + }, + "RegionDataCenter": { + "type": "object", + "description": "Information about the region provider data center.", + "x-description": [ + "Information about the region provider data center." + ] + }, + "RegionEnvImpact": { + "type": "object", + "description": "Information about the region provider's environmental impact.", + "x-description": [ + "Information about the region provider's environmental impact." + ] + }, + "RegionCompliance": { + "type": "object", + "description": "Information about the region's compliance.", + "x-description": [ + "Information about the region's compliance." + ] + }, + "MetricsMetadata": { + "type": "object", + "properties": { + "from": { + "description": "The value used to calculate the lower bound of the temporal query. Inclusive.", + "x-isDateTime": false, + "x-description": [ + "The value used to calculate the lower bound of the temporal query. Inclusive." + ] + }, + "to": { + "description": "The truncated value used to calculate the upper bound of the temporal query. Exclusive.", + "x-isDateTime": false, + "x-description": [ + "The truncated value used to calculate the upper bound of the temporal query. Exclusive." + ] + }, + "interval": { + "description": "The interval used to group the metric values.", + "x-isDateTime": false, + "x-description": [ + "The interval used to group the metric values." + ] + }, + "units": { + "description": "The units associated with the provided values.", + "x-isDateTime": false, + "x-description": [ + "The units associated with the provided values." + ] + } + } + }, + "MetricsValues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetricsValue" + } + }, + "MetricsValue": { + "type": "object", + "properties": { + "value": { + "description": "The measured value of the metric for the given time interval.", + "x-isDateTime": false, + "x-description": [ + "The measured value of the metric for the given time interval." + ] + }, + "start_time": { + "description": "The timestamp at which the time interval began.", + "x-isDateTime": false, + "x-description": [ + "The timestamp at which the time interval began." + ] + } + } + }, + "CarbonTotal": { + "type": "number", + "description": "The calculated total of the metric for the given interval.", + "x-description": [ + "The calculated total of the metric for the given interval." + ] + }, + "CreatedAt": { + "type": "string", + "format": "date-time", + "description": "The date and time when the resource was created.", + "x-description": [ + "The date and time when the resource was created." + ] + }, + "UpdatedAt": { + "type": "string", + "format": "date-time", + "description": "The date and time when the resource was last updated.", + "x-description": [ + "The date and time when the resource was last updated." + ] + }, + "TeamProjectAccess": { + "type": "object", + "properties": { + "team_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the team.", + "x-isDateTime": false, + "x-description": [ + "The ID of the team." + ] + }, + "organization_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization." + ] + }, + "project_id": { + "type": "string", + "description": "The ID of the project.", + "x-isDateTime": false, + "x-description": [ + "The ID of the project." + ] + }, + "project_title": { + "type": "string", + "description": "The title of the project.", + "x-isDateTime": false, + "x-description": [ + "The title of the project." + ] + }, + "granted_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was granted.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the access was granted." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the access was last updated." + ] + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current access item.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current access item." + ] + }, + "update": { + "type": "object", + "description": "Link for updating the current access item.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for updating the current access item." + ] + }, + "delete": { + "type": "object", + "description": "Link for deleting the current access item.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for deleting the current access item." + ] + } + } + } + } + }, + "UserProjectAccess": { + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-isDateTime": false, + "x-description": [ + "The ID of the user." + ] + }, + "organization_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization." + ] + }, + "project_id": { + "type": "string", + "description": "The ID of the project.", + "x-isDateTime": false, + "x-description": [ + "The ID of the project." + ] + }, + "project_title": { + "type": "string", + "description": "The title of the project.", + "x-isDateTime": false, + "x-description": [ + "The title of the project." + ] + }, + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" + }, + "granted_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was granted.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the access was granted." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the access was last updated." + ] + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current access item.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current access item." + ] + }, + "update": { + "type": "object", + "description": "Link for updating the current access item.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for updating the current access item." + ] + }, + "delete": { + "type": "object", + "description": "Link for deleting the current access item.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for deleting the current access item." + ] + } + } + } + } + }, + "ProjectPermissions": { + "type": "array", + "description": "An array of project permissions.", + "items": { + "type": "string", + "enum": [ + "admin", + "viewer", + "development:admin", + "development:contributor", + "development:viewer", + "staging:admin", + "staging:contributor", + "staging:viewer", + "production:admin", + "production:contributor", + "production:viewer" + ] + }, + "x-description": [ + "An array of project permissions." + ] + }, + "InvoicePDF": { + "description": "Invoice PDF document details.", + "properties": { + "url": { + "description": "A link to the PDF invoice.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "A link to the PDF invoice." + ] + }, + "status": { + "description": "The status of the PDF document. We generate invoice PDF asyncronously in batches. An invoice PDF document may not be immediately available to download. If status is 'ready', the PDF is ready to download. 'pending' means the PDF is not created but queued up. If you get this status, try again later.", + "type": "string", + "enum": [ + "ready", + "pending" + ], + "x-isDateTime": false, + "x-description": [ + "The status of the PDF document. We generate invoice PDF asyncronously in batches. An invoice PDF document may not", + "be immediately available to download. If status is 'ready', the PDF is ready to download. 'pending' means the PDF", + "is not created but queued up. If you get this status, try again later." + ] + } + }, + "type": "object", + "x-description": [ + "Invoice PDF document details." + ] + }, + "Order": { + "description": "The order object.", + "properties": { + "id": { + "description": "The ID of the order.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The ID of the order." + ] + }, + "status": { + "description": "The status of the subscription.", + "type": "string", + "enum": [ + "completed", + "past_due", + "pending", + "canceled", + "payment_failed_soft_decline", + "payment_failed_hard_decline" + ], + "x-isDateTime": false, + "x-description": [ + "The status of the subscription." + ] + }, + "owner": { + "description": "The UUID of the owner.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "The UUID of the owner." + ] + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "company": { + "description": "The company name.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The company name." + ] + }, + "vat_number": { + "description": "An identifier used in many countries for value added tax purposes.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "An identifier used in many countries for value added tax purposes." + ] + }, + "billing_period_start": { + "description": "The time when the billing period of the order started.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time when the billing period of the order started." + ] + }, + "billing_period_end": { + "description": "The time when the billing period of the order ended.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time when the billing period of the order ended." + ] + }, + "billing_period_label": { + "description": "Descriptive information about the billing cycle.", + "properties": { + "formatted": { + "description": "The renderable label for the billing cycle.", + "type": "string", + "x-description": [ + "The renderable label for the billing cycle." + ] + }, + "month": { + "description": "The month of the billing cycle.", + "type": "string", + "x-description": [ + "The month of the billing cycle." + ] + }, + "year": { + "description": "The year of the billing cycle.", + "type": "string", + "x-description": [ + "The year of the billing cycle." + ] + }, + "next_month": { + "description": "The name of the next month following this billing cycle.", + "type": "string", + "x-description": [ + "The name of the next month following this billing cycle." + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Descriptive information about the billing cycle." + ] + }, + "billing_period_duration": { + "description": "The duration of the billing period of the order in seconds.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The duration of the billing period of the order in seconds." + ] + }, + "paid_on": { + "description": "The time when the order was successfully charged.", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The time when the order was successfully charged." + ] + }, + "total": { + "description": "The total of the order.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The total of the order." + ] + }, + "total_formatted": { + "description": "The total of the order, formatted with currency.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The total of the order, formatted with currency." + ] + }, + "components": { + "$ref": "#/components/schemas/Components" + }, + "currency": { + "description": "The order currency code.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The order currency code." + ] + }, + "invoice_url": { + "description": "A link to the PDF invoice.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "A link to the PDF invoice." + ] + }, + "last_refreshed": { + "description": "The time when the order was last refreshed.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time when the order was last refreshed." + ] + }, + "invoiced": { + "description": "The customer is invoiced.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "The customer is invoiced." + ] + }, + "line_items": { + "description": "The line items that comprise the order.", + "type": "array", + "items": { + "$ref": "#/components/schemas/LineItem" + }, + "x-isDateTime": false, + "x-description": [ + "The line items that comprise the order." + ] + }, + "_links": { + "description": "Links to related API endpoints.", + "properties": { + "invoices": { + "description": "Link to related Invoices API. Use this to retrieve invoices related to this order.", + "properties": { + "href": { + "description": "URL of the link", + "type": "string", + "x-description": [ + "URL of the link" + ] + } + }, + "type": "object", + "x-description": [ + "Link to related Invoices API. Use this to retrieve invoices related to this order." + ] + } + }, + "type": "object", + "x-description": [ + "Links to related API endpoints." + ] + } + }, + "type": "object", + "x-description": [ + "The order object." + ] + }, + "PlanRecords": { + "description": "The plan record object.", + "properties": { + "id": { + "description": "The unique ID of the plan record.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The unique ID of the plan record." + ] + }, + "owner": { + "description": "The UUID of the owner.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "The UUID of the owner." + ] + }, + "subscription_id": { + "description": "The ID of the subscription this record pertains to.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The ID of the subscription this record pertains to." + ] + }, + "sku": { + "description": "The product SKU of the plan that this record represents.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The product SKU of the plan that this record represents." + ] + }, + "plan": { + "description": "The machine name of the plan that this record represents.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The machine name of the plan that this record represents." + ] + }, + "options": { + "type": "array", + "items": { + "description": "The SKU of an option.", + "type": "string" + }, + "x-isDateTime": false + }, + "start": { + "description": "The start timestamp of this plan record (ISO 8601).", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The start timestamp of this plan record (ISO 8601)." + ] + }, + "end": { + "description": "The end timestamp of this plan record (ISO 8601).", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The end timestamp of this plan record (ISO 8601)." + ] + }, + "status": { + "description": "The status of the subscription during this record: active or suspended.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The status of the subscription during this record: active or suspended." + ] + } + }, + "type": "object", + "x-description": [ + "The plan record object." + ] + }, + "Usage": { + "description": "The usage object.", + "properties": { + "id": { + "description": "The unique ID of the usage record.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The unique ID of the usage record." + ] + }, + "subscription_id": { + "description": "The ID of the subscription.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The ID of the subscription." + ] + }, + "usage_group": { + "description": "The type of usage that this record represents.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The type of usage that this record represents." + ] + }, + "quantity": { + "description": "The quantity used.", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "The quantity used." + ] + }, + "start": { + "description": "The start timestamp of this usage record (ISO 8601).", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The start timestamp of this usage record (ISO 8601)." + ] + } + }, + "type": "object", + "x-description": [ + "The usage object." + ] + }, + "ResourceConfig": { + "type": "object", + "properties": { + "profile_size": { + "type": "string", + "nullable": true, + "description": "Profile size (e.g. \"0.5\", \"1\", \"2\")", + "example": "2", + "x-description": [ + "Profile size (e.g. \"0.5\", \"1\", \"2\")" + ] + } + } + } + }, + "parameters": { + "filter_invoice_type": { + "name": "filter[type]", + "in": "query", + "description": "The invoice type. Use invoice for standard invoices, credit_memo for refund/credit invoices.", + "schema": { + "type": "string", + "enum": [ + "credit_memo", + "invoice" + ] + } + }, + "filter_order_id": { + "name": "filter[order_id]", + "in": "query", + "description": "The order id of Invoice.", + "schema": { + "type": "string" + } + }, + "filter_invoice_status": { + "name": "filter[status]", + "in": "query", + "description": "The status of the invoice.", + "schema": { + "type": "string", + "enum": [ + "paid", + "charged_off", + "pending", + "refunded", + "canceled", + "refund_pending" + ] + } + }, + "mode": { + "name": "mode", + "in": "query", + "description": "The output mode.", + "schema": { + "type": "string", + "enum": [ + "details" + ] + } + }, + "filter_order_status": { + "name": "filter[status]", + "in": "query", + "description": "The status of the order.", + "schema": { + "type": "string", + "enum": [ + "completed", + "past_due", + "pending", + "canceled", + "payment_failed_soft_decline", + "payment_failed_hard_decline" + ] + } + }, + "filter_order_total": { + "name": "filter[total]", + "in": "query", + "description": "The total of the order.", + "schema": { + "type": "integer" + } + }, + "record_end": { + "name": "filter[end]", + "in": "query", + "description": "The end of the observation period for the record. E.g. filter[end]=2018-01-01 will display all records that were active on (i.e. they started before) 2018-01-01", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "record_ended_at": { + "name": "filter[ended_at]", + "in": "query", + "description": "The record's end timestamp. You can use this filter to list records ended after, or before a certain time. E.g. filter[ended_at][value]=2020-01-01&filter[ended_at][operator]=>", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "record_status": { + "name": "filter[status]", + "in": "query", + "description": "The status of the plan record. ", + "schema": { + "type": "string", + "enum": [ + "active", + "suspended" + ] + } + }, + "record_usage_group": { + "name": "filter[usage_group]", + "in": "query", + "description": "Filter records by the type of usage.", + "schema": { + "type": "string", + "enum": [ + "storage", + "environments", + "user_licenses" + ] + } + }, + "record_start": { + "name": "filter[start]", + "in": "query", + "description": "The start of the observation period for the record. E.g. filter[start]=2018-01-01 will display all records that were active (i.e. did not end) on 2018-01-01", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "record_started_at": { + "name": "filter[started_at]", + "in": "query", + "description": "The record's start timestamp. You can use this filter to list records started after, or before a certain time. E.g. filter[started_at][value]=2020-01-01&filter[started_at][operator]=>", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "discountId": { + "name": "id", + "in": "path", + "description": "The ID of the organization discount", + "required": true, + "schema": { + "type": "string" + } + }, + "id": { + "name": "filter[id]", + "in": "query", + "description": "Machine name of the region.", + "schema": { + "type": "string" + } + }, + "subscription_id": { + "name": "subscriptionId", + "in": "path", + "description": "The ID of the subscription", + "required": true, + "schema": { + "type": "string" + } + }, + "filter_subscription_id": { + "name": "filter[subscription_id]", + "in": "query", + "description": "The ID of the subscription", + "required": false, + "schema": { + "type": "string" + } + }, + "subscription_status": { + "name": "filter[status]", + "in": "query", + "description": "The status of the subscription. ", + "schema": { + "type": "string", + "enum": [ + "active", + "provisioning", + "provisioning failure", + "suspended", + "deleted" + ] + } + }, + "subscription_plan": { + "name": "plan", + "in": "query", + "description": "The plan type of the subscription.", + "schema": { + "type": "string", + "enum": [ + "development", + "standard", + "medium", + "large", + "xlarge", + "2xlarge" + ] + } + }, + "filter_subscription_plan": { + "name": "filter[plan]", + "in": "query", + "description": "The plan type of the subscription.", + "schema": { + "type": "string", + "enum": [ + "development", + "standard", + "medium", + "large", + "xlarge", + "2xlarge" + ] + } + }, + "subscription_environments": { + "name": "environments", + "in": "query", + "description": "The number of environments which can be provisioned on the project.", + "schema": { + "type": "integer", + "default": null + } + }, + "subscription_storage": { + "name": "storage", + "in": "query", + "description": "The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values.", + "schema": { + "type": "integer", + "default": null + } + }, + "subscription_user_licenses": { + "name": "user_licenses", + "in": "query", + "description": "The number of user licenses.", + "schema": { + "type": "integer" + } + }, + "page": { + "name": "page", + "in": "query", + "description": "Page to be displayed. Defaults to 1.", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + }, + "user_id": { + "name": "userId", + "in": "path", + "description": "The UUID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + "filter_ticket_id": { + "name": "filter[ticket_id]", + "in": "query", + "description": "The ID of the ticket.", + "schema": { + "type": "integer" + } + }, + "filter_created": { + "name": "filter[created]", + "in": "query", + "description": "ISO dateformat expected. The time when the support ticket was created.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "filter_updated": { + "name": "filter[updated]", + "in": "query", + "description": "ISO dateformat expected. The time when the support ticket was updated.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "filter_type": { + "name": "filter[type]", + "in": "query", + "description": "The type of the support ticket.", + "schema": { + "type": "string", + "enum": [ + "problem", + "task", + "incident", + "question" + ] + } + }, + "filter_priority": { + "name": "filter[priority]", + "in": "query", + "description": "The priority of the support ticket.", + "schema": { + "type": "string", + "enum": [ + "low", + "normal", + "high", + "urgent" + ] + } + }, + "filter_ticket_status": { + "name": "filter[status]", + "in": "query", + "description": "The status of the support ticket.", + "schema": { + "type": "string", + "enum": [ + "closed", + "deleted", + "hold", + "new", + "open", + "pending", + "solved" + ] + } + }, + "filter_requester_id": { + "name": "filter[requester_id]", + "in": "query", + "description": "UUID of the ticket requester. Converted from the ZID value.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + "filter_submitter_id": { + "name": "filter[submitter_id]", + "in": "query", + "description": "UUID of the ticket submitter. Converted from the ZID value.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + "filter_assignee_id": { + "name": "filter[assignee_id]", + "in": "query", + "description": "UUID of the ticket assignee. Converted from the ZID value.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + "filter_has_incidents": { + "name": "filter[has_incidents]", + "in": "query", + "description": "Whether or not this ticket has incidents.", + "schema": { + "type": "boolean" + } + }, + "filter_due": { + "name": "filter[due]", + "in": "query", + "description": "ISO dateformat expected. A time that the ticket is due at.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "InvitationID": { + "name": "invitation_id", + "in": "path", + "required": true, + "description": "The ID of the invitation.", + "schema": { + "type": "string" + } + }, + "OrganizationID": { + "name": "organization_id", + "in": "path", + "required": true, + "description": "The ID of the organization.", + "schema": { + "type": "string", + "format": "ulid" + } + }, + "ProjectID": { + "name": "project_id", + "in": "path", + "required": true, + "description": "The ID of the project.", + "schema": { + "type": "string" + } + }, + "TeamID": { + "name": "team_id", + "in": "path", + "required": true, + "description": "The ID of the team.", + "schema": { + "type": "string" + } + }, + "UserID": { + "name": "user_id", + "in": "path", + "required": true, + "description": "The ID of the user.", + "schema": { + "type": "string", + "example": "d81c8ee2-44b3-429f-b944-a33ad7437690", + "format": "uuid" + } + }, + "OrganizationIDName": { + "in": "path", + "name": "organization_id", + "description": "The ID of the organization.
\nPrefix with name= to retrieve the organization by name instead.\n", + "required": true, + "schema": { + "type": "string" + } + }, + "OrderID": { + "in": "path", + "name": "order_id", + "description": "The ID of the order.", + "required": true, + "schema": { + "type": "string" + } + }, + "SubscriptionID": { + "in": "path", + "name": "subscription_id", + "description": "The ID of the subscription.", + "required": true, + "schema": { + "type": "string" + } + }, + "InvoiceID": { + "in": "path", + "name": "invoice_id", + "description": "The ID of the invoice.", + "required": true, + "schema": { + "type": "string" + } + }, + "RegionID": { + "in": "path", + "name": "region_id", + "description": "The ID of the region.", + "required": true, + "schema": { + "type": "string" + } + }, + "project_id": { + "name": "filter[project_id]", + "in": "query", + "description": "Allows filtering by `project_id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + "project_title": { + "in": "query", + "name": "filter[project_title]", + "description": "Allows filtering by `project_title` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + "region": { + "in": "query", + "name": "filter[region]", + "description": "Allows filtering by `region` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + "updated_at": { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + "subscription_sort": { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `region`, `project_title`, `type`, `plan`, `status`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + }, + "page_size": { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + "page_before": { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + "page_after": { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + "from": { + "in": "query", + "name": "from", + "description": "The start of the time frame for the query. Inclusive.", + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + "to": { + "in": "query", + "name": "to", + "description": "The end of the time frame for the query. Exclusive.", + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + "interval": { + "in": "query", + "name": "interval", + "description": "The interval by which the query groups the results. of the time frame for the query. Exclusive.", + "schema": { + "type": "string", + "enum": [ + "day", + "month", + "year" + ] + } + } + }, + "securitySchemes": { + "OAuth2": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "tokenUrl": "https://auth.api.platform.sh/oauth2/token", + "refreshUrl": "https://auth.api.platform.sh/oauth2/token", + "scopes": {}, + "authorizationUrl": "https://auth.api.platform.sh/oauth2/authorize" + } + }, + "description": "" + }, + "OAuth2Admin": { + "type": "oauth2", + "flows": { + "clientCredentials": { + "tokenUrl": "https://auth.api.platform.sh/oauth2/token", + "refreshUrl": "", + "scopes": { + "admin": "administrative operations" + } + } + }, + "description": "" + } + }, + "responses": {}, + "examples": {} + }, + "x-tagGroups": [ + { + "name": "Organization Administration", + "tags": [ + "Organizations", + "Organization Members", + "Organization Invitations", + "Organization Projects", + "Add-ons" + ] + }, + { + "name": "Project Administration", + "tags": [ + "Project", + "Domain Management", + "Cert Management", + "Project Variables", + "Repository", + "Third-Party Integrations", + "Support" + ] + }, + { + "name": "Environments", + "tags": [ + "Environment", + "Environment Backups", + "Environment Variables", + "Routing", + "Source Operations", + "Runtime Operations", + "Deployment" + ] + }, + { + "name": "User Activity", + "tags": [ + "Project Activity", + "Environment Activity" + ] + }, + { + "name": "Project Access", + "tags": [ + "Project Invitations", + "Teams", + "Team Access", + "User Access" + ] + }, + { + "name": "Account Management", + "tags": [ + "API Tokens", + "Connections", + "MFA", + "Users", + "User Profiles", + "SSH Keys", + "Plans" + ] + }, + { + "name": "Billing", + "tags": [ + "Organization Management", + "Subscriptions", + "Orders", + "Invoices", + "Discounts", + "Vouchers", + "Records", + "Profiles" + ] + }, + { + "name": "Global Info", + "tags": [ + "Project Discovery", + "References", + "Regions" + ] + }, + { + "name": "Internal APIs", + "tags": [ + "Project Settings", + "Environment Settings", + "Deployment Target", + "System Information", + "Container Profile" + ] + } + ] +} \ No newline at end of file diff --git a/src/Api/AbstractApi.php b/src/Api/AbstractApi.php index 9dc7d866..14c60c1d 100644 --- a/src/Api/AbstractApi.php +++ b/src/Api/AbstractApi.php @@ -18,7 +18,7 @@ use Psr\Http\Message\UriFactoryInterface; use Psr\Http\Message\UriInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use function sprintf; @@ -40,7 +40,7 @@ abstract class AbstractApi private readonly UriFactoryInterface $uriFactory; public function __construct( - private readonly OAuthProvider $oauthProvider, + private readonly TokenProvider $tokenProvider, private ClientInterface $httpClient, private readonly RequestFactoryInterface $requestFactory, private readonly string $baseUri, @@ -64,7 +64,7 @@ public function __construct( */ protected function getAuthorizationHeader(): string { - return $this->oauthProvider->getAuthorization(); + return ($this->tokenProvider)(); } /** @@ -110,7 +110,8 @@ protected function sendAuthenticatedRequest( string $method, string $uri, array $headers = [], - string|StreamInterface|null $body = null + string|StreamInterface|null $body = null, + bool $_retried = false ): ResponseInterface { try { $this->refreshToken(); @@ -118,6 +119,13 @@ protected function sendAuthenticatedRequest( $response = $this->httpClient->sendRequest($request); + // Change 1+3: On 401, call tokenProvider(true) to force-refresh, then retry once. + // $_retried prevents a second retry if the force-refreshed token is also rejected. + if ($response->getStatusCode() === 401 && !$_retried) { + ($this->tokenProvider)(true); + return $this->sendAuthenticatedRequest($method, $uri, $headers, $body, true); + } + // Manually check status code if ($response->getStatusCode() >= 400) { throw new ApiException( @@ -162,7 +170,7 @@ protected function sendAuthenticatedRequest( */ public function refreshToken(): void { - $this->oauthProvider->ensureValidToken(); + ($this->tokenProvider)(); } /** diff --git a/src/Api/AddOnsApi.php b/src/Api/AddOnsApi.php index ce642614..75edd96f 100644 --- a/src/Api/AddOnsApi.php +++ b/src/Api/AddOnsApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\OrganizationAddonsObject; use Upsun\Model\UpdateOrgAddonsRequest; @@ -26,25 +26,25 @@ final class AddOnsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/AlertsApi.php b/src/Api/AlertsApi.php index 3e939521..95416123 100644 --- a/src/Api/AlertsApi.php +++ b/src/Api/AlertsApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\GetUsageAlerts200Response; use Upsun\Model\UpdateUsageAlertsRequest; @@ -26,25 +26,25 @@ final class AlertsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/ApiConfiguration.php b/src/Api/ApiConfiguration.php index 590a06d1..963a8d05 100644 --- a/src/Api/ApiConfiguration.php +++ b/src/Api/ApiConfiguration.php @@ -5,7 +5,7 @@ use Upsun\Core\UserAgent; /** - * APIConfiguration holder for the Upsun API Client. + * ApiConfiguration holder for the Upsun API Client. * * This class holds API token and other runtime options * used by the generated client classes. diff --git a/src/Api/ApiTokensApi.php b/src/Api/ApiTokensApi.php index 4eaf8c68..3c77f73e 100644 --- a/src/Api/ApiTokensApi.php +++ b/src/Api/ApiTokensApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\ApiToken; use Upsun\Model\CreateApiTokenRequest; @@ -26,25 +26,25 @@ final class ApiTokensApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/AutoscalingApi.php b/src/Api/AutoscalingApi.php index 22a6ed7a..5207dedf 100644 --- a/src/Api/AutoscalingApi.php +++ b/src/Api/AutoscalingApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AutoscalerSettings; /** @@ -25,25 +25,25 @@ final class AutoscalingApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/BlackfireMonitoringApi.php b/src/Api/BlackfireMonitoringApi.php index e5634524..0a4e4bbf 100644 --- a/src/Api/BlackfireMonitoringApi.php +++ b/src/Api/BlackfireMonitoringApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; /** * Low level BlackfireMonitoringApi (auto-generated) @@ -25,25 +25,25 @@ final class BlackfireMonitoringApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/BlackfireProfilingApi.php b/src/Api/BlackfireProfilingApi.php index 7238b543..d844f1ff 100644 --- a/src/Api/BlackfireProfilingApi.php +++ b/src/Api/BlackfireProfilingApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\FilterSelect; /** @@ -26,25 +26,25 @@ final class BlackfireProfilingApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/CertManagementApi.php b/src/Api/CertManagementApi.php index 12d4da61..b4c9c46d 100644 --- a/src/Api/CertManagementApi.php +++ b/src/Api/CertManagementApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Certificate; use Upsun\Model\CertificateCreateInput; @@ -30,25 +30,25 @@ final class CertManagementApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/ConnectionsApi.php b/src/Api/ConnectionsApi.php index 1e215355..33665f5d 100644 --- a/src/Api/ConnectionsApi.php +++ b/src/Api/ConnectionsApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\Connection; /** @@ -25,25 +25,25 @@ final class ConnectionsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/ContinuousProfilingApi.php b/src/Api/ContinuousProfilingApi.php index b9489477..90075c5c 100644 --- a/src/Api/ContinuousProfilingApi.php +++ b/src/Api/ContinuousProfilingApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; /** * Low level ContinuousProfilingApi (auto-generated) @@ -25,25 +25,25 @@ final class ContinuousProfilingApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/DefaultApi.php b/src/Api/DefaultApi.php index 06c493c6..5739346c 100644 --- a/src/Api/DefaultApi.php +++ b/src/Api/DefaultApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\DateTimeFilter; use Upsun\Model\ListTickets200Response; use Upsun\Model\OrganizationCarbon; @@ -28,25 +28,25 @@ final class DefaultApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/DeploymentApi.php b/src/Api/DeploymentApi.php index 753a707d..785ac171 100644 --- a/src/Api/DeploymentApi.php +++ b/src/Api/DeploymentApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Deployment; use Upsun\Model\UpdateProjectsEnvironmentsDeploymentsNextRequest; @@ -27,25 +27,25 @@ final class DeploymentApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/DeploymentTargetApi.php b/src/Api/DeploymentTargetApi.php index 71c5f327..bede61cf 100644 --- a/src/Api/DeploymentTargetApi.php +++ b/src/Api/DeploymentTargetApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\DeploymentTarget; use Upsun\Model\DeploymentTargetCreateInput; @@ -28,25 +28,25 @@ final class DeploymentTargetApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/DiffApi.php b/src/Api/DiffApi.php index 8dbd7bb2..20b5664c 100644 --- a/src/Api/DiffApi.php +++ b/src/Api/DiffApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; /** * Low level DiffApi (auto-generated) @@ -24,25 +24,25 @@ final class DiffApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/DiscountsApi.php b/src/Api/DiscountsApi.php index a48b7c53..4eefdae1 100644 --- a/src/Api/DiscountsApi.php +++ b/src/Api/DiscountsApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\Discount; use Upsun\Model\GetTypeAllowance200Response; use Upsun\Model\ListOrgDiscounts200Response; @@ -27,25 +27,25 @@ final class DiscountsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/DomainClaimApi.php b/src/Api/DomainClaimApi.php index 5ceb267f..9b623478 100644 --- a/src/Api/DomainClaimApi.php +++ b/src/Api/DomainClaimApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\DomainClaim; @@ -26,25 +26,25 @@ final class DomainClaimApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/DomainManagementApi.php b/src/Api/DomainManagementApi.php index 92d33219..62653639 100644 --- a/src/Api/DomainManagementApi.php +++ b/src/Api/DomainManagementApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Domain; use Upsun\Model\DomainCreateInput; @@ -28,25 +28,25 @@ final class DomainManagementApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/EntrypointApi.php b/src/Api/EntrypointApi.php index 63146f45..4af29c63 100644 --- a/src/Api/EntrypointApi.php +++ b/src/Api/EntrypointApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; /** * Low level EntrypointApi (auto-generated) @@ -24,25 +24,25 @@ final class EntrypointApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/EnvironmentActivityApi.php b/src/Api/EnvironmentActivityApi.php index 198d0fd9..2e717b69 100644 --- a/src/Api/EnvironmentActivityApi.php +++ b/src/Api/EnvironmentActivityApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Activity; @@ -26,25 +26,25 @@ final class EnvironmentActivityApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/EnvironmentApi.php b/src/Api/EnvironmentApi.php index 55e56cb5..8e42dd37 100644 --- a/src/Api/EnvironmentApi.php +++ b/src/Api/EnvironmentApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Environment; use Upsun\Model\EnvironmentActivateInput; @@ -33,25 +33,25 @@ final class EnvironmentApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/EnvironmentBackupsApi.php b/src/Api/EnvironmentBackupsApi.php index 7a5c9657..ac643158 100644 --- a/src/Api/EnvironmentBackupsApi.php +++ b/src/Api/EnvironmentBackupsApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Backup; use Upsun\Model\EnvironmentBackupInput; @@ -28,25 +28,25 @@ final class EnvironmentBackupsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/EnvironmentTypeApi.php b/src/Api/EnvironmentTypeApi.php index 68405150..a8f673d5 100644 --- a/src/Api/EnvironmentTypeApi.php +++ b/src/Api/EnvironmentTypeApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\EnvironmentType; /** @@ -25,25 +25,25 @@ final class EnvironmentTypeApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/EnvironmentVariablesApi.php b/src/Api/EnvironmentVariablesApi.php index 2f9fb424..1e0b395b 100644 --- a/src/Api/EnvironmentVariablesApi.php +++ b/src/Api/EnvironmentVariablesApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentVariable; use Upsun\Model\EnvironmentVariableCreateInput; @@ -28,25 +28,25 @@ final class EnvironmentVariablesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/GrantsApi.php b/src/Api/GrantsApi.php index fe0ab827..31eb8dc0 100644 --- a/src/Api/GrantsApi.php +++ b/src/Api/GrantsApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\ListUserExtendedAccess200Response; use Upsun\Model\StringFilter; @@ -27,25 +27,25 @@ final class GrantsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/HttpTrafficApi.php b/src/Api/HttpTrafficApi.php index c0229f08..9a761db7 100644 --- a/src/Api/HttpTrafficApi.php +++ b/src/Api/HttpTrafficApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; /** * Low level HttpTrafficApi (auto-generated) @@ -25,25 +25,25 @@ final class HttpTrafficApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/InvoicesApi.php b/src/Api/InvoicesApi.php index e1131456..2c74fce1 100644 --- a/src/Api/InvoicesApi.php +++ b/src/Api/InvoicesApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\Invoice; use Upsun\Model\ListOrgInvoices200Response; @@ -27,25 +27,25 @@ final class InvoicesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/MfaApi.php b/src/Api/MfaApi.php index 085f6010..f770c4e0 100644 --- a/src/Api/MfaApi.php +++ b/src/Api/MfaApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\ConfirmTotpEnrollment200Response; use Upsun\Model\ConfirmTotpEnrollmentRequest; use Upsun\Model\GetTotpEnrollment200Response; @@ -29,25 +29,25 @@ final class MfaApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/OrdersApi.php b/src/Api/OrdersApi.php index 48d14b86..7d083f5c 100644 --- a/src/Api/OrdersApi.php +++ b/src/Api/OrdersApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateAuthorizationCredentials200Response; use Upsun\Model\ListOrgOrders200Response; use Upsun\Model\Order; @@ -28,25 +28,25 @@ final class OrdersApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/OrganizationInvitationsApi.php b/src/Api/OrganizationInvitationsApi.php index ea8b0654..c17efc23 100644 --- a/src/Api/OrganizationInvitationsApi.php +++ b/src/Api/OrganizationInvitationsApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateOrgInviteRequest; use Upsun\Model\OrganizationInvitation; use Upsun\Model\StringFilter; @@ -28,25 +28,25 @@ final class OrganizationInvitationsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/OrganizationManagementApi.php b/src/Api/OrganizationManagementApi.php index f1a049b4..21c67cbb 100644 --- a/src/Api/OrganizationManagementApi.php +++ b/src/Api/OrganizationManagementApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\GetOrgPrepaymentInfo200Response; use Upsun\Model\ListOrgPrepaymentTransactions200Response; use Upsun\Model\OrganizationAlertConfig; @@ -29,25 +29,25 @@ final class OrganizationManagementApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/OrganizationMembersApi.php b/src/Api/OrganizationMembersApi.php index 829db9c2..c8eb32f7 100644 --- a/src/Api/OrganizationMembersApi.php +++ b/src/Api/OrganizationMembersApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\ArrayFilter; use Upsun\Model\CreateOrgMemberRequest; use Upsun\Model\ListOrgMembers200Response; @@ -30,25 +30,25 @@ final class OrganizationMembersApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/OrganizationProjectsApi.php b/src/Api/OrganizationProjectsApi.php index 95bae7d2..a9c6095e 100644 --- a/src/Api/OrganizationProjectsApi.php +++ b/src/Api/OrganizationProjectsApi.php @@ -13,7 +13,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateOrgProjectRequest; use Upsun\Model\DateTimeFilter; use Upsun\Model\OrganizationProject; @@ -32,25 +32,25 @@ final class OrganizationProjectsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/OrganizationsApi.php b/src/Api/OrganizationsApi.php index dcc8e1b2..eea13f5f 100644 --- a/src/Api/OrganizationsApi.php +++ b/src/Api/OrganizationsApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\ArrayFilter; use Upsun\Model\CreateOrgRequest; use Upsun\Model\DateTimeFilter; @@ -33,25 +33,25 @@ final class OrganizationsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/PhoneNumberApi.php b/src/Api/PhoneNumberApi.php index 9dc60f07..a01f148a 100644 --- a/src/Api/PhoneNumberApi.php +++ b/src/Api/PhoneNumberApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\ConfirmPhoneNumberRequest; use Upsun\Model\VerifyPhoneNumber200Response; use Upsun\Model\VerifyPhoneNumberRequest; @@ -27,25 +27,25 @@ final class PhoneNumberApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/ProfilesApi.php b/src/Api/ProfilesApi.php index 345d62b5..91a71b3b 100644 --- a/src/Api/ProfilesApi.php +++ b/src/Api/ProfilesApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\Address; use Upsun\Model\Profile; use Upsun\Model\UpdateOrgProfileRequest; @@ -27,25 +27,25 @@ final class ProfilesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/ProjectActivityApi.php b/src/Api/ProjectActivityApi.php index 6998f4e1..c4659655 100644 --- a/src/Api/ProjectActivityApi.php +++ b/src/Api/ProjectActivityApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Activity; @@ -26,25 +26,25 @@ final class ProjectActivityApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/ProjectApi.php b/src/Api/ProjectApi.php index ab9332f3..3426dc8c 100644 --- a/src/Api/ProjectApi.php +++ b/src/Api/ProjectApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Project; use Upsun\Model\ProjectCapabilities; @@ -27,25 +27,25 @@ final class ProjectApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/ProjectInvitationsApi.php b/src/Api/ProjectInvitationsApi.php index ceae532c..d5dcfd56 100644 --- a/src/Api/ProjectInvitationsApi.php +++ b/src/Api/ProjectInvitationsApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateProjectInviteRequest; use Upsun\Model\ProjectInvitation; use Upsun\Model\StringFilter; @@ -28,25 +28,25 @@ final class ProjectInvitationsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/ProjectSettingsApi.php b/src/Api/ProjectSettingsApi.php index 42fda5de..f7254cea 100644 --- a/src/Api/ProjectSettingsApi.php +++ b/src/Api/ProjectSettingsApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\ProjectSettings; use Upsun\Model\ProjectSettingsPatch; @@ -27,25 +27,25 @@ final class ProjectSettingsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/ProjectVariablesApi.php b/src/Api/ProjectVariablesApi.php index 042b786c..66880a3a 100644 --- a/src/Api/ProjectVariablesApi.php +++ b/src/Api/ProjectVariablesApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\ProjectVariable; use Upsun\Model\ProjectVariableCreateInput; @@ -28,25 +28,25 @@ final class ProjectVariablesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/ProjectsApi.php b/src/Api/ProjectsApi.php index b24ab1fd..fc5f904c 100644 --- a/src/Api/ProjectsApi.php +++ b/src/Api/ProjectsApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; /** * Low level ProjectsApi (auto-generated) @@ -24,25 +24,25 @@ final class ProjectsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/RecordsApi.php b/src/Api/RecordsApi.php index 1b58f10c..d28dded6 100644 --- a/src/Api/RecordsApi.php +++ b/src/Api/RecordsApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\ListOrgPlanRecords200Response; use Upsun\Model\ListOrgUsageRecords200Response; @@ -27,25 +27,25 @@ final class RecordsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/ReferencesApi.php b/src/Api/ReferencesApi.php index a88ffe76..172e976d 100644 --- a/src/Api/ReferencesApi.php +++ b/src/Api/ReferencesApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; /** * Low level ReferencesApi (auto-generated) @@ -25,25 +25,25 @@ final class ReferencesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/RegionsApi.php b/src/Api/RegionsApi.php index 28bc68cf..455c0312 100644 --- a/src/Api/RegionsApi.php +++ b/src/Api/RegionsApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\Region; use Upsun\Model\StringFilter; @@ -27,25 +27,25 @@ final class RegionsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/RegistryCredentialApi.php b/src/Api/RegistryCredentialApi.php index 8d15f969..5b023dd3 100644 --- a/src/Api/RegistryCredentialApi.php +++ b/src/Api/RegistryCredentialApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\RegistryCredential; use Upsun\Model\RegistryCredentialCreateInput; @@ -28,25 +28,25 @@ final class RegistryCredentialApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/RepositoryApi.php b/src/Api/RepositoryApi.php index e3001a08..927b57e7 100644 --- a/src/Api/RepositoryApi.php +++ b/src/Api/RepositoryApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\Blob; use Upsun\Model\Commit; use Upsun\Model\Ref; @@ -28,25 +28,25 @@ final class RepositoryApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/ResourcesApi.php b/src/Api/ResourcesApi.php index fc693959..5f6eefff 100644 --- a/src/Api/ResourcesApi.php +++ b/src/Api/ResourcesApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; /** * Low level ResourcesApi (auto-generated) @@ -25,25 +25,25 @@ final class ResourcesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/RoutingApi.php b/src/Api/RoutingApi.php index 7980b4fd..583b8da9 100644 --- a/src/Api/RoutingApi.php +++ b/src/Api/RoutingApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\Route; /** @@ -25,25 +25,25 @@ final class RoutingApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/RuntimeOperationsApi.php b/src/Api/RuntimeOperationsApi.php index 88e1cdc2..6aa28582 100644 --- a/src/Api/RuntimeOperationsApi.php +++ b/src/Api/RuntimeOperationsApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentOperationInput; @@ -26,25 +26,25 @@ final class RuntimeOperationsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/SbomApi.php b/src/Api/SbomApi.php index 4b676e12..fbb0dfe2 100644 --- a/src/Api/SbomApi.php +++ b/src/Api/SbomApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\Sbom; /** @@ -25,25 +25,25 @@ final class SbomApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/SourceOperationsApi.php b/src/Api/SourceOperationsApi.php index b0b7fd2c..636287b8 100644 --- a/src/Api/SourceOperationsApi.php +++ b/src/Api/SourceOperationsApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentSourceOperationInput; @@ -26,25 +26,25 @@ final class SourceOperationsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/SshKeysApi.php b/src/Api/SshKeysApi.php index 212d0754..89c41f1f 100644 --- a/src/Api/SshKeysApi.php +++ b/src/Api/SshKeysApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateSshKeyRequest; use Upsun\Model\SshKey; @@ -26,25 +26,25 @@ final class SshKeysApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/SubscriptionsApi.php b/src/Api/SubscriptionsApi.php index 6f8fbed9..c1daba06 100644 --- a/src/Api/SubscriptionsApi.php +++ b/src/Api/SubscriptionsApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\CanAffordSubscriptionRequest; use Upsun\Model\CanCreateNewOrgSubscription200Response; use Upsun\Model\CanUpdateSubscription200Response; @@ -38,25 +38,25 @@ final class SubscriptionsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/SupportApi.php b/src/Api/SupportApi.php index 4a5d2b2f..eb1efd86 100644 --- a/src/Api/SupportApi.php +++ b/src/Api/SupportApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateTicketRequest; use Upsun\Model\Ticket; use Upsun\Model\UpdateTicketRequest; @@ -28,25 +28,25 @@ final class SupportApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/SystemInformationApi.php b/src/Api/SystemInformationApi.php index 8e5c3661..af4d9644 100644 --- a/src/Api/SystemInformationApi.php +++ b/src/Api/SystemInformationApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\SystemInformation; @@ -26,25 +26,25 @@ final class SystemInformationApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/TaskApi.php b/src/Api/TaskApi.php index 54e242f9..ed4b02d5 100644 --- a/src/Api/TaskApi.php +++ b/src/Api/TaskApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Task; use Upsun\Model\TaskTriggerInput; @@ -27,25 +27,25 @@ final class TaskApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/TeamAccessApi.php b/src/Api/TeamAccessApi.php index d2d68e8e..7311962f 100644 --- a/src/Api/TeamAccessApi.php +++ b/src/Api/TeamAccessApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\TeamProjectAccess; /** @@ -26,25 +26,25 @@ final class TeamAccessApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/TeamsApi.php b/src/Api/TeamsApi.php index e796a724..9daabde9 100644 --- a/src/Api/TeamsApi.php +++ b/src/Api/TeamsApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateTeamMemberRequest; use Upsun\Model\CreateTeamRequest; use Upsun\Model\DateTimeFilter; @@ -34,25 +34,25 @@ final class TeamsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/ThirdPartyIntegrationsApi.php b/src/Api/ThirdPartyIntegrationsApi.php index 34e72956..d49b35a9 100644 --- a/src/Api/ThirdPartyIntegrationsApi.php +++ b/src/Api/ThirdPartyIntegrationsApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Integration; use Upsun\Model\IntegrationCreateCreateInput; @@ -28,25 +28,25 @@ final class ThirdPartyIntegrationsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/UserAccessApi.php b/src/Api/UserAccessApi.php index 07eef371..546f6d41 100644 --- a/src/Api/UserAccessApi.php +++ b/src/Api/UserAccessApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\UpdateProjectUserAccessRequest; use Upsun\Model\UserProjectAccess; @@ -27,25 +27,25 @@ final class UserAccessApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/UserProfilesApi.php b/src/Api/UserProfilesApi.php index 92196c2b..7f86526d 100644 --- a/src/Api/UserProfilesApi.php +++ b/src/Api/UserProfilesApi.php @@ -12,7 +12,7 @@ use Psr\Http\Message\StreamFactoryInterface; use SplFileObject; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\Address; use Upsun\Model\CreateProfilePicture200Response; use Upsun\Model\ListProfiles200Response; @@ -30,25 +30,25 @@ final class UserProfilesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/UsersApi.php b/src/Api/UsersApi.php index ad7bab8a..dd428968 100644 --- a/src/Api/UsersApi.php +++ b/src/Api/UsersApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\CurrentUser; use Upsun\Model\GetCurrentUserVerificationStatus200Response; use Upsun\Model\GetCurrentUserVerificationStatusFull200Response; @@ -30,25 +30,25 @@ final class UsersApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Api/VouchersApi.php b/src/Api/VouchersApi.php index 47367a84..93bcca44 100644 --- a/src/Api/VouchersApi.php +++ b/src/Api/VouchersApi.php @@ -11,7 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; use Upsun\Model\ApplyOrgVoucherRequest; use Upsun\Model\Vouchers; @@ -26,25 +26,25 @@ final class VouchersApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/src/Core/OAuthProvider.php b/src/Core/OAuthProvider.php index b3ee19ec..a523e97d 100644 --- a/src/Core/OAuthProvider.php +++ b/src/Core/OAuthProvider.php @@ -3,6 +3,7 @@ namespace Upsun\Core; use Exception; +use Fiber; use Nyholm\Psr7\Stream; use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Client\ClientInterface; @@ -11,25 +12,50 @@ /** * class (auto-generated) * + * Token lifecycle follows RFC 6749 §6 and RFC 6750 §3.1: + * - Proactive refresh when token is within the 120 s expiry buffer (FIX 3) + * - On 401 from the resource server, forceRefresh() re-acquires unconditionally, + * preferring refresh_token grant over api_token grant (RFC 6749 Fig.2 steps F→G→H) + * - Re-entrance guard protects synchronous/Fiber contexts (FIX 5) + * * @license Apache-2.0 * @see https://docs.upsun.com * @generated This file was generated by OpenAPI Generator. Do not edit manually. */ -class OAuthProvider +class OAuthProvider implements TokenProvider { private ?string $accessToken = null; + private ?string $refreshToken = null; + private ?string $typeToken = null; private int $tokenExpiry = 0; + /** + * Fiber-based thundering-herd guard (Change 2). + * When non-null, a Fiber is already acquiring a token; other Fibers suspend until it finishes. + * In synchronous (FPM) contexts Fiber::getCurrent() returns null, so this is always null. + * + * @var Fiber|null + */ + private ?Fiber $acquiringFiber = null; + + /** Effective refresh endpoint (defaults to tokenEndpoint when not provided). */ + private readonly string $effectiveRefreshEndpoint; + public function __construct( private readonly ClientInterface $httpClient, private readonly RequestFactoryInterface $requestFactory, private readonly string $tokenEndpoint, private readonly string $clientId, - private readonly string $clientSecret + private readonly string $clientSecret, + ?string $refreshEndpoint = null, ) { + $this->effectiveRefreshEndpoint = $refreshEndpoint ?? $this->tokenEndpoint; } /** + * Exchanges the API token for an access token using the custom api_token grant. + * Uses tokenEndpoint (not refreshEndpoint). + * * @throws Exception */ public function exchangeCodeForToken(): bool @@ -37,8 +63,8 @@ public function exchangeCodeForToken(): bool try { $body = http_build_query([ 'grant_type' => 'api_token', - 'api_token' => $this->clientSecret, - 'client_id' => $this->clientId, + 'api_token' => $this->clientSecret, + 'client_id' => $this->clientId, ]); $request = $this->requestFactory->createRequest('POST', $this->tokenEndpoint) @@ -70,22 +96,144 @@ public function exchangeCodeForToken(): bool } } + /** + * Refreshes the access token using the refresh_token grant (RFC 6749 §6). + * Sends Authorization: Basic as required for confidential clients (RFC 6749 §3.2.1) (FIX 2). + * Uses effectiveRefreshEndpoint (FIX 4). + * + * @throws Exception + */ + private function refreshAccessToken(): void + { + try { + $body = http_build_query([ + 'grant_type' => 'refresh_token', + 'refresh_token' => $this->refreshToken, + 'client_id' => $this->clientId, + ]); + + $request = $this->requestFactory->createRequest('POST', $this->effectiveRefreshEndpoint) + ->withHeader('Authorization', 'Basic ' . base64_encode('platform-api-user:')) + ->withHeader('Content-Type', 'application/x-www-form-urlencoded') + ->withBody(Stream::create($body)); + + $response = $this->httpClient->sendRequest($request); + + if ($response->getStatusCode() !== 200) { + throw new Exception('Token refresh failed with status: ' . $response->getStatusCode()); + } + + $data = json_decode((string)$response->getBody(), true); + + if (json_last_error() !== JSON_ERROR_NONE) { + throw new Exception('Invalid JSON response from refresh: ' . json_last_error_msg()); + } + + if (!is_array($data) || empty($data['access_token'] ?? null)) { + throw new Exception('No access token in refresh response.'); + } + + $this->storeTokenData($data); + } catch (ClientExceptionInterface $e) { + throw new Exception('Token refresh failed: ' . $e->getMessage()); + } + } + + /** + * Acquires a token, preferring refresh_token grant over api_token grant. + * Falls back to api_token grant if refresh fails (RFC 6749 Fig.2 steps F→G→H). + * + * @throws Exception + */ + private function doAcquireToken(): void + { + if ($this->refreshToken) { + try { + $this->refreshAccessToken(); + return; + } catch (Exception) { + // Refresh token invalid/expired — fall back to full api_token exchange + $this->accessToken = null; + $this->refreshToken = null; + } + } + + $this->exchangeCodeForToken(); + } + private function storeTokenData(array $data): void { - $this->accessToken = $data['access_token'] ?? null; - $this->tokenExpiry = time() + ($data['expires_in'] ?? 0); + $this->typeToken = $data['token_type'] ?? null; + $this->accessToken = $data['access_token'] ?? null; + $this->refreshToken = $data['refresh_token'] ?? null; + $this->tokenExpiry = time() + ($data['expires_in'] ?? 0); + } + + /** + * Forces unconditional token re-acquisition, bypassing the expiry check. + * Called by the 401 retry path (RFC 6750 §3.1) (FIX 1 prerequisite). + * + * - Clears accessToken and tokenExpiry so ensureValidToken() triggers re-acquisition. + * - Does NOT clear refreshToken — the next ensureValidToken() call will prefer it. + * + * @throws Exception + */ + public function forceRefresh(): void + { + $this->accessToken = null; + $this->tokenExpiry = 0; + $this->ensureValidToken(); } /** + * Ensures a valid token is available, with a 120 s proactive buffer (FIX 3). + * Uses a Fiber-based thundering-herd guard (Change 2): + * - In Fiber contexts, concurrent callers suspend until the first acquisition completes. + * - In synchronous (FPM) contexts, Fiber::getCurrent() is null and the guard is a no-op. + * * @throws Exception */ public function ensureValidToken(): void { - $buffer = 60; + $buffer = 120; + if ($this->accessToken && time() <= ($this->tokenExpiry - $buffer)) { + return; // fast path — token is still valid + } + + if ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { + // Another Fiber is already acquiring — suspend until it finishes, + // then the token will be valid. In FPM/sync contexts this branch is + // never taken because acquiringFiber is always null. + while ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { + if (Fiber::getCurrent() !== null) { + Fiber::suspend(); + } + } + return; + } + + $this->acquiringFiber = Fiber::getCurrent(); // null in sync (FPM) context + try { + $this->doAcquireToken(); + } finally { + $this->acquiringFiber = null; + } + } - if (!$this->accessToken || time() > ($this->tokenExpiry - $buffer)) { - $this->exchangeCodeForToken(); + /** + * TokenProvider implementation: return the Authorization header value. + * When `$force` is true, unconditionally re-acquires the token first (401 retry path). + * + * @throws Exception + */ + public function __invoke(bool $force = false): string + { + if ($force) { + $this->forceRefresh(); + return 'Bearer ' . $this->accessToken; } + + return $this->getAuthorization(); } /** diff --git a/src/Core/TokenProvider.php b/src/Core/TokenProvider.php new file mode 100644 index 00000000..02436902 --- /dev/null +++ b/src/Core/TokenProvider.php @@ -0,0 +1,27 @@ + string` in the Node SDK. + * + * Implementations: + * @see \Upsun\Core\OAuthProvider — OAuth2 client-credentials implementation + * @see \Upsun\UpsunClient — façade covering OAuth2 and static bearer modes + */ +interface TokenProvider +{ + /** + * Return the current authorization header value (e.g. `"Bearer eyJ..."`). + * + * @param bool $force When true, force-refresh the token before returning. + * @return string The full Authorization header value. + */ + public function __invoke(bool $force = false): string; +} diff --git a/src/UpsunClient.php b/src/UpsunClient.php index 62b4f28c..b9ee2887 100644 --- a/src/UpsunClient.php +++ b/src/UpsunClient.php @@ -79,6 +79,7 @@ use Upsun\Core\Tasks\UsersTask; use Upsun\Core\Tasks\VariablesTask; use Upsun\Core\Tasks\WorkersTask; +use Upsun\Core\TokenProvider; /** * Upsun Client to interact with the API. @@ -93,7 +94,9 @@ class UpsunClient public ApiConfiguration $apiConfig; - public OAuthProvider $auth; + public ?OAuthProvider $auth = null; + + private ?string $bearerToken = null; public ?string $userId = null; @@ -156,15 +159,37 @@ public function __construct(protected UpsunConfig $upsunConfig, ?ClientInterface $requestFactory = Psr17FactoryDiscovery::findRequestFactory(); - $this->auth = new OAuthProvider( - httpClient: $this->apiClient, - requestFactory: $requestFactory, - tokenEndpoint: $this->upsunConfig->auth_url . "/" . $this->upsunConfig->token_endpoint, - clientId: $this->upsunConfig->clientId, - clientSecret: $this->upsunConfig->apiToken, - ); + if ($upsunConfig->apiToken !== '') { + $this->auth = new OAuthProvider( + httpClient: $this->apiClient, + requestFactory: $requestFactory, + tokenEndpoint: $this->upsunConfig->auth_url . '/' . $this->upsunConfig->token_endpoint, + clientId: $this->upsunConfig->clientId, + clientSecret: $this->upsunConfig->apiToken, + refreshEndpoint: $this->upsunConfig->auth_url . '/' . $this->upsunConfig->refresh_endpoint, + ); + } - $taskParams = [$this->auth, $this->apiClient, $requestFactory, $this->apiConfig]; + $tokenProvider = new class ($this) implements TokenProvider { + public function __construct(private readonly UpsunClient $client) + { + } + + public function __invoke(bool $force = false): string + { + if ($force && $this->client->auth !== null) { + $this->client->auth->forceRefresh(); + } + return $this->client->getToken(); + } + }; + + $taskParams = [ + $tokenProvider, + $this->apiClient, + $requestFactory, + $this->apiConfig, + ]; // Init used API classes $addOnsApi = new AddOnsApi(...$taskParams); @@ -358,8 +383,21 @@ private function discoverHttpClient(): ClientInterface } } + public function setBearerToken(string $token): void + { + $this->bearerToken = $token; + } + public function getToken(): string { - return $this->upsunConfig->apiToken; + if ($this->auth !== null) { + return $this->auth->getAuthorization(); + } + if ($this->bearerToken !== null) { + return 'Bearer ' . $this->bearerToken; + } + throw new RuntimeException( + 'No authentication method available. Provide an API key via UpsunConfig or call setBearerToken().' + ); } } diff --git a/templates/php/Configuration.mustache b/templates/php/Configuration.mustache index 9d421ea6..2393885f 100644 --- a/templates/php/Configuration.mustache +++ b/templates/php/Configuration.mustache @@ -5,7 +5,7 @@ namespace {{apiPackage}}; use Upsun\Core\UserAgent; /** - * APIConfiguration holder for the Upsun API Client. + * ApiConfiguration holder for the Upsun API Client. * * This class holds API token and other runtime options * used by the generated client classes. diff --git a/templates/php/abstract_api.mustache b/templates/php/abstract_api.mustache index 6b662ec4..a13695b1 100644 --- a/templates/php/abstract_api.mustache +++ b/templates/php/abstract_api.mustache @@ -3,22 +3,22 @@ namespace {{invokerPackage}}\Api; use Exception; -use InvalidArgumentException; -use JsonException; use Http\Client\Common\Plugin\RedirectPlugin; use Http\Client\Common\PluginClientFactory; use Http\Discovery\Psr17FactoryDiscovery; +use InvalidArgumentException; +use JsonException; use Psr\Http\Client\ClientExceptionInterface; -use Psr\Http\Message\StreamFactoryInterface; -use {{invokerPackage}}\Core\OAuthProvider; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\StreamFactoryInterface; +use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UriFactoryInterface; -use {{apiPackage}}\Serializer\ObjectSerializer; use Psr\Http\Message\UriInterface; -use Psr\Http\Message\StreamInterface; +use {{apiPackage}}\Serializer\ObjectSerializer; +use {{invokerPackage}}\Core\TokenProvider; use function sprintf; @@ -37,7 +37,7 @@ abstract class AbstractApi private readonly UriFactoryInterface $uriFactory; public function __construct( - private readonly OAuthProvider $oauthProvider, + private readonly TokenProvider $tokenProvider, private ClientInterface $httpClient, private readonly RequestFactoryInterface $requestFactory, private readonly string $baseUri, @@ -61,7 +61,7 @@ abstract class AbstractApi */ protected function getAuthorizationHeader(): string { - return $this->oauthProvider->getAuthorization(); + return ($this->tokenProvider)(); } /** @@ -107,7 +107,8 @@ abstract class AbstractApi string $method, string $uri, array $headers = [], - string|StreamInterface|null $body = null + string|StreamInterface|null $body = null, + bool $_retried = false ): ResponseInterface { try { $this->refreshToken(); @@ -115,6 +116,13 @@ abstract class AbstractApi $response = $this->httpClient->sendRequest($request); + // Change 1+3: On 401, call tokenProvider(true) to force-refresh, then retry once. + // $_retried prevents a second retry if the force-refreshed token is also rejected. + if ($response->getStatusCode() === 401 && !$_retried) { + ($this->tokenProvider)(true); + return $this->sendAuthenticatedRequest($method, $uri, $headers, $body, true); + } + // Manually check status code if ($response->getStatusCode() >= 400) { throw new ApiException( @@ -159,7 +167,7 @@ abstract class AbstractApi */ public function refreshToken(): void { - $this->oauthProvider->ensureValidToken(); + ($this->tokenProvider)(); } /** diff --git a/templates/php/libraries/psr-18/api.mustache b/templates/php/libraries/psr-18/api.mustache index c97f2a26..dcc5169c 100644 --- a/templates/php/libraries/psr-18/api.mustache +++ b/templates/php/libraries/psr-18/api.mustache @@ -12,7 +12,7 @@ use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use {{apiPackage}}\Serializer\ObjectSerializer; -use {{invokerPackage}}\Core\OAuthProvider; +use {{invokerPackage}}\Core\TokenProvider; /** * Low level {{classname}} (auto-generated) @@ -22,25 +22,25 @@ use {{invokerPackage}}\Core\OAuthProvider; { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } diff --git a/templates/php/oauth_provider.mustache b/templates/php/oauth_provider.mustache index 3382691d..ad52bebc 100644 --- a/templates/php/oauth_provider.mustache +++ b/templates/php/oauth_provider.mustache @@ -3,30 +3,56 @@ namespace {{invokerPackage}}\Core; use Exception; +use Fiber; +use Nyholm\Psr7\Stream; +use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; -use Psr\Http\Client\ClientExceptionInterface; -use Nyholm\Psr7\Stream; /** * {{classname}} class (auto-generated) * + * Token lifecycle follows RFC 6749 §6 and RFC 6750 §3.1: + * - Proactive refresh when token is within the 120 s expiry buffer (FIX 3) + * - On 401 from the resource server, forceRefresh() re-acquires unconditionally, + * preferring refresh_token grant over api_token grant (RFC 6749 Fig.2 steps F→G→H) + * - Re-entrance guard protects synchronous/Fiber contexts (FIX 5) + * {{> partial_internal_header }} */ -class OAuthProvider +class OAuthProvider implements TokenProvider { private ?string $accessToken = null; + private ?string $refreshToken = null; + private ?string $typeToken = null; private int $tokenExpiry = 0; + /** + * Fiber-based thundering-herd guard (Change 2). + * When non-null, a Fiber is already acquiring a token; other Fibers suspend until it finishes. + * In synchronous (FPM) contexts Fiber::getCurrent() returns null, so this is always null. + * + * @var Fiber|null + */ + private ?Fiber $acquiringFiber = null; + + /** Effective refresh endpoint (defaults to tokenEndpoint when not provided). */ + private readonly string $effectiveRefreshEndpoint; + public function __construct( private readonly ClientInterface $httpClient, private readonly RequestFactoryInterface $requestFactory, private readonly string $tokenEndpoint, private readonly string $clientId, - private readonly string $clientSecret + private readonly string $clientSecret, + ?string $refreshEndpoint = null, ) { + $this->effectiveRefreshEndpoint = $refreshEndpoint ?? $this->tokenEndpoint; } /** + * Exchanges the API token for an access token using the custom api_token grant. + * Uses tokenEndpoint (not refreshEndpoint). + * * @throws Exception */ public function exchangeCodeForToken(): bool @@ -34,8 +60,8 @@ class OAuthProvider try { $body = http_build_query([ 'grant_type' => 'api_token', - 'api_token' => $this->clientSecret, - 'client_id' => $this->clientId, + 'api_token' => $this->clientSecret, + 'client_id' => $this->clientId, ]); $request = $this->requestFactory->createRequest('POST', $this->tokenEndpoint) @@ -73,24 +99,146 @@ class OAuthProvider } } + /** + * Refreshes the access token using the refresh_token grant (RFC 6749 §6). + * Sends Authorization: Basic as required for confidential clients (RFC 6749 §3.2.1) (FIX 2). + * Uses effectiveRefreshEndpoint (FIX 4). + * + * @throws Exception + */ + private function refreshAccessToken(): void + { + try { + $body = http_build_query([ + 'grant_type' => 'refresh_token', + 'refresh_token' => $this->refreshToken, + 'client_id' => $this->clientId, + ]); + + $request = $this->requestFactory->createRequest('POST', $this->effectiveRefreshEndpoint) + ->withHeader('Authorization', 'Basic ' . base64_encode('{{basicUser}}:')) + ->withHeader('Content-Type', 'application/x-www-form-urlencoded') + ->withBody(Stream::create($body)); + + $response = $this->httpClient->sendRequest($request); + + if ($response->getStatusCode() !== 200) { + throw new Exception('Token refresh failed with status: ' . $response->getStatusCode()); + } + + $data = json_decode((string)$response->getBody(), true); + + if (json_last_error() !== JSON_ERROR_NONE) { + throw new Exception('Invalid JSON response from refresh: ' . json_last_error_msg()); + } + + if (!is_array($data) || empty($data['access_token'] ?? null)) { + throw new Exception('No access token in refresh response.'); + } + + $this->storeTokenData($data); + } catch (ClientExceptionInterface $e) { + throw new Exception('Token refresh failed: ' . $e->getMessage()); + } + } + + /** + * Acquires a token, preferring refresh_token grant over api_token grant. + * Falls back to api_token grant if refresh fails (RFC 6749 Fig.2 steps F→G→H). + * + * @throws Exception + */ + private function doAcquireToken(): void + { + if ($this->refreshToken) { + try { + $this->refreshAccessToken(); + return; + } catch (Exception) { + // Refresh token invalid/expired — fall back to full api_token exchange + $this->accessToken = null; + $this->refreshToken = null; + } + } + + $this->exchangeCodeForToken(); + } + private function storeTokenData(array $data): void { - $this->accessToken = $data['access_token'] ?? null; - $this->tokenExpiry = time() + ($data['expires_in'] ?? 0); + $this->typeToken = $data['token_type'] ?? null; + $this->accessToken = $data['access_token'] ?? null; + $this->refreshToken = $data['refresh_token'] ?? null; + $this->tokenExpiry = time() + ($data['expires_in'] ?? 0); + } + + /** + * Forces unconditional token re-acquisition, bypassing the expiry check. + * Called by the 401 retry path (RFC 6750 §3.1) (FIX 1 prerequisite). + * + * - Clears accessToken and tokenExpiry so ensureValidToken() triggers re-acquisition. + * - Does NOT clear refreshToken — the next ensureValidToken() call will prefer it. + * + * @throws Exception + */ + public function forceRefresh(): void + { + $this->accessToken = null; + $this->tokenExpiry = 0; + $this->ensureValidToken(); } /** + * Ensures a valid token is available, with a 120 s proactive buffer (FIX 3). + * Uses a Fiber-based thundering-herd guard (Change 2): + * - In Fiber contexts, concurrent callers suspend until the first acquisition completes. + * - In synchronous (FPM) contexts, Fiber::getCurrent() is null and the guard is a no-op. + * * @throws Exception */ public function ensureValidToken(): void { - $buffer = 60; + $buffer = 120; + if ($this->accessToken && time() <= ($this->tokenExpiry - $buffer)) { + return; // fast path — token is still valid + } - if (!$this->accessToken || time() > ($this->tokenExpiry - $buffer)) { - $this->exchangeCodeForToken(); + if ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { + // Another Fiber is already acquiring — suspend until it finishes, + // then the token will be valid. In FPM/sync contexts this branch is + // never taken because acquiringFiber is always null. + while ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { + if (Fiber::getCurrent() !== null) { + Fiber::suspend(); + } + } + return; + } + + $this->acquiringFiber = Fiber::getCurrent(); // null in sync (FPM) context + try { + $this->doAcquireToken(); + } finally { + $this->acquiringFiber = null; } } + /** + * TokenProvider implementation: return the Authorization header value. + * When `$force` is true, unconditionally re-acquires the token first (401 retry path). + * + * @throws Exception + */ + public function __invoke(bool $force = false): string + { + if ($force) { + $this->forceRefresh(); + return 'Bearer ' . $this->accessToken; + } + + return $this->getAuthorization(); + } + /** * @throws Exception */ diff --git a/tests/Api/AbstractApiTest.php b/tests/Api/AbstractApiTest.php new file mode 100644 index 00000000..745c25b7 --- /dev/null +++ b/tests/Api/AbstractApiTest.php @@ -0,0 +1,307 @@ +httpClient = $this->createMock(ClientInterface::class); + $this->psr17Factory = new Psr17Factory(); + $this->tokenCallCount = 0; + $this->forceRefreshCount = 0; + + // Anonymous class implementing TokenProvider: tracks call count and force-refresh requests. + $tokenProvider = new class ($this) implements TokenProvider { + public function __construct(private readonly AbstractApiTest $test) + { + } + + public function __invoke(bool $force = false): string + { + $this->test->tokenCallCount++; + if ($force) { + $this->test->forceRefreshCount++; + } + return 'Bearer test-token'; + } + }; + + $this->api = new class ( + $tokenProvider, + $this->httpClient, + $this->psr17Factory, + 'https://api.upsun.com', + $this->psr17Factory, + ) extends AbstractApi { + /** + * Expose the protected method publicly for testing. + * + * @throws ApiException + * @throws Exception + */ + public function callSendAuthenticatedRequest( + string $method, + string $uri, + array $headers = [], + string|StreamInterface|null $body = null + ): ResponseInterface { + return $this->sendAuthenticatedRequest($method, $uri, $headers, $body); + } + + /** + * Expose refreshToken() publicly for testing. + * + * @throws Exception + */ + public function callRefreshToken(): void + { + $this->refreshToken(); + } + }; + } + + /** + * FIX 1 — 200 response is returned as-is (no retry). + * + * @throws Exception + */ + public function testSendAuthenticatedRequestReturns200(): void + { + $expectedResponse = new Response(200, ['Content-Type' => 'application/json'], '{"ok":true}'); + + $this->httpClient + ->expects($this->once()) + ->method('sendRequest') + ->willReturn($expectedResponse); + + $response = $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + + $this->assertSame(200, $response->getStatusCode()); + } + + /** + * FIX 1 — On 401, forceRefresh() is called and the request is retried exactly once. + * If the retry succeeds (200), the successful response is returned. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestRetries401WithForceRefresh(): void + { + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnOnConsecutiveCalls( + new Response(401, [], 'Unauthorized'), + new Response(200, ['Content-Type' => 'application/json'], '{"ok":true}'), + ); + + $response = $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + + $this->assertSame(200, $response->getStatusCode()); + $this->assertSame(1, $this->forceRefreshCount, 'tokenProvider(force=true) should be called once on 401'); + } + + /** + * FIX 1 — On 401, retry is attempted. If retry also returns 401, ApiException is thrown. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestThrowsApiExceptionIfRetryAlso401(): void + { + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnOnConsecutiveCalls( + new Response(401, [], 'Unauthorized'), + new Response(401, [], 'Unauthorized'), + ); + + try { + $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + $this->fail('Expected ApiException was not thrown'); + } catch (ApiException) { + // expected — $_retried guard prevents a second forceRefresh on the already-retried call + } + + $this->assertSame(1, $this->forceRefreshCount, '$_retried guard: tokenProvider(force=true) called exactly once even on double-401'); + } + + /** + * FIX 1 — Non-401 4xx/5xx errors throw ApiException immediately without retry. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestThrowsApiExceptionOn403WithoutRetry(): void + { + $this->httpClient + ->expects($this->once()) // Only one request — no retry for non-401 + ->method('sendRequest') + ->willReturn(new Response(403, [], 'Forbidden')); + + try { + $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + $this->fail('Expected ApiException was not thrown'); + } catch (ApiException) { + // expected + } + + $this->assertSame(0, $this->forceRefreshCount, 'tokenProvider(force=true) should never be called for a 403'); + } + + /** + * FIX 1 — 500 errors throw ApiException immediately without retry. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestThrowsApiExceptionOn500WithoutRetry(): void + { + $this->httpClient + ->expects($this->once()) + ->method('sendRequest') + ->willReturn(new Response(500, [], 'Internal Server Error')); + + try { + $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + $this->fail('Expected ApiException was not thrown'); + } catch (ApiException) { + // expected + } + + $this->assertSame(0, $this->forceRefreshCount, 'tokenProvider(force=true) should never be called for a 500'); + } + + /** + * FIX 1 — ClientExceptionInterface (network failure) is wrapped in ApiException. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestWrapsClientException(): void + { + $networkError = new class ('Connection refused') extends Exception implements ClientExceptionInterface { + }; + + $this->httpClient + ->method('sendRequest') + ->willThrowException($networkError); + + $this->expectException(ApiException::class); + + $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + } + + /** + * Authorization header is set from OAuthProvider::getAuthorization(). + * + * @throws Exception + */ + public function testSendAuthenticatedRequestSetsAuthorizationHeader(): void + { + $capturedRequest = null; + + $this->httpClient + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use (&$capturedRequest) { + $capturedRequest = $request; + return new Response(200, [], '{}'); + }); + + $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + + $this->assertNotNull($capturedRequest); + $this->assertEquals('Bearer test-token', $capturedRequest->getHeaderLine('Authorization')); + } + + /** + * refreshToken() delegates to OAuthProvider::ensureValidToken(). + * + * @throws Exception + */ + public function testRefreshTokenCallsEnsureValidToken(): void + { + $this->api->callRefreshToken(); + + $this->assertSame(1, $this->tokenCallCount, 'refreshToken() should invoke the tokenProvider closure once'); + } + + /** + * Extra custom headers are forwarded in the request. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestForwardsCustomHeaders(): void + { + $capturedRequest = null; + + $this->httpClient + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use (&$capturedRequest) { + $capturedRequest = $request; + return new Response(200, [], '{}'); + }); + + $this->api->callSendAuthenticatedRequest( + 'POST', + '/v1/projects', + ['X-Custom-Header' => 'custom-value', 'Content-Type' => 'application/json'], + '{"title":"test"}' + ); + + $this->assertNotNull($capturedRequest); + $this->assertEquals('custom-value', $capturedRequest->getHeaderLine('X-Custom-Header')); + $this->assertStringContainsString('application/json', $capturedRequest->getHeaderLine('Content-Type')); + } + + /** + * Body is sent with the request. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestSendsBody(): void + { + $capturedRequest = null; + + $this->httpClient + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use (&$capturedRequest) { + $capturedRequest = $request; + return new Response(200, [], '{}'); + }); + + $this->api->callSendAuthenticatedRequest('POST', '/v1/projects', [], '{"title":"my-project"}'); + + $this->assertNotNull($capturedRequest); + $this->assertEquals('{"title":"my-project"}', (string)$capturedRequest->getBody()); + } +} diff --git a/tests/Core/OAuthProviderTest.php b/tests/Core/OAuthProviderTest.php index ebfe4cdb..b382dd9f 100644 --- a/tests/Core/OAuthProviderTest.php +++ b/tests/Core/OAuthProviderTest.php @@ -30,6 +30,8 @@ class OAuthProviderTest extends TestCase private string $tokenEndpoint = 'https://auth.upsun.com/oauth2/token'; + private string $refreshEndpoint = 'https://auth.upsun.com/oauth2/token'; + private string $clientId = 'test-client-id'; private string $clientSecret = 'test-api-token'; @@ -44,7 +46,8 @@ protected function setUp(): void $this->requestFactory, $this->tokenEndpoint, $this->clientId, - $this->clientSecret + $this->clientSecret, + $this->refreshEndpoint, ); } @@ -241,10 +244,10 @@ public function testEnsureValidTokenRefreshesExpiredToken() */ public function testEnsureValidTokenWithinBufferPeriodRefreshesToken() { - // Token that expires in less than 60 seconds (buffer period) + // Token that expires in less than 120 seconds (buffer period) $responseBody = json_encode([ 'access_token' => 'expiring-soon-token', - 'expires_in' => 30 // Less than 60 second buffer + 'expires_in' => 30 // Less than 120 second buffer ]); $refreshedResponse = json_encode([ @@ -326,6 +329,602 @@ public function testConstructorWithDifferentParameters() $this->assertTrue($result); } + /** + * FIX 2 — refreshAccessToken() sends Authorization: Basic header. + * + * @throws Exception + */ + public function testRefreshAccessTokenSendsBasicAuthHeader(): void + { + // First: exchange api_token to get an access_token + refresh_token + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'refresh-token-abc', + 'expires_in' => -1, // already expired → will trigger refresh on next call + ]); + + // Second: refresh call + $secondResponse = json_encode([ + 'access_token' => 'refreshed-token', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $secondResponse) { + $body = (string)$request->getBody(); + if (str_contains($body, 'grant_type=refresh_token')) { + // Assert Basic auth header present on refresh call (FIX 2) + $authHeader = $request->getHeaderLine('Authorization'); + $this->assertStringStartsWith('Basic ', $authHeader); + $this->assertEquals('Basic ' . base64_encode('platform-api-user:'), $authHeader); + return new Response(200, ['Content-Type' => 'application/json'], $secondResponse); + } + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer refreshed-token', $auth); + } + + /** + * FIX 2 — refreshAccessToken() uses grant_type=refresh_token. + * + * @throws Exception + */ + public function testRefreshAccessTokenUsesGrantTypeRefreshToken(): void + { + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'my-refresh-token', + 'expires_in' => -1, + ]); + + $secondResponse = json_encode([ + 'access_token' => 'refreshed-token', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $secondResponse) { + $body = (string)$request->getBody(); + if (str_contains($body, 'grant_type=refresh_token')) { + $this->assertStringContainsString('refresh_token=my-refresh-token', $body); + $this->assertStringContainsString('client_id=' . $this->clientId, $body); + return new Response(200, ['Content-Type' => 'application/json'], $secondResponse); + } + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $this->oauthProvider->getAuthorization(); + } + + /** + * FIX 1 + FIX 3 — Expired token with refresh_token available → refresh_token grant used first. + * + * @throws Exception + */ + public function testEnsureValidTokenPrefersRefreshTokenGrant(): void + { + $firstResponse = json_encode([ + 'access_token' => 'short-lived-token', + 'refresh_token' => 'stored-refresh-token', + 'expires_in' => -1, // immediately expired + ]); + + $refreshResponse = json_encode([ + 'access_token' => 'token-via-refresh', + 'expires_in' => 3600, + ]); + + $callCount = 0; + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $refreshResponse, &$callCount) { + $callCount++; + if ($callCount === 2) { + $body = (string)$request->getBody(); + $this->assertStringContainsString('grant_type=refresh_token', $body); + } + return new Response(200, ['Content-Type' => 'application/json'], $callCount === 1 ? $firstResponse : $refreshResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer token-via-refresh', $auth); + } + + /** + * FIX 1 + FIX 3 — If refresh fails, fallback to api_token grant. + * + * @throws Exception + */ + public function testFallbackToApiTokenIfRefreshFails(): void + { + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'bad-refresh-token', + 'expires_in' => -1, + ]); + + $fallbackResponse = json_encode([ + 'access_token' => 'fallback-token', + 'expires_in' => 3600, + ]); + + $callCount = 0; + $this->httpClient + ->expects($this->exactly(3)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $fallbackResponse, &$callCount) { + $callCount++; + $body = (string)$request->getBody(); + if ($callCount === 1) { + // Initial exchange + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + } + if ($callCount === 2) { + // Refresh attempt — fail with 401 + $this->assertStringContainsString('grant_type=refresh_token', $body); + return new Response(401, [], 'Unauthorized'); + } + // Fallback to api_token + $this->assertStringContainsString('grant_type=api_token', $body); + return new Response(200, ['Content-Type' => 'application/json'], $fallbackResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer fallback-token', $auth); + } + + /** + * FIX 1 — forceRefresh() triggers acquisition even when cached token appears valid. + * + * @throws Exception + */ + public function testForceRefreshTriggersAcquisitionEvenWithValidToken(): void + { + $firstResponse = json_encode([ + 'access_token' => 'valid-long-lived-token', + 'expires_in' => 7200, // 2 hours + ]); + + $forcedResponse = json_encode([ + 'access_token' => 'force-refreshed-token', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnOnConsecutiveCalls( + new Response(200, ['Content-Type' => 'application/json'], $firstResponse), + new Response(200, ['Content-Type' => 'application/json'], $forcedResponse), + ); + + $this->oauthProvider->getAuthorization(); // prime the cache + $this->oauthProvider->forceRefresh(); // must bypass cache + + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer force-refreshed-token', $auth); + } + + /** + * FIX 1 — forceRefresh() prefers refresh_token grant if one is available. + * + * @throws Exception + */ + public function testForceRefreshPrefersRefreshTokenIfAvailable(): void + { + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'my-refresh-token', + 'expires_in' => 7200, + ]); + + $refreshedResponse = json_encode([ + 'access_token' => 'force-refresh-via-refresh-grant', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $refreshedResponse) { + $body = (string)$request->getBody(); + if (str_contains($body, 'grant_type=refresh_token')) { + return new Response(200, ['Content-Type' => 'application/json'], $refreshedResponse); + } + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + }); + + $this->oauthProvider->getAuthorization(); // prime cache with refresh_token stored + $auth = $this->oauthProvider->forceRefresh(); // must use refresh_token grant + + $authorization = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer force-refresh-via-refresh-grant', $authorization); + } + + /** + * Change 2 — Fiber-based thundering-herd guard: concurrent Fiber callers only trigger + * one HTTP acquisition. The second Fiber suspends until the first finishes. + * + * @throws Exception + */ + public function testFiberGuardPreventsDoubleAcquisitionUnderConcurrency(): void + { + $httpCallCount = 0; + $tokenResponse = json_encode([ + 'access_token' => 'fiber-token', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->method('sendRequest') + ->willReturnCallback(function () use (&$httpCallCount, $tokenResponse) { + $httpCallCount++; + \Fiber::getCurrent()?->suspend(); // simulate async I/O suspending the Fiber + return new Response(200, ['Content-Type' => 'application/json'], $tokenResponse); + }); + + $provider = $this->oauthProvider; + + $fiber1 = new \Fiber(fn () => $provider->ensureValidToken()); + $fiber2 = new \Fiber(fn () => $provider->ensureValidToken()); + + // Fiber1 starts acquiring and suspends mid-HTTP call + $fiber1->start(); + // Fiber2 detects Fiber1 is acquiring; suspends in the while-loop guard + $fiber2->start(); + + // Fiber1 resumes: HTTP call returns, token stored, acquiringFiber cleared + $fiber1->resume(); + // Fiber2 resumes: while-loop sees acquiringFiber=null, exits, returns without HTTP call + $fiber2->resume(); + + $this->assertTrue($fiber1->isTerminated()); + $this->assertTrue($fiber2->isTerminated()); + $this->assertSame(1, $httpCallCount, 'Fiber guard: only one HTTP call should be made under concurrent access'); + } + + /** + * FIX 4 — refreshAccessToken() sends request to refreshEndpoint, not tokenEndpoint. + * + * @throws Exception + */ + public function testRefreshEndpointUsedForRefreshTokenGrant(): void + { + $distinctRefreshEndpoint = 'https://auth.upsun.com/oauth2/refresh'; + + $provider = new OAuthProvider( + $this->httpClient, + $this->requestFactory, + $this->tokenEndpoint, + $this->clientId, + $this->clientSecret, + $distinctRefreshEndpoint, + ); + + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'refresh-token-xyz', + 'expires_in' => -1, + ]); + + $refreshResponse = json_encode([ + 'access_token' => 'token-from-refresh-endpoint', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $refreshResponse, $distinctRefreshEndpoint) { + $body = (string)$request->getBody(); + if (str_contains($body, 'grant_type=refresh_token')) { + // Must target the refresh endpoint, not the token endpoint + $this->assertEquals($distinctRefreshEndpoint, (string)$request->getUri()); + return new Response(200, ['Content-Type' => 'application/json'], $refreshResponse); + } + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + }); + + $provider->exchangeCodeForToken(); + $auth = $provider->getAuthorization(); + $this->assertEquals('Bearer token-from-refresh-endpoint', $auth); + } + + /** + * FIX 3 — 120 s proactive buffer: expires_in < 120 triggers refresh; >= 121 does not. + * + * @throws Exception + */ + public function testBuffer120SecondsTriggersProactiveRefresh(): void + { + // Case A: expires_in=119 → within 120 s buffer → refresh triggered + $almostExpiredResponse = json_encode([ + 'access_token' => 'almost-expired-token', + 'expires_in' => 119, + ]); + $refreshedResponse = json_encode([ + 'access_token' => 'buffer-refreshed-token', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->method('sendRequest') + ->willReturnOnConsecutiveCalls( + new Response(200, ['Content-Type' => 'application/json'], $almostExpiredResponse), + new Response(200, ['Content-Type' => 'application/json'], $refreshedResponse), + ); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); // should detect buffer and refresh + $this->assertEquals('Bearer buffer-refreshed-token', $auth); + + // Case B: expires_in=121 → outside 120 s buffer → no refresh on same-second call + $provider2 = new OAuthProvider( + $this->createMock(ClientInterface::class), + $this->requestFactory, + $this->tokenEndpoint, + $this->clientId, + $this->clientSecret, + ); + + $longLivedResponse = json_encode([ + 'access_token' => 'long-lived-token', + 'expires_in' => 121, + ]); + + /** @var ClientInterface&\PHPUnit\Framework\MockObject\MockObject $client2 */ + $client2 = $this->createMock(ClientInterface::class); + $client2->expects($this->once()) // only the initial exchange, no re-fetch + ->method('sendRequest') + ->willReturn(new Response(200, ['Content-Type' => 'application/json'], $longLivedResponse)); + + $provider2 = new OAuthProvider( + $client2, + $this->requestFactory, + $this->tokenEndpoint, + $this->clientId, + $this->clientSecret, + ); + + $provider2->exchangeCodeForToken(); + $provider2->getAuthorization(); // must NOT trigger a second HTTP call + } + + /** + * FIX 2 — refreshAccessToken() throws (and doAcquireToken falls back) when refresh response + * contains invalid JSON. + * + * @throws Exception + */ + public function testRefreshAccessTokenFallsBackOnInvalidJsonResponse(): void + { + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'valid-refresh-token', + 'expires_in' => -1, + ]); + + $fallbackResponse = json_encode([ + 'access_token' => 'api-token-fallback', + 'expires_in' => 3600, + ]); + + $callCount = 0; + $this->httpClient + ->expects($this->exactly(3)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $fallbackResponse, &$callCount) { + $callCount++; + $body = (string)$request->getBody(); + if ($callCount === 1) { + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + } + if ($callCount === 2) { + // Refresh request — return invalid JSON + $this->assertStringContainsString('grant_type=refresh_token', $body); + return new Response(200, ['Content-Type' => 'application/json'], 'not-valid-json{{{'); + } + // Fallback to api_token + $this->assertStringContainsString('grant_type=api_token', $body); + return new Response(200, ['Content-Type' => 'application/json'], $fallbackResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer api-token-fallback', $auth); + } + + /** + * FIX 2 — refreshAccessToken() throws (and doAcquireToken falls back) when refresh response + * has no access_token. + * + * @throws Exception + */ + public function testRefreshAccessTokenFallsBackWhenMissingAccessToken(): void + { + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'valid-refresh-token', + 'expires_in' => -1, + ]); + + $refreshWithoutToken = json_encode([ + 'expires_in' => 3600, + ]); + + $fallbackResponse = json_encode([ + 'access_token' => 'api-token-fallback', + 'expires_in' => 3600, + ]); + + $callCount = 0; + $this->httpClient + ->expects($this->exactly(3)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $refreshWithoutToken, $fallbackResponse, &$callCount) { + $callCount++; + $body = (string)$request->getBody(); + if ($callCount === 1) { + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + } + if ($callCount === 2) { + $this->assertStringContainsString('grant_type=refresh_token', $body); + return new Response(200, ['Content-Type' => 'application/json'], $refreshWithoutToken); + } + $this->assertStringContainsString('grant_type=api_token', $body); + return new Response(200, ['Content-Type' => 'application/json'], $fallbackResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer api-token-fallback', $auth); + } + + /** + * FIX 2 — refreshAccessToken() wraps ClientExceptionInterface and doAcquireToken falls back. + * + * @throws Exception + */ + public function testRefreshAccessTokenFallsBackOnClientException(): void + { + $networkError = new class ('Connection timed out') extends \Exception implements ClientExceptionInterface { + }; + + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'valid-refresh-token', + 'expires_in' => -1, + ]); + + $fallbackResponse = json_encode([ + 'access_token' => 'api-token-fallback', + 'expires_in' => 3600, + ]); + + $callCount = 0; + $this->httpClient + ->expects($this->exactly(3)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $fallbackResponse, $networkError, &$callCount) { + $callCount++; + $body = (string)$request->getBody(); + if ($callCount === 1) { + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + } + if ($callCount === 2) { + $this->assertStringContainsString('grant_type=refresh_token', $body); + throw $networkError; + } + $this->assertStringContainsString('grant_type=api_token', $body); + return new Response(200, ['Content-Type' => 'application/json'], $fallbackResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer api-token-fallback', $auth); + } + + /** + * storeTokenData() — token_type and refresh_token from response are stored. + * Verified by checking that a subsequent expiry triggers refresh_token grant (not api_token). + * + * @throws Exception + */ + public function testStoreTokenDataPersistsRefreshToken(): void + { + $initialResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'persisted-refresh-token', + 'token_type' => 'Bearer', + 'expires_in' => -1, + ]); + + $refreshResponse = json_encode([ + 'access_token' => 'refreshed-via-stored-token', + 'expires_in' => 3600, + ]); + + $callCount = 0; + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($initialResponse, $refreshResponse, &$callCount) { + $callCount++; + $body = (string)$request->getBody(); + if ($callCount === 2) { + // The stored refresh_token must appear in the refresh call body + $this->assertStringContainsString('grant_type=refresh_token', $body); + $this->assertStringContainsString('refresh_token=persisted-refresh-token', $body); + } + return new Response( + 200, + ['Content-Type' => 'application/json'], + $callCount === 1 ? $initialResponse : $refreshResponse + ); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer refreshed-via-stored-token', $auth); + } + + /** + * FIX 4 — When no refreshEndpoint is provided, tokenEndpoint is used as fallback. + * + * @throws Exception + */ + public function testRefreshEndpointDefaultsToTokenEndpoint(): void + { + // Construct a provider WITHOUT a refreshEndpoint + $provider = new OAuthProvider( + $this->httpClient, + $this->requestFactory, + $this->tokenEndpoint, + $this->clientId, + $this->clientSecret, + // no refreshEndpoint + ); + + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'refresh-abc', + 'expires_in' => -1, + ]); + + $refreshResponse = json_encode([ + 'access_token' => 'token-after-refresh', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $refreshResponse) { + $body = (string)$request->getBody(); + if (str_contains($body, 'grant_type=refresh_token')) { + // Should target tokenEndpoint (the default) + $this->assertEquals($this->tokenEndpoint, (string)$request->getUri()); + return new Response(200, ['Content-Type' => 'application/json'], $refreshResponse); + } + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + }); + + $provider->exchangeCodeForToken(); + $auth = $provider->getAuthorization(); + $this->assertEquals('Bearer token-after-refresh', $auth); + } + /** * @throws Exception */ diff --git a/tests/Core/Tasks/ActivitiesTaskTest.php b/tests/Core/Tasks/ActivitiesTaskTest.php index 16d639aa..786ae56b 100644 --- a/tests/Core/Tasks/ActivitiesTaskTest.php +++ b/tests/Core/Tasks/ActivitiesTaskTest.php @@ -10,8 +10,8 @@ use Upsun\Api\ApiException; use Upsun\Api\EnvironmentActivityApi; use Upsun\Api\ProjectActivityApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\ActivitiesTask; +use Upsun\Core\TokenProvider; use Upsun\UpsunClient; class ActivitiesTaskTest extends BaseTestCase @@ -30,7 +30,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/ApplicationsTaskTest.php b/tests/Core/Tasks/ApplicationsTaskTest.php index 26f0350a..6a8585bf 100644 --- a/tests/Core/Tasks/ApplicationsTaskTest.php +++ b/tests/Core/Tasks/ApplicationsTaskTest.php @@ -9,9 +9,9 @@ use Upsun\Api\DeploymentApi; use Upsun\Api\EnvironmentApi; use Upsun\Api\EnvironmentTypeApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\ApplicationsTask; use Upsun\Core\Tasks\EnvironmentsTask; +use Upsun\Core\TokenProvider; use Upsun\UpsunClient; class ApplicationsTaskTest extends BaseTestCase @@ -31,7 +31,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/BackupsTaskTest.php b/tests/Core/Tasks/BackupsTaskTest.php index 604dfc50..1794b271 100644 --- a/tests/Core/Tasks/BackupsTaskTest.php +++ b/tests/Core/Tasks/BackupsTaskTest.php @@ -9,8 +9,8 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; use Upsun\Api\EnvironmentBackupsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\BackupsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Backup; use Upsun\UpsunClient; @@ -31,7 +31,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/BaseTestCase.php b/tests/Core/Tasks/BaseTestCase.php index 8af529c4..bb5b0e53 100644 --- a/tests/Core/Tasks/BaseTestCase.php +++ b/tests/Core/Tasks/BaseTestCase.php @@ -11,7 +11,7 @@ use Psr\Http\Client\ClientInterface; use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; -use Upsun\Core\OAuthProvider; +use Upsun\Core\TokenProvider; abstract class BaseTestCase extends TestCase { @@ -94,7 +94,7 @@ protected function assertObjectMatchesArray(array $actual, array $expected, stri /** * Create standard API class parameters for testing. - * Returns array: [OAuthProvider, ClientInterface, Psr17Factory, ApiConfiguration] + * Returns array: [TokenProvider, ClientInterface, Psr17Factory, ApiConfiguration] * * @param ClientInterface|null $httpClient Optional HTTP client mock to use * @return array @@ -106,7 +106,12 @@ protected function createApiClassParams(?ClientInterface $httpClient = null): ar } return [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/CertificatesTaskTest.php b/tests/Core/Tasks/CertificatesTaskTest.php index 2375d99f..6c11a6c5 100644 --- a/tests/Core/Tasks/CertificatesTaskTest.php +++ b/tests/Core/Tasks/CertificatesTaskTest.php @@ -10,8 +10,8 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; use Upsun\Api\CertManagementApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\CertificatesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Certificate; use Upsun\UpsunClient; @@ -32,7 +32,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/DomainsTaskTest.php b/tests/Core/Tasks/DomainsTaskTest.php index 3f01dfb2..991eb627 100644 --- a/tests/Core/Tasks/DomainsTaskTest.php +++ b/tests/Core/Tasks/DomainsTaskTest.php @@ -9,8 +9,8 @@ use Psr\Http\Client\ClientInterface; use Upsun\Api\ApiConfiguration; use Upsun\Api\DomainManagementApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\DomainsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\DomainPatch; use Upsun\Model\ProdDomainStorage; @@ -36,7 +36,13 @@ class_exists(ReplacementDomainStorage::class); $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/EnvironmentsTaskTest.php b/tests/Core/Tasks/EnvironmentsTaskTest.php index 9d298d77..3cce0fca 100644 --- a/tests/Core/Tasks/EnvironmentsTaskTest.php +++ b/tests/Core/Tasks/EnvironmentsTaskTest.php @@ -20,7 +20,6 @@ use Upsun\Api\ProjectVariablesApi; use Upsun\Api\RoutingApi; use Upsun\Api\SourceOperationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\ActivitiesTask; use Upsun\Core\Tasks\BackupsTask; use Upsun\Core\Tasks\DomainsTask; @@ -28,6 +27,7 @@ use Upsun\Core\Tasks\RoutesTask; use Upsun\Core\Tasks\SourceOperationsTask; use Upsun\Core\Tasks\VariablesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Activity; use Upsun\Model\Backup; @@ -59,7 +59,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/IntegrationsTaskTest.php b/tests/Core/Tasks/IntegrationsTaskTest.php index 8336ba4d..148ef842 100644 --- a/tests/Core/Tasks/IntegrationsTaskTest.php +++ b/tests/Core/Tasks/IntegrationsTaskTest.php @@ -10,8 +10,8 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; use Upsun\Api\ThirdPartyIntegrationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\IntegrationsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\GitHubIntegrationCreateInput; use Upsun\Model\GitHubIntegrationPatch; @@ -33,7 +33,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/InvitationsTaskTest.php b/tests/Core/Tasks/InvitationsTaskTest.php index bf6ac248..7229b69a 100644 --- a/tests/Core/Tasks/InvitationsTaskTest.php +++ b/tests/Core/Tasks/InvitationsTaskTest.php @@ -11,8 +11,8 @@ use Upsun\Api\ApiException; use Upsun\Api\OrganizationInvitationsApi; use Upsun\Api\ProjectInvitationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\UsersInvitationsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\OrganizationInvitation; use Upsun\Model\ProjectInvitation; use Upsun\UpsunClient; @@ -36,7 +36,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/MountsTaskTest.php b/tests/Core/Tasks/MountsTaskTest.php index d0b0d767..2b581c6d 100644 --- a/tests/Core/Tasks/MountsTaskTest.php +++ b/tests/Core/Tasks/MountsTaskTest.php @@ -10,9 +10,9 @@ use Upsun\Api\DeploymentApi; use Upsun\Api\EnvironmentApi; use Upsun\Api\EnvironmentTypeApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\EnvironmentsTask; use Upsun\Core\Tasks\MountsTask; +use Upsun\Core\TokenProvider; use Upsun\UpsunClient; class MountsTaskTest extends BaseTestCase @@ -32,7 +32,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/OperationsTaskTest.php b/tests/Core/Tasks/OperationsTaskTest.php index ce9f8052..48fc447c 100644 --- a/tests/Core/Tasks/OperationsTaskTest.php +++ b/tests/Core/Tasks/OperationsTaskTest.php @@ -9,8 +9,8 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; use Upsun\Api\RuntimeOperationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\OperationsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\UpsunClient; @@ -30,7 +30,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/OrganizationsTaskTest.php b/tests/Core/Tasks/OrganizationsTaskTest.php index 05eacee9..adf4e905 100644 --- a/tests/Core/Tasks/OrganizationsTaskTest.php +++ b/tests/Core/Tasks/OrganizationsTaskTest.php @@ -31,11 +31,11 @@ use Upsun\Api\UserProfilesApi; use Upsun\Api\UsersApi; use Upsun\Api\VouchersApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\OrganizationsTask; use Upsun\Core\Tasks\ProjectsTask; use Upsun\Core\Tasks\TeamsTask; use Upsun\Core\Tasks\UsersTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Address; use Upsun\Model\CanCreateNewOrgSubscription200Response; @@ -78,7 +78,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/ProjectsTaskTest.php b/tests/Core/Tasks/ProjectsTaskTest.php index 4b43f74d..89295b2a 100644 --- a/tests/Core/Tasks/ProjectsTaskTest.php +++ b/tests/Core/Tasks/ProjectsTaskTest.php @@ -54,7 +54,6 @@ use Upsun\Api\UserProfilesApi; use Upsun\Api\UsersApi; use Upsun\Api\VouchersApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\ActivitiesTask; use Upsun\Core\Tasks\ApplicationsTask; use Upsun\Core\Tasks\BackupsTask; @@ -78,6 +77,7 @@ use Upsun\Core\Tasks\UsersTask; use Upsun\Core\Tasks\VariablesTask; use Upsun\Core\Tasks\WorkersTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Activity; use Upsun\Model\Certificate; @@ -112,7 +112,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/RegionsTaskTest.php b/tests/Core/Tasks/RegionsTaskTest.php index 60310ee8..1754fac8 100644 --- a/tests/Core/Tasks/RegionsTaskTest.php +++ b/tests/Core/Tasks/RegionsTaskTest.php @@ -10,8 +10,8 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; use Upsun\Api\RegionsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\RegionsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\Region; use Upsun\UpsunClient; @@ -31,7 +31,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/RepositoriesTaskTest.php b/tests/Core/Tasks/RepositoriesTaskTest.php index 796d1541..aa500215 100644 --- a/tests/Core/Tasks/RepositoriesTaskTest.php +++ b/tests/Core/Tasks/RepositoriesTaskTest.php @@ -11,8 +11,8 @@ use Upsun\Api\ApiException; use Upsun\Api\RepositoryApi; use Upsun\Api\SystemInformationApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\RepositoriesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\Blob; use Upsun\Model\Commit; use Upsun\Model\Ref; @@ -36,7 +36,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/ResourcesTaskTest.php b/tests/Core/Tasks/ResourcesTaskTest.php index 34bcd1eb..177a3b89 100644 --- a/tests/Core/Tasks/ResourcesTaskTest.php +++ b/tests/Core/Tasks/ResourcesTaskTest.php @@ -10,8 +10,8 @@ use Upsun\Api\ApiException; use Upsun\Api\AutoscalingApi; use Upsun\Api\DeploymentApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\ResourcesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\UpsunClient; @@ -31,7 +31,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/RoutesTaskTest.php b/tests/Core/Tasks/RoutesTaskTest.php index 290aefae..9b957353 100644 --- a/tests/Core/Tasks/RoutesTaskTest.php +++ b/tests/Core/Tasks/RoutesTaskTest.php @@ -9,8 +9,8 @@ use Psr\Http\Client\ClientInterface; use Upsun\Api\ApiConfiguration; use Upsun\Api\RoutingApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\RoutesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\Route; use Upsun\UpsunClient; @@ -30,7 +30,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/ServicesTaskTest.php b/tests/Core/Tasks/ServicesTaskTest.php index b3f5b3b3..19e76e55 100644 --- a/tests/Core/Tasks/ServicesTaskTest.php +++ b/tests/Core/Tasks/ServicesTaskTest.php @@ -10,9 +10,9 @@ use Upsun\Api\DeploymentApi; use Upsun\Api\EnvironmentApi; use Upsun\Api\EnvironmentTypeApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\EnvironmentsTask; use Upsun\Core\Tasks\ServicesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\ServicesValue; use Upsun\UpsunClient; @@ -34,7 +34,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/SourceOperationsTaskTest.php b/tests/Core/Tasks/SourceOperationsTaskTest.php index 594dc0a2..3660060e 100644 --- a/tests/Core/Tasks/SourceOperationsTaskTest.php +++ b/tests/Core/Tasks/SourceOperationsTaskTest.php @@ -9,8 +9,8 @@ use Psr\Http\Client\ClientInterface; use Upsun\Api\ApiConfiguration; use Upsun\Api\SourceOperationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\SourceOperationsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentSourceOperation; use Upsun\UpsunClient; @@ -31,7 +31,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/SshTaskTest.php b/tests/Core/Tasks/SshTaskTest.php index 9142228d..9d1ca275 100644 --- a/tests/Core/Tasks/SshTaskTest.php +++ b/tests/Core/Tasks/SshTaskTest.php @@ -10,8 +10,8 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; use Upsun\Api\SshKeysApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\SshTask; +use Upsun\Core\TokenProvider; use Upsun\Model\SshKey; use Upsun\UpsunClient; @@ -31,7 +31,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/SupportTicketsTaskTest.php b/tests/Core/Tasks/SupportTicketsTaskTest.php index 8877bdf5..a44cef3b 100644 --- a/tests/Core/Tasks/SupportTicketsTaskTest.php +++ b/tests/Core/Tasks/SupportTicketsTaskTest.php @@ -19,9 +19,9 @@ use Upsun\Api\SupportApi; use Upsun\Api\SystemInformationApi; use Upsun\Api\ThirdPartyIntegrationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\ProjectsTask; use Upsun\Core\Tasks\SupportTicketsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\ListTicketCategories200ResponseInner; use Upsun\Model\ListTicketPriorities200ResponseInner; use Upsun\Model\ListTickets200Response; @@ -44,7 +44,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/TeamsTaskTest.php b/tests/Core/Tasks/TeamsTaskTest.php index b160fe68..de5540ba 100644 --- a/tests/Core/Tasks/TeamsTaskTest.php +++ b/tests/Core/Tasks/TeamsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -11,7 +12,6 @@ use Upsun\Api\ApiException; use Upsun\Api\TeamAccessApi; use Upsun\Api\TeamsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\TeamsTask; use Upsun\Model\{ListProjectTeamAccess200Response, ListTeamMembers200Response, @@ -36,7 +36,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/UsersInvitationsTaskTest.php b/tests/Core/Tasks/UsersInvitationsTaskTest.php index 955eb448..90cfe799 100644 --- a/tests/Core/Tasks/UsersInvitationsTaskTest.php +++ b/tests/Core/Tasks/UsersInvitationsTaskTest.php @@ -11,8 +11,8 @@ use Upsun\Api\ApiException; use Upsun\Api\OrganizationInvitationsApi; use Upsun\Api\ProjectInvitationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\UsersInvitationsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\OrganizationInvitation; use Upsun\Model\ProjectInvitation; use Upsun\UpsunClient; @@ -33,7 +33,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/UsersTaskTest.php b/tests/Core/Tasks/UsersTaskTest.php index 78e127e5..7e3cbabf 100644 --- a/tests/Core/Tasks/UsersTaskTest.php +++ b/tests/Core/Tasks/UsersTaskTest.php @@ -18,8 +18,8 @@ use Upsun\Api\UserAccessApi; use Upsun\Api\UserProfilesApi; use Upsun\Api\UsersApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\UsersTask; +use Upsun\Core\TokenProvider; use Upsun\Model\ApiToken; use Upsun\Model\ConfirmTotpEnrollment200Response; use Upsun\Model\Connection; @@ -53,7 +53,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/VariablesTaskTest.php b/tests/Core/Tasks/VariablesTaskTest.php index 10a2862b..177cd96e 100644 --- a/tests/Core/Tasks/VariablesTaskTest.php +++ b/tests/Core/Tasks/VariablesTaskTest.php @@ -11,8 +11,8 @@ use Upsun\Api\ApiException; use Upsun\Api\EnvironmentVariablesApi; use Upsun\Api\ProjectVariablesApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\VariablesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentVariable; use Upsun\Model\ProjectVariable; @@ -34,7 +34,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/WorkersTaskTest.php b/tests/Core/Tasks/WorkersTaskTest.php index 814d170b..1a2c2714 100644 --- a/tests/Core/Tasks/WorkersTaskTest.php +++ b/tests/Core/Tasks/WorkersTaskTest.php @@ -13,9 +13,9 @@ use Upsun\Api\DeploymentApi; use Upsun\Api\EnvironmentApi; use Upsun\Api\EnvironmentTypeApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\EnvironmentsTask; use Upsun\Core\Tasks\WorkersTask; +use Upsun\Core\TokenProvider; use Upsun\Model\WorkersValue; use Upsun\UpsunClient; @@ -35,7 +35,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() @@ -51,7 +57,13 @@ protected function setUp(): void $upsunClient->environments = $environmentsTask; $apiClassParams = [ - $this->createMock(OAuthProvider::class), + new class implements TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/UpsunClientTest.php b/tests/UpsunClientTest.php index 783c9d1f..c5971d8c 100644 --- a/tests/UpsunClientTest.php +++ b/tests/UpsunClientTest.php @@ -191,11 +191,43 @@ public function testConstructorInitializesWorkersTask() $this->assertInstanceOf(WorkersTask::class, $this->upsunClient->workers); } - public function testGetTokenReturnsApiToken() + public function testGetTokenDelegatesToOAuthProviderWhenAuthSet(): void { - $token = $this->upsunClient->getToken(); + $mockAuth = $this->createMock(OAuthProvider::class); + $mockAuth->method('getAuthorization')->willReturn('Bearer oauth-token'); + $this->upsunClient->auth = $mockAuth; - $this->assertEquals('test-api-token', $token); + $this->assertEquals('Bearer oauth-token', $this->upsunClient->getToken()); + } + + public function testGetTokenReturnsBearerTokenWhenNoApiKey(): void + { + $config = new UpsunConfig( + base_url: 'https://api.upsun.com', + auth_url: 'https://auth.upsun.com', + apiToken: '', + token_endpoint: 'oauth2/token', + clientId: 'test-client-id' + ); + $client = new UpsunClient($config); + $client->setBearerToken('static-bearer'); + + $this->assertEquals('Bearer static-bearer', $client->getToken()); + } + + public function testGetTokenThrowsWhenNoAuthMethodSet(): void + { + $config = new UpsunConfig( + base_url: 'https://api.upsun.com', + auth_url: 'https://auth.upsun.com', + apiToken: '', + token_endpoint: 'oauth2/token', + clientId: 'test-client-id' + ); + $client = new UpsunClient($config); + + $this->expectException(\RuntimeException::class); + $client->getToken(); } public function testUserIdIsNullByDefault() @@ -223,7 +255,7 @@ public function testConstructorWithDifferentConfiguration() $customClient = new UpsunClient($customConfig); $this->assertEquals('https://custom.api.com', $customClient->apiConfig->getHost()); - $this->assertEquals('custom-token', $customClient->getToken()); + $this->assertInstanceOf(OAuthProvider::class, $customClient->auth); } /**