Skip to content

Commit

Permalink
Changes by create-pull-request action (#29)
Browse files Browse the repository at this point in the history
Automated changes by
[create-pull-request](https://github.com/peter-evans/create-pull-request)
GitHub action

Co-authored-by: qdequippe <3193300+qdequippe@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and qdequippe authored Oct 14, 2024
1 parent f121171 commit ad72981
Show file tree
Hide file tree
Showing 8 changed files with 272 additions and 0 deletions.
1 change: 1 addition & 0 deletions generated/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,7 @@ public function getSignatureRequestsSignatureRequestIdApproversApproverId(string
* @throws Exception\PatchSignatureRequestsSignatureRequestIdApproversApproverIdForbiddenException
* @throws Exception\PatchSignatureRequestsSignatureRequestIdApproversApproverIdNotFoundException
* @throws Exception\PatchSignatureRequestsSignatureRequestIdApproversApproverIdUnsupportedMediaTypeException
* @throws Exception\PatchSignatureRequestsSignatureRequestIdApproversApproverIdInternalServerErrorException
*/
public function patchSignatureRequestsSignatureRequestIdApproversApproverId(string $signatureRequestId, string $approverId, ?PatchSignatureRequestsSignatureRequestIdApproversApproverIdRequest $requestBody = null, string $fetch = self::FETCH_OBJECT)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
use Psr\Http\Message\ResponseInterface;
use Qdequippe\Yousign\Api\Exception\PatchSignatureRequestsSignatureRequestIdApproversApproverIdBadRequestException;
use Qdequippe\Yousign\Api\Exception\PatchSignatureRequestsSignatureRequestIdApproversApproverIdForbiddenException;
use Qdequippe\Yousign\Api\Exception\PatchSignatureRequestsSignatureRequestIdApproversApproverIdInternalServerErrorException;
use Qdequippe\Yousign\Api\Exception\PatchSignatureRequestsSignatureRequestIdApproversApproverIdNotFoundException;
use Qdequippe\Yousign\Api\Exception\PatchSignatureRequestsSignatureRequestIdApproversApproverIdUnauthorizedException;
use Qdequippe\Yousign\Api\Exception\PatchSignatureRequestsSignatureRequestIdApproversApproverIdUnsupportedMediaTypeException;
use Qdequippe\Yousign\Api\Model\Approver;
use Qdequippe\Yousign\Api\Model\BadRequestResponse;
use Qdequippe\Yousign\Api\Model\ForbiddenResponse;
use Qdequippe\Yousign\Api\Model\InternalServerError;
use Qdequippe\Yousign\Api\Model\NotFoundResponse;
use Qdequippe\Yousign\Api\Model\PatchSignatureRequestsSignatureRequestIdApproversApproverIdRequest;
use Qdequippe\Yousign\Api\Model\UnauthorizedResponse;
Expand Down Expand Up @@ -67,6 +69,7 @@ public function getExtraHeaders(): array
* @throws PatchSignatureRequestsSignatureRequestIdApproversApproverIdForbiddenException
* @throws PatchSignatureRequestsSignatureRequestIdApproversApproverIdNotFoundException
* @throws PatchSignatureRequestsSignatureRequestIdApproversApproverIdUnsupportedMediaTypeException
* @throws PatchSignatureRequestsSignatureRequestIdApproversApproverIdInternalServerErrorException
*/
protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, ?string $contentType = null)
{
Expand All @@ -90,6 +93,9 @@ protected function transformResponseBody(ResponseInterface $response, Serializer
if (null !== $contentType && (415 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new PatchSignatureRequestsSignatureRequestIdApproversApproverIdUnsupportedMediaTypeException($serializer->deserialize($body, UnsupportedMediaTypeResponse::class, 'json'), $response);
}
if (null !== $contentType && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new PatchSignatureRequestsSignatureRequestIdApproversApproverIdInternalServerErrorException($serializer->deserialize($body, InternalServerError::class, 'json'), $response);
}

return null;
}
Expand Down
11 changes: 11 additions & 0 deletions generated/Exception/InternalServerErrorException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Qdequippe\Yousign\Api\Exception;

class InternalServerErrorException extends \RuntimeException implements ServerException
{
public function __construct(string $message)
{
parent::__construct($message, 500);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace Qdequippe\Yousign\Api\Exception;

use Psr\Http\Message\ResponseInterface;
use Qdequippe\Yousign\Api\Model\InternalServerError;

class PatchSignatureRequestsSignatureRequestIdApproversApproverIdInternalServerErrorException extends InternalServerErrorException
{
public function __construct(private readonly InternalServerError $internalServerError, private readonly ResponseInterface $response)
{
parent::__construct('Internal Server Error');
}

public function getInternalServerError(): InternalServerError
{
return $this->internalServerError;
}

public function getResponse(): ResponseInterface
{
return $this->response;
}
}
8 changes: 8 additions & 0 deletions generated/Model/DetailedConsumption.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public function isInitialized($property): bool
*/
protected $type;
/**
* Only set when type is either `invited_signer`, `electronic_seals`, `identification_attempts`.
*
* @var string|null
*/
protected $level;
Expand Down Expand Up @@ -70,11 +72,17 @@ public function setType(?string $type): self
return $this;
}

/**
* Only set when type is either `invited_signer`, `electronic_seals`, `identification_attempts`.
*/
public function getLevel(): ?string
{
return $this->level;
}

/**
* Only set when type is either `invited_signer`, `electronic_seals`, `identification_attempts`.
*/
public function setLevel(?string $level): self
{
$this->initialized['level'] = true;
Expand Down
50 changes: 50 additions & 0 deletions generated/Model/InternalServerError.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

namespace Qdequippe\Yousign\Api\Model;

class InternalServerError extends \ArrayObject
{
/**
* @var array
*/
protected $initialized = [];

public function isInitialized($property): bool
{
return \array_key_exists($property, $this->initialized);
}
/**
* @var string|null
*/
protected $type;
/**
* @var string|null
*/
protected $detail;

public function getType(): ?string
{
return $this->type;
}

public function setType(?string $type): self
{
$this->initialized['type'] = true;
$this->type = $type;

return $this;
}

public function getDetail(): ?string
{
return $this->detail;
}

public function setDetail(?string $detail): self
{
$this->initialized['detail'] = true;
$this->detail = $detail;

return $this;
}
}
165 changes: 165 additions & 0 deletions generated/Normalizer/InternalServerErrorNormalizer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
<?php

namespace Qdequippe\Yousign\Api\Normalizer;

use Jane\Component\JsonSchemaRuntime\Reference;
use Qdequippe\Yousign\Api\Model\InternalServerError;
use Qdequippe\Yousign\Api\Runtime\Normalizer\CheckArray;
use Qdequippe\Yousign\Api\Runtime\Normalizer\ValidatorTrait;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) {
class InternalServerErrorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface
{
use CheckArray;
use DenormalizerAwareTrait;
use NormalizerAwareTrait;
use ValidatorTrait;

public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool
{
return InternalServerError::class === $type;
}

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return \is_object($data) && InternalServerError::class === $data::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
}
if (isset($data['$recursiveRef'])) {
return new Reference($data['$recursiveRef'], $context['document-origin']);
}
$object = new InternalServerError();
if (null === $data || false === \is_array($data)) {
return $object;
}
if (\array_key_exists('type', $data) && null !== $data['type']) {
$object->setType($data['type']);
unset($data['type']);
} elseif (\array_key_exists('type', $data) && null === $data['type']) {
$object->setType(null);
}
if (\array_key_exists('detail', $data) && null !== $data['detail']) {
$object->setDetail($data['detail']);
unset($data['detail']);
} elseif (\array_key_exists('detail', $data) && null === $data['detail']) {
$object->setDetail(null);
}
foreach ($data as $key => $value) {
if (preg_match('/.*/', (string) $key)) {
$object[$key] = $value;
}
}

return $object;
}

public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
$data['type'] = $object->getType();
$data['detail'] = $object->getDetail();
foreach ($object as $key => $value) {
if (preg_match('/.*/', (string) $key)) {
$data[$key] = $value;
}
}

return $data;
}

public function getSupportedTypes(?string $format = null): array
{
return [InternalServerError::class => false];
}
}
} else {
class InternalServerErrorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface
{
use CheckArray;
use DenormalizerAwareTrait;
use NormalizerAwareTrait;
use ValidatorTrait;

public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool
{
return InternalServerError::class === $type;
}

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return \is_object($data) && InternalServerError::class === $data::class;
}

/**
* @param mixed|null $format
*/
public function denormalize($data, $type, $format = null, array $context = [])
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
}
if (isset($data['$recursiveRef'])) {
return new Reference($data['$recursiveRef'], $context['document-origin']);
}
$object = new InternalServerError();
if (null === $data || false === \is_array($data)) {
return $object;
}
if (\array_key_exists('type', $data) && null !== $data['type']) {
$object->setType($data['type']);
unset($data['type']);
} elseif (\array_key_exists('type', $data) && null === $data['type']) {
$object->setType(null);
}
if (\array_key_exists('detail', $data) && null !== $data['detail']) {
$object->setDetail($data['detail']);
unset($data['detail']);
} elseif (\array_key_exists('detail', $data) && null === $data['detail']) {
$object->setDetail(null);
}
foreach ($data as $key => $value) {
if (preg_match('/.*/', (string) $key)) {
$object[$key] = $value;
}
}

return $object;
}

/**
* @param mixed|null $format
*
* @return array|string|int|float|bool|\ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
{
$data = [];
$data['type'] = $object->getType();
$data['detail'] = $object->getDetail();
foreach ($object as $key => $value) {
if (preg_match('/.*/', (string) $key)) {
$data[$key] = $value;
}
}

return $data;
}

public function getSupportedTypes(?string $format = null): array
{
return [InternalServerError::class => false];
}
}
}
7 changes: 7 additions & 0 deletions generated/Normalizer/JaneObjectNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
use Qdequippe\Yousign\Api\Model\GetUsers200Response;
use Qdequippe\Yousign\Api\Model\GetWorkspaces200Response;
use Qdequippe\Yousign\Api\Model\InitialsArea;
use Qdequippe\Yousign\Api\Model\InternalServerError;
use Qdequippe\Yousign\Api\Model\ListElectronicSealImages200Response;
use Qdequippe\Yousign\Api\Model\MarkWorkspaceAsDefault;
use Qdequippe\Yousign\Api\Model\Mention;
Expand Down Expand Up @@ -394,6 +395,8 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface

PatchSignatureRequestsSignatureRequestIdApproversApproverIdRequest::class => PatchSignatureRequestsSignatureRequestIdApproversApproverIdRequestNormalizer::class,

InternalServerError::class => InternalServerErrorNormalizer::class,

PostSignatureRequestsSignatureRequestIdCancelRequest::class => PostSignatureRequestsSignatureRequestIdCancelRequestNormalizer::class,

GetSignatureRequestsSignatureRequestIdSignerConsentRequests200Response::class => GetSignatureRequestsSignatureRequestIdSignerConsentRequests200ResponseNormalizer::class,
Expand Down Expand Up @@ -683,6 +686,7 @@ public function getSupportedTypes(?string $format = null): array
FromExistingSigner::class => false,
PatchSignatureRequestsSignatureRequestIdApproversApproverIdRequestInfo::class => false,
PatchSignatureRequestsSignatureRequestIdApproversApproverIdRequest::class => false,
InternalServerError::class => false,
PostSignatureRequestsSignatureRequestIdCancelRequest::class => false,
GetSignatureRequestsSignatureRequestIdSignerConsentRequests200Response::class => false,
GetSignatureRequestsSignatureRequestIdSignerDocumentRequests200Response::class => false,
Expand Down Expand Up @@ -967,6 +971,8 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface

PatchSignatureRequestsSignatureRequestIdApproversApproverIdRequest::class => PatchSignatureRequestsSignatureRequestIdApproversApproverIdRequestNormalizer::class,

InternalServerError::class => InternalServerErrorNormalizer::class,

PostSignatureRequestsSignatureRequestIdCancelRequest::class => PostSignatureRequestsSignatureRequestIdCancelRequestNormalizer::class,

GetSignatureRequestsSignatureRequestIdSignerConsentRequests200Response::class => GetSignatureRequestsSignatureRequestIdSignerConsentRequests200ResponseNormalizer::class,
Expand Down Expand Up @@ -1264,6 +1270,7 @@ public function getSupportedTypes(?string $format = null): array
FromExistingSigner::class => false,
PatchSignatureRequestsSignatureRequestIdApproversApproverIdRequestInfo::class => false,
PatchSignatureRequestsSignatureRequestIdApproversApproverIdRequest::class => false,
InternalServerError::class => false,
PostSignatureRequestsSignatureRequestIdCancelRequest::class => false,
GetSignatureRequestsSignatureRequestIdSignerConsentRequests200Response::class => false,
GetSignatureRequestsSignatureRequestIdSignerDocumentRequests200Response::class => false,
Expand Down

0 comments on commit ad72981

Please sign in to comment.