Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.451.4
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Dec 5, 2024
1 parent e9bb6ce commit a9dc662
Show file tree
Hide file tree
Showing 41 changed files with 2,590 additions and 353 deletions.
23 changes: 18 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: db1bb4da-054f-485f-8c6e-d42db3f1da90
management:
docChecksum: 867e0698f3110dba472ddc490d9dcf87
docChecksum: 4370adb34e4b8d543b23bdcf77707fef
docVersion: 0.4.0
speakeasyVersion: 1.449.0
generationVersion: 2.467.4
releaseVersion: 0.45.11
configChecksum: 7ab094de84b6f42cb464da871ebbd16d
speakeasyVersion: 1.451.4
generationVersion: 2.471.2
releaseVersion: 0.45.12
configChecksum: 0156b13c7ba0ef5af2bedf5c22514870
repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-php.git
repoSubDirectory: .
installationURL: https://github.com/speakeasy-api/speakeasy-client-sdk-php
Expand Down Expand Up @@ -331,6 +331,19 @@ generatedFiles:
- src/Embeds.php
- src/Events.php
- src/Github.php
- src/Hooks/AfterErrorContext.php
- src/Hooks/AfterErrorHook.php
- src/Hooks/AfterSuccessContext.php
- src/Hooks/AfterSuccessHook.php
- src/Hooks/BeforeRequestContext.php
- src/Hooks/BeforeRequestHook.php
- src/Hooks/ErrorResponseContext.php
- src/Hooks/FailEarlyException.php
- src/Hooks/HookContext.php
- src/Hooks/Hooks.php
- src/Hooks/SDKHooks.php
- src/Hooks/SDKInitHook.php
- src/Hooks/SDKRequestContext.php
- src/Metadata.php
- src/Models/Errorors/Error.php
- src/Models/Errorors/ErrorThrowable.php
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
php:
version: 0.45.11
version: 0.45.12
clientServerStatusCodesAsErrors: true
defaultErrorName: SDKException
flattenGlobalSecurity: true
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.449.0
speakeasyVersion: 1.451.4
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:bdd5a0cc3b9f5edd626c1f882ccdf14150ff5e4054de692be95c102aa18d148a
sourceBlobDigest: sha256:2b12b4979b9b8f79ebbb3f572fc5b00c9d70a15d984bd726523934adc07c4951
sourceRevisionDigest: sha256:5c4a53bb4838bceb4df4b038e2b557fb26a563fd0378ac6b761cadedc02095ea
sourceBlobDigest: sha256:f6c3771ac108b66bd6ac472ceadab3b46b55de738b899dbe54bcb7a0f6a79570
tags:
- latest
- speakeasy-sdk-regen-1733185091
- speakeasy-sdk-regen-1733357841
- 0.4.0
targets:
php-target:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:bdd5a0cc3b9f5edd626c1f882ccdf14150ff5e4054de692be95c102aa18d148a
sourceBlobDigest: sha256:2b12b4979b9b8f79ebbb3f572fc5b00c9d70a15d984bd726523934adc07c4951
sourceRevisionDigest: sha256:5c4a53bb4838bceb4df4b038e2b557fb26a563fd0378ac6b761cadedc02095ea
sourceBlobDigest: sha256:f6c3771ac108b66bd6ac472ceadab3b46b55de738b899dbe54bcb7a0f6a79570
codeSamplesNamespace: my-source-php-code-samples
codeSamplesRevisionDigest: sha256:35c33ce1ef92730f5254baaa21fbece0a7e8eeb2a439a30684727b8051b2d978
codeSamplesRevisionDigest: sha256:e90089296678e56fe29447c079939735e6b866a9fa886e4c8669a04054a9a267
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1484,4 +1484,14 @@ Based on:
### Generated
- [php v0.45.11] .
### Releases
- [Composer v0.45.11] https://packagist.org/packages/speakeasy-api/speakeasy-client-sdk-php#v0.45.11 - .
- [Composer v0.45.11] https://packagist.org/packages/speakeasy-api/speakeasy-client-sdk-php#v0.45.11 - .

## 2024-12-05 00:17:18
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.451.4 (2.471.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [php v0.45.12] .
### Releases
- [Composer v0.45.12] https://packagist.org/packages/speakeasy-api/speakeasy-client-sdk-php#v0.45.12 - .
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"./vendor/bin/phpunit --testdox --display-warnings --colors=always"
],
"stan": [
"./vendor/bin/phpstan analyse --memory-limit=2g"
"./vendor/bin/phpstan analyse --memory-limit=2g --error-format=table"
]
},
"script-descriptions": {
Expand Down
201 changes: 177 additions & 24 deletions src/ApiEndpoints.php

Large diffs are not rendered by default.

157 changes: 135 additions & 22 deletions src/Apis.php

Large diffs are not rendered by default.

257 changes: 223 additions & 34 deletions src/Artifacts.php

Large diffs are not rendered by default.

103 changes: 89 additions & 14 deletions src/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Speakeasy\SpeakeasyClientSDK;

use Speakeasy\Serializer\DeserializationContext;
use Speakeasy\SpeakeasyClientSDK\Hooks\HookContext;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;

class Auth
Expand Down Expand Up @@ -59,19 +60,35 @@ public function getAccess(?Operations\GetWorkspaceAccessRequest $request = null)
$options = ['http_errors' => false];

$qp = Utils\Utils::getQueryParams(Operations\GetWorkspaceAccessRequest::class, $request, $urlOverride, $this->sdkConfiguration->globals);

$options = array_merge_recursive($options, $qp);
$options['headers']['Accept'] = 'application/json';
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
$httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url);


$httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options);
$hookContext = new HookContext('getWorkspaceAccess', null, $this->sdkConfiguration->securitySource);
$httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest);
$options['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp);
$options = Utils\Utils::convertHeadersToOptions($httpRequest, $options);
$httpRequest = Utils\Utils::removeHeaders($httpRequest);
try {
$httpResponse = $this->sdkConfiguration->client->send($httpRequest, $options);
} catch (\GuzzleHttp\Exception\GuzzleException $error) {
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error);
if ($res !== null) {
$httpResponse = $res;
}
}
$contentType = $httpResponse->getHeader('Content-Type')[0] ?? '';

$statusCode = $httpResponse->getStatusCode();
if ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) {
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null);
if ($res !== null) {
$httpResponse = $res;
}
}
if ($statusCode >= 200 && $statusCode < 300) {
if (Utils\Utils::matchContentType($contentType, 'application/json')) {
$httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse);

$serializer = Utils\JSON::createSerializer();
$responseData = (string) $httpResponse->getBody();
$obj = $serializer->deserialize($responseData, '\Speakeasy\SpeakeasyClientSDK\Models\Shared\AccessDetails', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true));
Expand Down Expand Up @@ -107,17 +124,35 @@ public function getAccessToken(Operations\GetAccessTokenRequest $request): Opera
$options = ['http_errors' => false];

$qp = Utils\Utils::getQueryParams(Operations\GetAccessTokenRequest::class, $request, $urlOverride, $this->sdkConfiguration->globals);

$options = array_merge_recursive($options, $qp);
$options['headers']['Accept'] = 'application/json';
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
$httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url);
$httpResponse = $this->sdkConfiguration->defaultClient->send($httpRequest, $options);
$hookContext = new HookContext('getAccessToken', null, null);
$httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest);
$options['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp);
$options = Utils\Utils::convertHeadersToOptions($httpRequest, $options);
$httpRequest = Utils\Utils::removeHeaders($httpRequest);
try {
$httpResponse = $this->sdkConfiguration->client->send($httpRequest, $options);
} catch (\GuzzleHttp\Exception\GuzzleException $error) {
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error);
if ($res !== null) {
$httpResponse = $res;
}
}
$contentType = $httpResponse->getHeader('Content-Type')[0] ?? '';

$statusCode = $httpResponse->getStatusCode();
if ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) {
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null);
if ($res !== null) {
$httpResponse = $res;
}
}
if ($statusCode >= 200 && $statusCode < 300) {
if (Utils\Utils::matchContentType($contentType, 'application/json')) {
$httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse);

$serializer = Utils\JSON::createSerializer();
$responseData = (string) $httpResponse->getBody();
$obj = $serializer->deserialize($responseData, '\Speakeasy\SpeakeasyClientSDK\Models\Shared\AccessToken', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true));
Expand All @@ -133,6 +168,8 @@ public function getAccessToken(Operations\GetAccessTokenRequest $request): Opera
}
} elseif ($statusCode >= 400 && $statusCode < 500) {
if (Utils\Utils::matchContentType($contentType, 'application/json')) {
$httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse);

$serializer = Utils\JSON::createSerializer();
$responseData = (string) $httpResponse->getBody();
$obj = $serializer->deserialize($responseData, '\Speakeasy\SpeakeasyClientSDK\Models\Errorors\Error', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true));
Expand Down Expand Up @@ -162,14 +199,31 @@ public function getUser(): Operations\GetUserResponse
$options['headers']['Accept'] = 'application/json';
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
$httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url);


$httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options);
$hookContext = new HookContext('getUser', null, $this->sdkConfiguration->securitySource);
$httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest);
$options = Utils\Utils::convertHeadersToOptions($httpRequest, $options);
$httpRequest = Utils\Utils::removeHeaders($httpRequest);
try {
$httpResponse = $this->sdkConfiguration->client->send($httpRequest, $options);
} catch (\GuzzleHttp\Exception\GuzzleException $error) {
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error);
if ($res !== null) {
$httpResponse = $res;
}
}
$contentType = $httpResponse->getHeader('Content-Type')[0] ?? '';

$statusCode = $httpResponse->getStatusCode();
if ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) {
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null);
if ($res !== null) {
$httpResponse = $res;
}
}
if ($statusCode >= 200 && $statusCode < 300) {
if (Utils\Utils::matchContentType($contentType, 'application/json')) {
$httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse);

$serializer = Utils\JSON::createSerializer();
$responseData = (string) $httpResponse->getBody();
$obj = $serializer->deserialize($responseData, '\Speakeasy\SpeakeasyClientSDK\Models\Shared\User', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true));
Expand All @@ -185,6 +239,8 @@ public function getUser(): Operations\GetUserResponse
}
} elseif ($statusCode >= 400 && $statusCode < 500) {
if (Utils\Utils::matchContentType($contentType, 'application/json')) {
$httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse);

$serializer = Utils\JSON::createSerializer();
$responseData = (string) $httpResponse->getBody();
$obj = $serializer->deserialize($responseData, '\Speakeasy\SpeakeasyClientSDK\Models\Errorors\Error', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true));
Expand Down Expand Up @@ -214,14 +270,31 @@ public function validateApiKey(): Operations\ValidateApiKeyResponse
$options['headers']['Accept'] = 'application/json';
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
$httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url);


$httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options);
$hookContext = new HookContext('validateApiKey', null, $this->sdkConfiguration->securitySource);
$httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest);
$options = Utils\Utils::convertHeadersToOptions($httpRequest, $options);
$httpRequest = Utils\Utils::removeHeaders($httpRequest);
try {
$httpResponse = $this->sdkConfiguration->client->send($httpRequest, $options);
} catch (\GuzzleHttp\Exception\GuzzleException $error) {
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error);
if ($res !== null) {
$httpResponse = $res;
}
}
$contentType = $httpResponse->getHeader('Content-Type')[0] ?? '';

$statusCode = $httpResponse->getStatusCode();
if ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) {
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null);
if ($res !== null) {
$httpResponse = $res;
}
}
if ($statusCode >= 200 && $statusCode < 300) {
if (Utils\Utils::matchContentType($contentType, 'application/json')) {
$httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse);

$serializer = Utils\JSON::createSerializer();
$responseData = (string) $httpResponse->getBody();
$obj = $serializer->deserialize($responseData, '\Speakeasy\SpeakeasyClientSDK\Models\Shared\ApiKeyDetails', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true));
Expand All @@ -237,6 +310,8 @@ public function validateApiKey(): Operations\ValidateApiKeyResponse
}
} elseif ($statusCode >= 400 && $statusCode < 500) {
if (Utils\Utils::matchContentType($contentType, 'application/json')) {
$httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse);

$serializer = Utils\JSON::createSerializer();
$responseData = (string) $httpResponse->getBody();
$obj = $serializer->deserialize($responseData, '\Speakeasy\SpeakeasyClientSDK\Models\Errorors\Error', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true));
Expand Down
Loading

0 comments on commit a9dc662

Please sign in to comment.