Skip to content

Commit

Permalink
Merge pull request #32 from krystal/feat/2.62
Browse files Browse the repository at this point in the history
feat: update to Katapult 2.62
  • Loading branch information
bencromwell authored Nov 1, 2024
2 parents 985b60d + 8e13e4a commit 22df26c
Show file tree
Hide file tree
Showing 399 changed files with 39,778 additions and 10,245 deletions.
19,945 changes: 10,923 additions & 9,022 deletions katapult-core-openapi.json

Large diffs are not rendered by default.

28 changes: 17 additions & 11 deletions katapult-public-openapi.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"openapi": "3.0.0",
"info": {
"x-katapult-version": "2.60.0",
"x-katapult-version": "2.62.1",
"version": "1.0.0",
"title": "Katapult Public API",
"description": "Welcome to the documentation for the Katapult Public API"
Expand Down Expand Up @@ -185,7 +185,7 @@
"post": {
"operationId": "post:signups",
"summary": "Create signup",
"description": "This will create a new signup object and e-mail the appropriate welcome e-mail to the given email address",
"description": "This will create a new signup object, which can be either verified by e-mail or by the user creating an account in Identity",
"tags": [
"Signups"
],
Expand All @@ -194,6 +194,10 @@
"application/json": {
"schema": {
"properties": {
"verify_with_email": {
"type": "boolean",
"description": "If true, the user will be sent an email to verify their e-mail address, and if false, the user will need to verify their e-mail address when they create an account in Identity"
},
"email_address": {
"type": "string",
"description": "The e-mail address that should receive the welcome e-mail"
Expand All @@ -205,17 +209,14 @@
"campaign": {
"$ref": "#/components/schemas/SignupCampaignArguments"
}
},
"required": [
"email_address"
]
}
}
}
}
},
"responses": {
"200": {
"description": "This will create a new signup object and e-mail the appropriate welcome e-mail to the given email address",
"description": "This will create a new signup object, which can be either verified by e-mail or by the user creating an account in Identity",
"content": {
"application/json": {
"schema": {
Expand All @@ -226,12 +227,19 @@
},
"email_address": {
"type": "string",
"description": "The e-mail address that was sent the welcome email"
"description": "The e-mail address that was sent the welcome email",
"nullable": true
},
"url": {
"type": "string",
"description": "The URL for the user to continue their signup process, only available if verify_with_email is false",
"nullable": true
}
},
"required": [
"id",
"email_address"
"email_address",
"url"
]
}
}
Expand Down Expand Up @@ -385,7 +393,6 @@
"components": {
"schemas": {
"SignupCampaignArguments": {
"description": "All 'campaign[]' params are mutually exclusive, only one can be provided.",
"type": "object",
"properties": {
"id": {
Expand Down Expand Up @@ -545,7 +552,6 @@
}
},
"PricingEstimateResourceArguments": {
"description": "All 'resources[]' params are mutually exclusive, only one can be provided.",
"type": "object",
"properties": {
"resource": {
Expand Down
512 changes: 390 additions & 122 deletions src/Core/Client.php

Large diffs are not rendered by default.

95 changes: 95 additions & 0 deletions src/Core/Endpoint/DeleteObjectStorageAccessKey.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?php

declare(strict_types=1);

/*
* This file has been auto generated by Jane,
*
* Do no edit it directly.
*/

namespace KatapultAPI\Core\Endpoint;

class DeleteObjectStorageAccessKey extends \KatapultAPI\Core\Runtime\Client\BaseEndpoint implements \KatapultAPI\Core\Runtime\Client\Endpoint
{
use \KatapultAPI\Core\Runtime\Client\EndpointTrait;

/**
* Delete an object storage access key
* ## Scopes
* - `object_storage`.
*
* ### OAuth2 Scopes
* When using OAuth2 authentication, scopes are prefixed with `api.katapult.io/core/v1/`.
*/
public function __construct(?\KatapultAPI\Core\Model\ObjectStorageAccessKeysAccessKeyDeleteBody $requestBody = null)
{
$this->body = $requestBody;
}

public function getMethod(): string
{
return 'DELETE';
}

public function getUri(): string
{
return '/object_storage/access_keys/access_key';
}

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \KatapultAPI\Core\Model\ObjectStorageAccessKeysAccessKeyDeleteBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
}

public function getExtraHeaders(): array
{
return ['Accept' => ['application/json']];
}

/**
* @return \KatapultAPI\Core\Model\ObjectStorageAccessKeysAccessKeyDeleteResponse200|null
*
* @throws \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyBadRequestException
* @throws \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyForbiddenException
* @throws \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyNotFoundException
* @throws \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyTooManyRequestsException
* @throws \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyServiceUnavailableException
* @throws \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyGatewayTimeoutException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) {
return $serializer->deserialize($body, 'KatapultAPI\Core\Model\ObjectStorageAccessKeysAccessKeyDeleteResponse200', 'json');
}
if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyBadRequestException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator400Response', 'json'), $response);
}
if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyForbiddenException($response);
}
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyNotFoundException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseObjectStorageAccessKeyNotFoundResponse', 'json'), $response);
}
if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator429Response', 'json'), $response);
}
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator503Response', 'json'), $response);
}
if (is_null($contentType) === false && (504 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyGatewayTimeoutException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseNetworkErrorResponse', 'json'), $response);
}
}

public function getAuthenticationScopes(): array
{
return ['OAuth2', 'Authenticator'];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?php

declare(strict_types=1);

/*
* This file has been auto generated by Jane,
*
* Do no edit it directly.
*/

namespace KatapultAPI\Core\Endpoint;

class DeleteOrganizationObjectStorageObjectStorageCluster extends \KatapultAPI\Core\Runtime\Client\BaseEndpoint implements \KatapultAPI\Core\Runtime\Client\Endpoint
{
use \KatapultAPI\Core\Runtime\Client\EndpointTrait;

/**
* Move object storage into the trash
* ## Scopes
* - `object_storage`.
*
* ### OAuth2 Scopes
* When using OAuth2 authentication, scopes are prefixed with `api.katapult.io/core/v1/`.
*/
public function __construct(?\KatapultAPI\Core\Model\OrganizationsOrganizationObjectStorageObjectStorageClusterDeleteBody $requestBody = null)
{
$this->body = $requestBody;
}

public function getMethod(): string
{
return 'DELETE';
}

public function getUri(): string
{
return '/organizations/organization/object_storage/object_storage_cluster';
}

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \KatapultAPI\Core\Model\OrganizationsOrganizationObjectStorageObjectStorageClusterDeleteBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
}

public function getExtraHeaders(): array
{
return ['Accept' => ['application/json']];
}

/**
* @return \KatapultAPI\Core\Model\OrganizationsOrganizationObjectStorageObjectStorageClusterDeleteResponse200|null
*
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterBadRequestException
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterForbiddenException
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterNotFoundException
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterNotAcceptableException
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterUnprocessableEntityException
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterTooManyRequestsException
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterServiceUnavailableException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) {
return $serializer->deserialize($body, 'KatapultAPI\Core\Model\OrganizationsOrganizationObjectStorageObjectStorageClusterDeleteResponse200', 'json');
}
if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterBadRequestException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator400Response', 'json'), $response);
}
if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterForbiddenException($response);
}
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterNotFoundException($response);
}
if (is_null($contentType) === false && (406 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterNotAcceptableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseObjectInTrashResponse', 'json'), $response);
}
if (is_null($contentType) === false && (422 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterUnprocessableEntityException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseValidationErrorResponse', 'json'), $response);
}
if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator429Response', 'json'), $response);
}
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator503Response', 'json'), $response);
}
}

public function getAuthenticationScopes(): array
{
return ['OAuth2', 'Authenticator'];
}
}
99 changes: 99 additions & 0 deletions src/Core/Endpoint/DeleteVirtualMachineNetworkInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?php

declare(strict_types=1);

/*
* This file has been auto generated by Jane,
*
* Do no edit it directly.
*/

namespace KatapultAPI\Core\Endpoint;

class DeleteVirtualMachineNetworkInterface extends \KatapultAPI\Core\Runtime\Client\BaseEndpoint implements \KatapultAPI\Core\Runtime\Client\Endpoint
{
use \KatapultAPI\Core\Runtime\Client\EndpointTrait;

/**
* ## Scopes
* - `virtual_machines`
* - `virtual_machines:network_interfaces`.
*
* ### OAuth2 Scopes
* When using OAuth2 authentication, scopes are prefixed with `api.katapult.io/core/v1/`.
*/
public function __construct(?\KatapultAPI\Core\Model\VirtualMachineNetworkInterfacesVirtualMachineNetworkInterfaceDeleteBody $requestBody = null)
{
$this->body = $requestBody;
}

public function getMethod(): string
{
return 'DELETE';
}

public function getUri(): string
{
return '/virtual_machine_network_interfaces/virtual_machine_network_interface';
}

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \KatapultAPI\Core\Model\VirtualMachineNetworkInterfacesVirtualMachineNetworkInterfaceDeleteBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
}

public function getExtraHeaders(): array
{
return ['Accept' => ['application/json']];
}

/**
* @return \KatapultAPI\Core\Model\VirtualMachineNetworkInterfacesVirtualMachineNetworkInterfaceDeleteResponse200|null
*
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceBadRequestException
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceForbiddenException
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceNotFoundException
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceConflictException
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceUnprocessableEntityException
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceTooManyRequestsException
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceServiceUnavailableException
*/
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) {
return $serializer->deserialize($body, 'KatapultAPI\Core\Model\VirtualMachineNetworkInterfacesVirtualMachineNetworkInterfaceDeleteResponse200', 'json');
}
if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceBadRequestException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator400Response', 'json'), $response);
}
if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceForbiddenException($response);
}
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceNotFoundException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseVirtualMachineNetworkInterfaceNotFoundResponse', 'json'), $response);
}
if (is_null($contentType) === false && (409 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceConflictException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseDeletionRestrictedResponse', 'json'), $response);
}
if (is_null($contentType) === false && (422 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceUnprocessableEntityException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseValidationErrorResponse', 'json'), $response);
}
if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator429Response', 'json'), $response);
}
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator503Response', 'json'), $response);
}
}

public function getAuthenticationScopes(): array
{
return ['OAuth2', 'Authenticator'];
}
}
4 changes: 1 addition & 3 deletions src/Core/Endpoint/GetAddressList.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ class GetAddressList extends \KatapultAPI\Core\Runtime\Client\BaseEndpoint imple
* @param array $queryParameters {
*
* @var string $address_list[id] The address list to return.
*
* All 'address_list[]' params are mutually exclusive, only one can be provided.
* }
* }
*/
public function __construct(array $queryParameters = [])
{
Expand Down
Loading

0 comments on commit 22df26c

Please sign in to comment.