Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate client from latest api #15

Merged
merged 1 commit into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions generated/Auth/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,23 @@ public function updateUserMfaPreference(string $userId, ?\stdClass $requestBody
{
return $this->executeEndpoint(new \AntiPatternInc\Saasus\Sdk\Auth\Endpoint\UpdateUserMfaPreference($userId, $requestBody), $fetch);
}
/**
* 外部IDプロバイダの連携を解除します。

Unlink external identity providers.

*
* @param string $userId ユーザーID(User ID)
* @param string $providerName 外部IDプロバイダ名(External Identity Provider Name)
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\UnlinkProviderInternalServerErrorException
*
* @return null|\Psr\Http\Message\ResponseInterface
*/
public function unlinkProvider(string $userId, string $providerName, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new \AntiPatternInc\Saasus\Sdk\Auth\Endpoint\UnlinkProvider($userId, $providerName), $fetch);
}
/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\GetAllTenantUsersInternalServerErrorException
Expand Down Expand Up @@ -624,6 +641,44 @@ public function updateTenant(string $tenantId, ?\stdClass $requestBody = null, s
{
return $this->executeEndpoint(new \AntiPatternInc\Saasus\Sdk\Auth\Endpoint\UpdateTenant($tenantId, $requestBody), $fetch);
}
/**
* SaaSus Platform で管理しているテナントのプラン情報を更新します。

Update SaaSus Platform tenant plan information.

*
* @param string $tenantId テナントID(Tenant ID)
* @param null|\stdClass $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\UpdateTenantPlanBadRequestException
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\UpdateTenantPlanNotFoundException
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\UpdateTenantPlanInternalServerErrorException
*
* @return null|\Psr\Http\Message\ResponseInterface
*/
public function updateTenantPlan(string $tenantId, ?\stdClass $requestBody = null, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new \AntiPatternInc\Saasus\Sdk\Auth\Endpoint\UpdateTenantPlan($tenantId, $requestBody), $fetch);
}
/**
* SaaSus Platform で管理しているテナントの請求先情報を更新します。

Update SaaSus Platform tenant billing information.

*
* @param string $tenantId テナントID(Tenant ID)
* @param null|\stdClass $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\UpdateTenantBillingInfoBadRequestException
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\UpdateTenantBillingInfoNotFoundException
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\UpdateTenantBillingInfoInternalServerErrorException
*
* @return null|\Psr\Http\Message\ResponseInterface
*/
public function updateTenantBillingInfo(string $tenantId, ?\stdClass $requestBody = null, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new \AntiPatternInc\Saasus\Sdk\Auth\Endpoint\UpdateTenantBillingInfo($tenantId, $requestBody), $fetch);
}
/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\GetApiKeysInternalServerErrorException
Expand Down Expand Up @@ -974,6 +1029,48 @@ public function createAuthCredentials(?\stdClass $requestBody = null, string $fe
{
return $this->executeEndpoint(new \AntiPatternInc\Saasus\Sdk\Auth\Endpoint\CreateAuthCredentials($requestBody), $fetch);
}
/**
* ユーザーを新規登録します。登録されたメールアドレスに対して仮パスワードを送信します。

Register a new user. A temporary password will be sent to the registered email.

*
* @param null|\AntiPatternInc\Saasus\Sdk\Auth\Model\SignUpParam $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\SignUpInternalServerErrorException
*
* @return null|\AntiPatternInc\Saasus\Sdk\Auth\Model\SaasUser|\Psr\Http\Message\ResponseInterface
*/
public function signUp(?\AntiPatternInc\Saasus\Sdk\Auth\Model\SignUpParam $requestBody = null, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new \AntiPatternInc\Saasus\Sdk\Auth\Endpoint\SignUp($requestBody), $fetch);
}
/**
* 新規登録時の仮パスワードを再送信します。

Resend temporary password for the new registered user.

*
* @param null|\AntiPatternInc\Saasus\Sdk\Auth\Model\ResendSignUpConfirmationEmailParam $requestBody
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\ResendSignUpConfirmationEmailInternalServerErrorException
*
* @return null|\Psr\Http\Message\ResponseInterface
*/
public function resendSignUpConfirmationEmail(?\AntiPatternInc\Saasus\Sdk\Auth\Model\ResendSignUpConfirmationEmailParam $requestBody = null, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new \AntiPatternInc\Saasus\Sdk\Auth\Endpoint\ResendSignUpConfirmationEmail($requestBody), $fetch);
}
/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\ReturnInternalServerErrorInternalServerErrorException
*
* @return null|\Psr\Http\Message\ResponseInterface
*/
public function returnInternalServerError(string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new \AntiPatternInc\Saasus\Sdk\Auth\Endpoint\ReturnInternalServerError(), $fetch);
}
public static function create($httpClient = null, array $additionalPlugins = array(), array $additionalNormalizers = array())
{
if (null === $httpClient) {
Expand Down
59 changes: 59 additions & 0 deletions generated/Auth/Endpoint/ResendSignUpConfirmationEmail.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php

namespace AntiPatternInc\Saasus\Sdk\Auth\Endpoint;

class ResendSignUpConfirmationEmail extends \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\BaseEndpoint implements \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\Endpoint
{
/**
* 新規登録時の仮パスワードを再送信します。

Resend temporary password for the new registered user.

*
* @param null|\AntiPatternInc\Saasus\Sdk\Auth\Model\ResendSignUpConfirmationEmailParam $requestBody
*/
public function __construct(?\AntiPatternInc\Saasus\Sdk\Auth\Model\ResendSignUpConfirmationEmailParam $requestBody = null)
{
$this->body = $requestBody;
}
use \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\EndpointTrait;
public function getMethod() : string
{
return 'POST';
}
public function getUri() : string
{
return '/sign-up/resend';
}
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array
{
if ($this->body instanceof \AntiPatternInc\Saasus\Sdk\Auth\Model\ResendSignUpConfirmationEmailParam) {
return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json'));
}
return array(array(), null);
}
public function getExtraHeaders() : array
{
return array('Accept' => array('application/json'));
}
/**
* {@inheritdoc}
*
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\ResendSignUpConfirmationEmailInternalServerErrorException
*
* @return null
*/
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
if (200 === $status) {
return null;
}
if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \AntiPatternInc\Saasus\Sdk\Auth\Exception\ResendSignUpConfirmationEmailInternalServerErrorException($serializer->deserialize($body, 'AntiPatternInc\\Saasus\\Sdk\\Auth\\Model\\Error', 'json'));
}
}
public function getAuthenticationScopes() : array
{
return array('Bearer');
}
}
41 changes: 41 additions & 0 deletions generated/Auth/Endpoint/ReturnInternalServerError.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace AntiPatternInc\Saasus\Sdk\Auth\Endpoint;

class ReturnInternalServerError extends \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\BaseEndpoint implements \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\Endpoint
{
use \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\EndpointTrait;
public function getMethod() : string
{
return 'GET';
}
public function getUri() : string
{
return '/errors/internal-server-error';
}
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array
{
return array(array(), null);
}
public function getExtraHeaders() : array
{
return array('Accept' => array('application/json'));
}
/**
* {@inheritdoc}
*
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\ReturnInternalServerErrorInternalServerErrorException
*
* @return null
*/
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \AntiPatternInc\Saasus\Sdk\Auth\Exception\ReturnInternalServerErrorInternalServerErrorException($serializer->deserialize($body, 'AntiPatternInc\\Saasus\\Sdk\\Auth\\Model\\Error', 'json'));
}
}
public function getAuthenticationScopes() : array
{
return array('Bearer');
}
}
59 changes: 59 additions & 0 deletions generated/Auth/Endpoint/SignUp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php

namespace AntiPatternInc\Saasus\Sdk\Auth\Endpoint;

class SignUp extends \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\BaseEndpoint implements \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\Endpoint
{
/**
* ユーザーを新規登録します。登録されたメールアドレスに対して仮パスワードを送信します。

Register a new user. A temporary password will be sent to the registered email.

*
* @param null|\AntiPatternInc\Saasus\Sdk\Auth\Model\SignUpParam $requestBody
*/
public function __construct(?\AntiPatternInc\Saasus\Sdk\Auth\Model\SignUpParam $requestBody = null)
{
$this->body = $requestBody;
}
use \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\EndpointTrait;
public function getMethod() : string
{
return 'POST';
}
public function getUri() : string
{
return '/sign-up';
}
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array
{
if ($this->body instanceof \AntiPatternInc\Saasus\Sdk\Auth\Model\SignUpParam) {
return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json'));
}
return array(array(), null);
}
public function getExtraHeaders() : array
{
return array('Accept' => array('application/json'));
}
/**
* {@inheritdoc}
*
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\SignUpInternalServerErrorException
*
* @return null|\AntiPatternInc\Saasus\Sdk\Auth\Model\SaasUser
*/
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) {
return $serializer->deserialize($body, 'AntiPatternInc\\Saasus\\Sdk\\Auth\\Model\\SaasUser', 'json');
}
if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \AntiPatternInc\Saasus\Sdk\Auth\Exception\SignUpInternalServerErrorException($serializer->deserialize($body, 'AntiPatternInc\\Saasus\\Sdk\\Auth\\Model\\Error', 'json'));
}
}
public function getAuthenticationScopes() : array
{
return array('Bearer');
}
}
56 changes: 56 additions & 0 deletions generated/Auth/Endpoint/UnlinkProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

namespace AntiPatternInc\Saasus\Sdk\Auth\Endpoint;

class UnlinkProvider extends \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\BaseEndpoint implements \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\Endpoint
{
protected $user_id;
protected $provider_name;
/**
* 外部IDプロバイダの連携を解除します。

Unlink external identity providers.

*
* @param string $userId ユーザーID(User ID)
* @param string $providerName 外部IDプロバイダ名(External Identity Provider Name)
*/
public function __construct(string $userId, string $providerName)
{
$this->user_id = $userId;
$this->provider_name = $providerName;
}
use \AntiPatternInc\Saasus\Sdk\Auth\Runtime\Client\EndpointTrait;
public function getMethod() : string
{
return 'DELETE';
}
public function getUri() : string
{
return str_replace(array('{user_id}', '{provider_name}'), array($this->user_id, $this->provider_name), '/users/{user_id}/providers/{provider_name}');
}
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array
{
return array(array(), null);
}
/**
* {@inheritdoc}
*
* @throws \AntiPatternInc\Saasus\Sdk\Auth\Exception\UnlinkProviderInternalServerErrorException
*
* @return null
*/
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
if (200 === $status) {
return null;
}
if (500 === $status) {
throw new \AntiPatternInc\Saasus\Sdk\Auth\Exception\UnlinkProviderInternalServerErrorException();
}
}
public function getAuthenticationScopes() : array
{
return array('Bearer');
}
}
Loading