Skip to content

Commit

Permalink
Changes by create-pull-request action (#31)
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 <[email protected]>
  • Loading branch information
github-actions[bot] and qdequippe authored Nov 4, 2024
1 parent 1c88312 commit 89491a3
Show file tree
Hide file tree
Showing 37 changed files with 2,215 additions and 5 deletions.
41 changes: 39 additions & 2 deletions generated/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
use Qdequippe\Yousign\Api\Endpoint\GetCustomExperiencesCustomExperienceId;
use Qdequippe\Yousign\Api\Endpoint\GetElectronicSeal;
use Qdequippe\Yousign\Api\Endpoint\GetElectronicSealAuditTrail;
use Qdequippe\Yousign\Api\Endpoint\GetIdentityVerificationsIdentityVerificationId;
use Qdequippe\Yousign\Api\Endpoint\GetSignatureRequests;
use Qdequippe\Yousign\Api\Endpoint\GetSignatureRequestsSignatureRequestId;
use Qdequippe\Yousign\Api\Endpoint\GetSignatureRequestsSignatureRequestIdApproversApproverId;
Expand Down Expand Up @@ -83,6 +84,7 @@
use Qdequippe\Yousign\Api\Endpoint\PostCustomExperience;
use Qdequippe\Yousign\Api\Endpoint\PostDocuments;
use Qdequippe\Yousign\Api\Endpoint\PostElectronicSeals;
use Qdequippe\Yousign\Api\Endpoint\PostIdentityVerifications;
use Qdequippe\Yousign\Api\Endpoint\PostSignatureRequests;
use Qdequippe\Yousign\Api\Endpoint\PostSignatureRequestsSignatureRequestIdActivate;
use Qdequippe\Yousign\Api\Endpoint\PostSignatureRequestsSignatureRequestIdApprovers;
Expand Down Expand Up @@ -116,6 +118,7 @@
use Qdequippe\Yousign\Api\Model\CreateSignatureRequestMetadata;
use Qdequippe\Yousign\Api\Model\CreateSignerConsentRequest;
use Qdequippe\Yousign\Api\Model\CreateSignerDocumentRequest;
use Qdequippe\Yousign\Api\Model\CreateVideoIdentityVerification;
use Qdequippe\Yousign\Api\Model\CreateWebhookSubscription;
use Qdequippe\Yousign\Api\Model\CreateWorkspace;
use Qdequippe\Yousign\Api\Model\DeleteWorkspace;
Expand Down Expand Up @@ -1812,12 +1815,13 @@ public function getTemplates(array $queryParameters = [], string $fetch = self::
}

/**
* Returns the list of all the Users within your organization.
* Returns the list of all the Users within your Organization.
*
* @param array $queryParameters {
*
* @var string $after After cursor (pagination)
* @var int $limit The limit of items count to retrieve.
* @var int $limit the limit of items count to retrieve
* @var string $email A given e-mail address to filter on.
* }
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
Expand Down Expand Up @@ -1873,6 +1877,39 @@ public function patchUsersUserId(string $userId, ?UpdateUser $requestBody = null
return $this->executeEndpoint(new PatchUsersUserId($userId, $requestBody), $fetch);
}

/**
* Creates a new Identity Verification resource.
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return Model\VideoIdentityVerificationCreated|ResponseInterface|null
*
* @throws Exception\PostIdentityVerificationsBadRequestException
* @throws Exception\PostIdentityVerificationsForbiddenException
* @throws Exception\PostIdentityVerificationsNotFoundException
*/
public function postIdentityVerifications(?CreateVideoIdentityVerification $requestBody = null, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new PostIdentityVerifications($requestBody), $fetch);
}

/**
* Get the detailed results of an Identity Verification.
*
* @param string $identityVerificationId The Identity verification ID
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return Model\VideoIdentityVerification|ResponseInterface|null
*
* @throws Exception\GetIdentityVerificationsIdentityVerificationIdBadRequestException
* @throws Exception\GetIdentityVerificationsIdentityVerificationIdForbiddenException
* @throws Exception\GetIdentityVerificationsIdentityVerificationIdNotFoundException
*/
public function getIdentityVerificationsIdentityVerificationId(string $identityVerificationId, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new GetIdentityVerificationsIdentityVerificationId($identityVerificationId), $fetch);
}

/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php

namespace Qdequippe\Yousign\Api\Endpoint;

use Psr\Http\Message\ResponseInterface;
use Qdequippe\Yousign\Api\Exception\GetIdentityVerificationsIdentityVerificationIdBadRequestException;
use Qdequippe\Yousign\Api\Exception\GetIdentityVerificationsIdentityVerificationIdForbiddenException;
use Qdequippe\Yousign\Api\Exception\GetIdentityVerificationsIdentityVerificationIdNotFoundException;
use Qdequippe\Yousign\Api\Model\BadRequestResponse;
use Qdequippe\Yousign\Api\Model\ForbiddenResponse;
use Qdequippe\Yousign\Api\Model\NotFoundResponse;
use Qdequippe\Yousign\Api\Model\VideoIdentityVerification;
use Qdequippe\Yousign\Api\Runtime\Client\BaseEndpoint;
use Qdequippe\Yousign\Api\Runtime\Client\Endpoint;
use Qdequippe\Yousign\Api\Runtime\Client\EndpointTrait;
use Symfony\Component\Serializer\SerializerInterface;

class GetIdentityVerificationsIdentityVerificationId extends BaseEndpoint implements Endpoint
{
use EndpointTrait;

/**
* Get the detailed results of an Identity Verification.
*
* @param string $identityVerificationId The Identity verification ID
*/
public function __construct(protected string $identityVerificationId)
{
}

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

public function getUri(): string
{
return str_replace(['{identityVerificationId}'], [$this->identityVerificationId], '/video_identity_verifications/{identityVerificationId}');
}

public function getBody(SerializerInterface $serializer, $streamFactory = null): array
{
return [[], null];
}

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

/**
* @return VideoIdentityVerification|null
*
* @throws GetIdentityVerificationsIdentityVerificationIdBadRequestException
* @throws GetIdentityVerificationsIdentityVerificationIdForbiddenException
* @throws GetIdentityVerificationsIdentityVerificationIdNotFoundException
*/
protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, ?string $contentType = null)
{
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (null !== $contentType && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) {
return $serializer->deserialize($body, VideoIdentityVerification::class, 'json');
}
if (null !== $contentType && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new GetIdentityVerificationsIdentityVerificationIdBadRequestException($serializer->deserialize($body, BadRequestResponse::class, 'json'), $response);
}
if (null !== $contentType && (403 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new GetIdentityVerificationsIdentityVerificationIdForbiddenException($serializer->deserialize($body, ForbiddenResponse::class, 'json'), $response);
}
if (null !== $contentType && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new GetIdentityVerificationsIdentityVerificationIdNotFoundException($serializer->deserialize($body, NotFoundResponse::class, 'json'), $response);
}

return null;
}

public function getAuthenticationScopes(): array
{
return ['bearerAuth'];
}
}
8 changes: 5 additions & 3 deletions generated/Endpoint/GetUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ class GetUsers extends BaseEndpoint implements Endpoint
use EndpointTrait;

/**
* Returns the list of all the Users within your organization.
* Returns the list of all the Users within your Organization.
*
* @param array $queryParameters {
*
* @var string $after After cursor (pagination)
* @var int $limit The limit of items count to retrieve.
* @var int $limit the limit of items count to retrieve
* @var string $email A given e-mail address to filter on.
* }
*/
public function __construct(array $queryParameters = [])
Expand Down Expand Up @@ -57,11 +58,12 @@ public function getExtraHeaders(): array
protected function getQueryOptionsResolver(): OptionsResolver
{
$optionsResolver = parent::getQueryOptionsResolver();
$optionsResolver->setDefined(['after', 'limit']);
$optionsResolver->setDefined(['after', 'limit', 'email']);
$optionsResolver->setRequired([]);
$optionsResolver->setDefaults(['limit' => 100]);
$optionsResolver->addAllowedTypes('after', ['string']);
$optionsResolver->addAllowedTypes('limit', ['int']);
$optionsResolver->addAllowedTypes('email', ['string', 'null']);

return $optionsResolver;
}
Expand Down
86 changes: 86 additions & 0 deletions generated/Endpoint/PostIdentityVerifications.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?php

namespace Qdequippe\Yousign\Api\Endpoint;

use Psr\Http\Message\ResponseInterface;
use Qdequippe\Yousign\Api\Exception\PostIdentityVerificationsBadRequestException;
use Qdequippe\Yousign\Api\Exception\PostIdentityVerificationsForbiddenException;
use Qdequippe\Yousign\Api\Exception\PostIdentityVerificationsNotFoundException;
use Qdequippe\Yousign\Api\Model\BadRequestResponse;
use Qdequippe\Yousign\Api\Model\CreateVideoIdentityVerification;
use Qdequippe\Yousign\Api\Model\ForbiddenResponse;
use Qdequippe\Yousign\Api\Model\NotFoundResponse;
use Qdequippe\Yousign\Api\Model\VideoIdentityVerificationCreated;
use Qdequippe\Yousign\Api\Runtime\Client\BaseEndpoint;
use Qdequippe\Yousign\Api\Runtime\Client\Endpoint;
use Qdequippe\Yousign\Api\Runtime\Client\EndpointTrait;
use Symfony\Component\Serializer\SerializerInterface;

class PostIdentityVerifications extends BaseEndpoint implements Endpoint
{
use EndpointTrait;

/**
* Creates a new Identity Verification resource.
*/
public function __construct(?CreateVideoIdentityVerification $requestBody = null)
{
$this->body = $requestBody;
}

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

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

public function getBody(SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof CreateVideoIdentityVerification) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
}

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

/**
* @return VideoIdentityVerificationCreated|null
*
* @throws PostIdentityVerificationsBadRequestException
* @throws PostIdentityVerificationsForbiddenException
* @throws PostIdentityVerificationsNotFoundException
*/
protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, ?string $contentType = null)
{
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (null !== $contentType && (201 === $status && false !== mb_strpos($contentType, 'application/json'))) {
return $serializer->deserialize($body, VideoIdentityVerificationCreated::class, 'json');
}
if (null !== $contentType && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new PostIdentityVerificationsBadRequestException($serializer->deserialize($body, BadRequestResponse::class, 'json'), $response);
}
if (null !== $contentType && (403 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new PostIdentityVerificationsForbiddenException($serializer->deserialize($body, ForbiddenResponse::class, 'json'), $response);
}
if (null !== $contentType && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
throw new PostIdentityVerificationsNotFoundException($serializer->deserialize($body, NotFoundResponse::class, 'json'), $response);
}

return null;
}

public function getAuthenticationScopes(): array
{
return ['bearerAuth'];
}
}
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\BadRequestResponse;

class GetIdentityVerificationsIdentityVerificationIdBadRequestException extends BadRequestException
{
public function __construct(private readonly BadRequestResponse $badRequestResponse, private readonly ResponseInterface $response)
{
parent::__construct('Bad request');
}

public function getBadRequestResponse(): BadRequestResponse
{
return $this->badRequestResponse;
}

public function getResponse(): ResponseInterface
{
return $this->response;
}
}
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\ForbiddenResponse;

class GetIdentityVerificationsIdentityVerificationIdForbiddenException extends ForbiddenException
{
public function __construct(private readonly ForbiddenResponse $forbiddenResponse, private readonly ResponseInterface $response)
{
parent::__construct('Access forbidden');
}

public function getForbiddenResponse(): ForbiddenResponse
{
return $this->forbiddenResponse;
}

public function getResponse(): ResponseInterface
{
return $this->response;
}
}
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\NotFoundResponse;

class GetIdentityVerificationsIdentityVerificationIdNotFoundException extends NotFoundException
{
public function __construct(private readonly NotFoundResponse $notFoundResponse, private readonly ResponseInterface $response)
{
parent::__construct('Resource not found');
}

public function getNotFoundResponse(): NotFoundResponse
{
return $this->notFoundResponse;
}

public function getResponse(): ResponseInterface
{
return $this->response;
}
}
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\BadRequestResponse;

class PostIdentityVerificationsBadRequestException extends BadRequestException
{
public function __construct(private readonly BadRequestResponse $badRequestResponse, private readonly ResponseInterface $response)
{
parent::__construct('Bad request');
}

public function getBadRequestResponse(): BadRequestResponse
{
return $this->badRequestResponse;
}

public function getResponse(): ResponseInterface
{
return $this->response;
}
}
Loading

0 comments on commit 89491a3

Please sign in to comment.