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

Update from feat/update-client-all #37

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 12 additions & 0 deletions src/Clients/CredentialIssuanceClient/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ docs/Api/OfferApi.md
docs/Api/WellKnownApi.md
docs/Model/ActionForbiddenError.md
docs/Model/ActionForbiddenErrorDetailsInner.md
docs/Model/ChangeCredentialStatus400Response.md
docs/Model/ChangeCredentialStatusInput.md
docs/Model/ChangeStatusForbiddenError.md
docs/Model/CorsGenerateCredentialsOK.md
docs/Model/CorsGetCredentialOfferOK.md
docs/Model/CorsGetWellKnownOpenIdCredentialIssuerOK.md
Expand Down Expand Up @@ -53,6 +55,7 @@ docs/Model/MissingHolderDidError.md
docs/Model/NotFoundError.md
docs/Model/ProjectCredentialConfigExistError.md
docs/Model/ProjectCredentialConfigNotExistError.md
docs/Model/RevocationForbiddenError.md
docs/Model/StartIssuance400Response.md
docs/Model/StartIssuanceInput.md
docs/Model/StartIssuanceInputDataInner.md
Expand All @@ -75,9 +78,13 @@ lib/Api/WellKnownApi.php
lib/ApiException.php
lib/Configuration.php
lib/HeaderSelector.php
lib/InvalidJwtTokenError.php
lib/InvalidParameterError.php
lib/Model/ActionForbiddenError.php
lib/Model/ActionForbiddenErrorDetailsInner.php
lib/Model/ChangeCredentialStatus400Response.php
lib/Model/ChangeCredentialStatusInput.php
lib/Model/ChangeStatusForbiddenError.php
lib/Model/CorsGenerateCredentialsOK.php
lib/Model/CorsGetCredentialOfferOK.php
lib/Model/CorsGetWellKnownOpenIdCredentialIssuerOK.php
Expand Down Expand Up @@ -122,6 +129,7 @@ lib/Model/ModelInterface.php
lib/Model/NotFoundError.php
lib/Model/ProjectCredentialConfigExistError.php
lib/Model/ProjectCredentialConfigNotExistError.php
lib/Model/RevocationForbiddenError.php
lib/Model/StartIssuance400Response.php
lib/Model/StartIssuanceInput.php
lib/Model/StartIssuanceInputDataInner.php
Expand All @@ -135,5 +143,9 @@ lib/Model/UpdateIssuanceConfigInput.php
lib/Model/VcClaimedError.php
lib/Model/WellKnownOpenIdCredentialIssuerResponse.php
lib/Model/WellKnownOpenIdCredentialIssuerResponseCredentialsSupportedInner.php
lib/NotFoundError.php
lib/ObjectSerializer.php
phpunit.xml.dist
test/Model/ChangeCredentialStatus400ResponseTest.php
test/Model/ChangeStatusForbiddenErrorTest.php
test/Model/RevocationForbiddenErrorTest.php
3 changes: 3 additions & 0 deletions src/Clients/CredentialIssuanceClient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ Class | Method | HTTP request | Description

- [ActionForbiddenError](docs/Model/ActionForbiddenError.md)
- [ActionForbiddenErrorDetailsInner](docs/Model/ActionForbiddenErrorDetailsInner.md)
- [ChangeCredentialStatus400Response](docs/Model/ChangeCredentialStatus400Response.md)
- [ChangeCredentialStatusInput](docs/Model/ChangeCredentialStatusInput.md)
- [ChangeStatusForbiddenError](docs/Model/ChangeStatusForbiddenError.md)
- [CorsGenerateCredentialsOK](docs/Model/CorsGenerateCredentialsOK.md)
- [CorsGetCredentialOfferOK](docs/Model/CorsGetCredentialOfferOK.md)
- [CorsGetWellKnownOpenIdCredentialIssuerOK](docs/Model/CorsGetWellKnownOpenIdCredentialIssuerOK.md)
Expand Down Expand Up @@ -128,6 +130,7 @@ Class | Method | HTTP request | Description
- [NotFoundError](docs/Model/NotFoundError.md)
- [ProjectCredentialConfigExistError](docs/Model/ProjectCredentialConfigExistError.md)
- [ProjectCredentialConfigNotExistError](docs/Model/ProjectCredentialConfigNotExistError.md)
- [RevocationForbiddenError](docs/Model/RevocationForbiddenError.md)
- [StartIssuance400Response](docs/Model/StartIssuance400Response.md)
- [StartIssuanceInput](docs/Model/StartIssuanceInput.md)
- [StartIssuanceInputDataInner](docs/Model/StartIssuanceInputDataInner.md)
Expand Down
8 changes: 5 additions & 3 deletions src/Clients/CredentialIssuanceClient/docs/Api/DefaultApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ All URIs are relative to https://apse1.api.affinidi.io/cis, except if the operat
## `changeCredentialStatus()`

```php
changeCredentialStatus($project_id, $configuration_id): \AffinidiTdk\Clients\CredentialIssuanceClient\Model\FlowData
changeCredentialStatus($project_id, $configuration_id, $change_credential_status_input): \AffinidiTdk\Clients\CredentialIssuanceClient\Model\FlowData
```

change credential status.
Expand Down Expand Up @@ -39,9 +39,10 @@ $apiInstance = new AffinidiTdk\Clients\CredentialIssuanceClient\Api\DefaultApi(
);
$project_id = 'project_id_example'; // string | project id
$configuration_id = 'configuration_id_example'; // string | configuration id
$change_credential_status_input = new \AffinidiTdk\Clients\CredentialIssuanceClient\Model\ChangeCredentialStatusInput(); // \AffinidiTdk\Clients\CredentialIssuanceClient\Model\ChangeCredentialStatusInput | Request body for changing credential status

try {
$result = $apiInstance->changeCredentialStatus($project_id, $configuration_id);
$result = $apiInstance->changeCredentialStatus($project_id, $configuration_id, $change_credential_status_input);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->changeCredentialStatus: ', $e->getMessage(), PHP_EOL;
Expand All @@ -54,6 +55,7 @@ try {
| ------------- | ------------- | ------------- | ------------- |
| **project_id** | **string**| project id | |
| **configuration_id** | **string**| configuration id | |
| **change_credential_status_input** | [**\AffinidiTdk\Clients\CredentialIssuanceClient\Model\ChangeCredentialStatusInput**](../Model/ChangeCredentialStatusInput.md)| Request body for changing credential status | |

### Return type

Expand All @@ -65,7 +67,7 @@ try {

### HTTP request headers

- **Content-Type**: Not defined
- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# # ChangeCredentialStatus400Response

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | |
**message** | **string** | |
**http_status_code** | **float** | |
**trace_id** | **string** | |
**details** | [**\AffinidiTdk\Clients\CredentialIssuanceClient\Model\ActionForbiddenErrorDetailsInner[]**](ActionForbiddenErrorDetailsInner.md) | | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**change_reason** | **string** | | [optional]
**issuance_flow_data_id** | **string** | | [optional]
**change_reason** | **string** | reason for revocation | [optional]
**issuance_record_id** | **string** | | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# # ChangeStatusForbiddenError

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | |
**message** | **string** | |
**http_status_code** | **float** | |
**trace_id** | **string** | |
**details** | [**\AffinidiTdk\Clients\CredentialIssuanceClient\Model\ActionForbiddenErrorDetailsInner[]**](ActionForbiddenErrorDetailsInner.md) | | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# # RevocationForbiddenError

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | |
**message** | **string** | |
**http_status_code** | **float** | |
**trace_id** | **string** | |
**details** | [**\AffinidiTdk\Clients\CredentialIssuanceClient\Model\ActionForbiddenErrorDetailsInner[]**](ActionForbiddenErrorDetailsInner.md) | | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\RequestOptions;
use AffinidiTdk\Clients\CredentialIssuanceClient\ApiException;
use AffinidiTdk\Clients\CredentialIssuanceClient\InvalidJwtTokenError;
use AffinidiTdk\Clients\CredentialIssuanceClient\InvalidParameterError;
use AffinidiTdk\Clients\CredentialIssuanceClient\NotFoundError;
use AffinidiTdk\Clients\CredentialIssuanceClient\Configuration;
use AffinidiTdk\Clients\CredentialIssuanceClient\HeaderSelector;
use AffinidiTdk\Clients\CredentialIssuanceClient\ObjectSerializer;
Expand Down Expand Up @@ -96,10 +99,10 @@ class ConfigurationApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
$hostIndex = 0
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
$this->config = $config ?: Configuration::getDefaultConfiguration();
Expand Down Expand Up @@ -170,6 +173,20 @@ public function createIssuanceConfigWithHttpInfo($create_issuance_config_input,
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
$jsonResponse = json_decode($e->getResponse()->getBody());
if ($jsonResponse->name === 'InvalidJwtTokenError') {
$issue = $jsonResponse->details[0]->issue;
throw new InvalidJwtTokenError($issue, $jsonResponse->traceId);
}

if ($jsonResponse->name === 'NotFoundError') {
throw new NotFoundError($jsonResponse->message, $jsonResponse->traceId);
}

if ($jsonResponse->name === 'InvalidParameterError') {
throw new InvalidParameterError($jsonResponse->message, $jsonResponse->details, $jsonResponse->traceId);
}

throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
Expand Down Expand Up @@ -508,6 +525,20 @@ public function deleteIssuanceConfigByIdWithHttpInfo($configuration_id, string $
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
$jsonResponse = json_decode($e->getResponse()->getBody());
if ($jsonResponse->name === 'InvalidJwtTokenError') {
$issue = $jsonResponse->details[0]->issue;
throw new InvalidJwtTokenError($issue, $jsonResponse->traceId);
}

if ($jsonResponse->name === 'NotFoundError') {
throw new NotFoundError($jsonResponse->message, $jsonResponse->traceId);
}

if ($jsonResponse->name === 'InvalidParameterError') {
throw new InvalidParameterError($jsonResponse->message, $jsonResponse->details, $jsonResponse->traceId);
}

throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
Expand Down Expand Up @@ -739,6 +770,20 @@ public function getIssuanceConfigByIdWithHttpInfo($configuration_id, string $con
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
$jsonResponse = json_decode($e->getResponse()->getBody());
if ($jsonResponse->name === 'InvalidJwtTokenError') {
$issue = $jsonResponse->details[0]->issue;
throw new InvalidJwtTokenError($issue, $jsonResponse->traceId);
}

if ($jsonResponse->name === 'NotFoundError') {
throw new NotFoundError($jsonResponse->message, $jsonResponse->traceId);
}

if ($jsonResponse->name === 'InvalidParameterError') {
throw new InvalidParameterError($jsonResponse->message, $jsonResponse->details, $jsonResponse->traceId);
}

throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
Expand Down Expand Up @@ -1112,6 +1157,20 @@ public function getIssuanceConfigListWithHttpInfo(string $contentType = self::co
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
$jsonResponse = json_decode($e->getResponse()->getBody());
if ($jsonResponse->name === 'InvalidJwtTokenError') {
$issue = $jsonResponse->details[0]->issue;
throw new InvalidJwtTokenError($issue, $jsonResponse->traceId);
}

if ($jsonResponse->name === 'NotFoundError') {
throw new NotFoundError($jsonResponse->message, $jsonResponse->traceId);
}

if ($jsonResponse->name === 'InvalidParameterError') {
throw new InvalidParameterError($jsonResponse->message, $jsonResponse->details, $jsonResponse->traceId);
}

throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
Expand Down Expand Up @@ -1401,6 +1460,20 @@ public function updateIssuanceConfigByIdWithHttpInfo($configuration_id, $update_
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
$jsonResponse = json_decode($e->getResponse()->getBody());
if ($jsonResponse->name === 'InvalidJwtTokenError') {
$issue = $jsonResponse->details[0]->issue;
throw new InvalidJwtTokenError($issue, $jsonResponse->traceId);
}

if ($jsonResponse->name === 'NotFoundError') {
throw new NotFoundError($jsonResponse->message, $jsonResponse->traceId);
}

if ($jsonResponse->name === 'InvalidParameterError') {
throw new InvalidParameterError($jsonResponse->message, $jsonResponse->details, $jsonResponse->traceId);
}

throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
Expand Down
25 changes: 21 additions & 4 deletions src/Clients/CredentialIssuanceClient/lib/Api/CredentialsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\RequestOptions;
use AffinidiTdk\Clients\CredentialIssuanceClient\ApiException;
use AffinidiTdk\Clients\CredentialIssuanceClient\InvalidJwtTokenError;
use AffinidiTdk\Clients\CredentialIssuanceClient\InvalidParameterError;
use AffinidiTdk\Clients\CredentialIssuanceClient\NotFoundError;
use AffinidiTdk\Clients\CredentialIssuanceClient\Configuration;
use AffinidiTdk\Clients\CredentialIssuanceClient\HeaderSelector;
use AffinidiTdk\Clients\CredentialIssuanceClient\ObjectSerializer;
Expand Down Expand Up @@ -84,10 +87,10 @@ class CredentialsApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
$hostIndex = 0
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
$this->config = $config ?: Configuration::getDefaultConfiguration();
Expand Down Expand Up @@ -160,6 +163,20 @@ public function generateCredentialsWithHttpInfo($project_id, $create_credential_
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
$jsonResponse = json_decode($e->getResponse()->getBody());
if ($jsonResponse->name === 'InvalidJwtTokenError') {
$issue = $jsonResponse->details[0]->issue;
throw new InvalidJwtTokenError($issue, $jsonResponse->traceId);
}

if ($jsonResponse->name === 'NotFoundError') {
throw new NotFoundError($jsonResponse->message, $jsonResponse->traceId);
}

if ($jsonResponse->name === 'InvalidParameterError') {
throw new InvalidParameterError($jsonResponse->message, $jsonResponse->details, $jsonResponse->traceId);
}

throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
Expand Down
Loading
Loading