Skip to content

Commit

Permalink
feat: update client all
Browse files Browse the repository at this point in the history
  • Loading branch information
maratsh committed Aug 13, 2024
1 parent e120689 commit 0ea740b
Show file tree
Hide file tree
Showing 64 changed files with 2,114 additions and 110 deletions.
14 changes: 12 additions & 2 deletions clients/dart/iota_client/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ analysis_options.yaml
doc/AlreadyExistsError.md
doc/AwsExchangeCredentials.md
doc/AwsExchangeCredentialsOK.md
doc/AwsExchangeCredentialsOKCredentials.md
doc/AwsExchangeCredentialsProjectToken.md
doc/AwsExchangeCredentialsProjectTokenOK.md
doc/AwsExchangeCredentialsProjectTokenOKCredentials.md
doc/CallbackApi.md
doc/CallbackInput.md
doc/ConfigurationsApi.md
doc/ConsentDto.md
doc/CorsAwsExchangeCredentialsOK.md
doc/CorsAwsExchangeCredentialsProjectTokenOK.md
doc/CorsIotOidc4vpcallbackOK.md
doc/CreateIotaConfigurationInput.md
doc/CreatePexQueryInput.md
Expand Down Expand Up @@ -54,10 +57,13 @@ lib/auth/oauth.dart
lib/model/already_exists_error.dart
lib/model/aws_exchange_credentials.dart
lib/model/aws_exchange_credentials_ok.dart
lib/model/aws_exchange_credentials_ok_credentials.dart
lib/model/aws_exchange_credentials_project_token.dart
lib/model/aws_exchange_credentials_project_token_ok.dart
lib/model/aws_exchange_credentials_project_token_ok_credentials.dart
lib/model/callback_input.dart
lib/model/consent_dto.dart
lib/model/cors_aws_exchange_credentials_ok.dart
lib/model/cors_aws_exchange_credentials_project_token_ok.dart
lib/model/cors_iot_oidc4vpcallback_ok.dart
lib/model/create_iota_configuration_input.dart
lib/model/create_pex_query_input.dart
Expand All @@ -82,3 +88,7 @@ lib/model/update_configuration_by_id_ok.dart
lib/model/update_pex_query_input.dart
lib/model/vp_token_validation_error.dart
pubspec.yaml
test/aws_exchange_credentials_project_token_ok_credentials_test.dart
test/aws_exchange_credentials_project_token_ok_test.dart
test/aws_exchange_credentials_project_token_test.dart
test/cors_aws_exchange_credentials_project_token_ok_test.dart
38 changes: 21 additions & 17 deletions clients/dart/iota_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,32 +62,36 @@ try {

All URIs are relative to *https://apse1.api.affinidi.io/ais*

| Class | Method | HTTP request | Description |
| ------------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- | ---------------------------------------- |
| _CallbackApi_ | [**iotOIDC4VPCallback**](doc//CallbackApi.md#iotoidc4vpcallback) | **POST** /v1/callback | Processes the callback for OIDC4VP flows |
| _ConfigurationsApi_ | [**createIotaConfiguration**](doc//ConfigurationsApi.md#createiotaconfiguration) | **POST** /v1/configurations |
| _ConfigurationsApi_ | [**deleteIotaConfigurationById**](doc//ConfigurationsApi.md#deleteiotaconfigurationbyid) | **DELETE** /v1/configurations/{configurationId} |
| _ConfigurationsApi_ | [**getIotaConfigurationById**](doc//ConfigurationsApi.md#getiotaconfigurationbyid) | **GET** /v1/configurations/{configurationId} |
| _ConfigurationsApi_ | [**getIotaConfigurationMetaData**](doc//ConfigurationsApi.md#getiotaconfigurationmetadata) | **GET** /v1/projects/{projectId}/configurations/{configurationId}/metadata |
| _ConfigurationsApi_ | [**listIotaConfigurations**](doc//ConfigurationsApi.md#listiotaconfigurations) | **GET** /v1/configurations |
| _ConfigurationsApi_ | [**updateIotaConfigurationById**](doc//ConfigurationsApi.md#updateiotaconfigurationbyid) | **PATCH** /v1/configurations/{configurationId} |
| _DefaultApi_ | [**listLoggedConsents**](doc//DefaultApi.md#listloggedconsents) | **GET** /v1/logged-consents |
| _IotaApi_ | [**awsExchangeCredentials**](doc//IotaApi.md#awsexchangecredentials) | **POST** /v1/aws-exchange-credentials |
| _PexQueryApi_ | [**createPexQuery**](doc//PexQueryApi.md#createpexquery) | **POST** /v1/configurations/{configurationId}/pex-queries |
| _PexQueryApi_ | [**deletePexQueryById**](doc//PexQueryApi.md#deletepexquerybyid) | **DELETE** /v1/configurations/{configurationId}/pex-queries/{queryId} |
| _PexQueryApi_ | [**getPexQueryById**](doc//PexQueryApi.md#getpexquerybyid) | **GET** /v1/configurations/{configurationId}/pex-queries/{queryId} |
| _PexQueryApi_ | [**listPexQueries**](doc//PexQueryApi.md#listpexqueries) | **GET** /v1/configurations/{configurationId}/pex-queries |
| _PexQueryApi_ | [**updatePexQueryById**](doc//PexQueryApi.md#updatepexquerybyid) | **PATCH** /v1/configurations/{configurationId}/pex-queries/{queryId} |
| Class | Method | HTTP request | Description |
| ------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------- |
| _CallbackApi_ | [**iotOIDC4VPCallback**](doc//CallbackApi.md#iotoidc4vpcallback) | **POST** /v1/callback | Processes the callback for OIDC4VP flows |
| _ConfigurationsApi_ | [**createIotaConfiguration**](doc//ConfigurationsApi.md#createiotaconfiguration) | **POST** /v1/configurations |
| _ConfigurationsApi_ | [**deleteIotaConfigurationById**](doc//ConfigurationsApi.md#deleteiotaconfigurationbyid) | **DELETE** /v1/configurations/{configurationId} |
| _ConfigurationsApi_ | [**getIotaConfigurationById**](doc//ConfigurationsApi.md#getiotaconfigurationbyid) | **GET** /v1/configurations/{configurationId} |
| _ConfigurationsApi_ | [**getIotaConfigurationMetaData**](doc//ConfigurationsApi.md#getiotaconfigurationmetadata) | **GET** /v1/projects/{projectId}/configurations/{configurationId}/metadata |
| _ConfigurationsApi_ | [**listIotaConfigurations**](doc//ConfigurationsApi.md#listiotaconfigurations) | **GET** /v1/configurations |
| _ConfigurationsApi_ | [**updateIotaConfigurationById**](doc//ConfigurationsApi.md#updateiotaconfigurationbyid) | **PATCH** /v1/configurations/{configurationId} |
| _DefaultApi_ | [**listLoggedConsents**](doc//DefaultApi.md#listloggedconsents) | **GET** /v1/logged-consents |
| _IotaApi_ | [**awsExchangeCredentials**](doc//IotaApi.md#awsexchangecredentials) | **POST** /v1/aws-exchange-credentials |
| _IotaApi_ | [**awsExchangeCredentialsProjectToken**](doc//IotaApi.md#awsexchangecredentialsprojecttoken) | **POST** /v1/aws-exchange-credentials/project-token |
| _PexQueryApi_ | [**createPexQuery**](doc//PexQueryApi.md#createpexquery) | **POST** /v1/configurations/{configurationId}/pex-queries |
| _PexQueryApi_ | [**deletePexQueryById**](doc//PexQueryApi.md#deletepexquerybyid) | **DELETE** /v1/configurations/{configurationId}/pex-queries/{queryId} |
| _PexQueryApi_ | [**getPexQueryById**](doc//PexQueryApi.md#getpexquerybyid) | **GET** /v1/configurations/{configurationId}/pex-queries/{queryId} |
| _PexQueryApi_ | [**listPexQueries**](doc//PexQueryApi.md#listpexqueries) | **GET** /v1/configurations/{configurationId}/pex-queries |
| _PexQueryApi_ | [**updatePexQueryById**](doc//PexQueryApi.md#updatepexquerybyid) | **PATCH** /v1/configurations/{configurationId}/pex-queries/{queryId} |

## Documentation For Models

- [AlreadyExistsError](doc//AlreadyExistsError.md)
- [AwsExchangeCredentials](doc//AwsExchangeCredentials.md)
- [AwsExchangeCredentialsOK](doc//AwsExchangeCredentialsOK.md)
- [AwsExchangeCredentialsOKCredentials](doc//AwsExchangeCredentialsOKCredentials.md)
- [AwsExchangeCredentialsProjectToken](doc//AwsExchangeCredentialsProjectToken.md)
- [AwsExchangeCredentialsProjectTokenOK](doc//AwsExchangeCredentialsProjectTokenOK.md)
- [AwsExchangeCredentialsProjectTokenOKCredentials](doc//AwsExchangeCredentialsProjectTokenOKCredentials.md)
- [CallbackInput](doc//CallbackInput.md)
- [ConsentDto](doc//ConsentDto.md)
- [CorsAwsExchangeCredentialsOK](doc//CorsAwsExchangeCredentialsOK.md)
- [CorsAwsExchangeCredentialsProjectTokenOK](doc//CorsAwsExchangeCredentialsProjectTokenOK.md)
- [CorsIotOidc4vpcallbackOK](doc//CorsIotOidc4vpcallbackOK.md)
- [CreateIotaConfigurationInput](doc//CreateIotaConfigurationInput.md)
- [CreatePexQueryInput](doc//CreatePexQueryInput.md)
Expand Down
8 changes: 4 additions & 4 deletions clients/dart/iota_client/doc/AwsExchangeCredentialsOK.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import 'package:affinidi_tdk_iota_client/api.dart';

## Properties

| Name | Type | Description | Notes |
| ---------------------- | --------------------------------------------------------------------------------- | ----------- | ----- |
| **connectionClientId** | **String** | |
| **credentials** | [**AwsExchangeCredentialsOKCredentials**](AwsExchangeCredentialsOKCredentials.md) | |
| Name | Type | Description | Notes |
| ---------------------- | --------------------------------------------------------------------------------------------------------- | ----------- | ----- |
| **connectionClientId** | **String** | |
| **credentials** | [**AwsExchangeCredentialsProjectTokenOKCredentials**](AwsExchangeCredentialsProjectTokenOKCredentials.md) | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
17 changes: 17 additions & 0 deletions clients/dart/iota_client/doc/AwsExchangeCredentialsProjectToken.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# affinidi_tdk_iota_client.model.AwsExchangeCredentialsProjectToken

## Load the model package

```dart
import 'package:affinidi_tdk_iota_client/api.dart';
```

## Properties

| Name | Type | Description | Notes |
| ------------------- | ---------- | ----------------------------- | ----- |
| **sessionId** | **String** | sessionId generated by client |
| **configurationId** | **String** | iotaConfiguration Id |
| **did** | **String** | Vault DID of the user |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# affinidi_tdk_iota_client.model.AwsExchangeCredentialsProjectTokenOK

## Load the model package

```dart
import 'package:affinidi_tdk_iota_client/api.dart';
```

## Properties

| Name | Type | Description | Notes |
| ---------------------- | --------------------------------------------------------------------------------------------------------- | ----------- | ----- |
| **connectionClientId** | **String** | |
| **credentials** | [**AwsExchangeCredentialsProjectTokenOKCredentials**](AwsExchangeCredentialsProjectTokenOKCredentials.md) | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# affinidi_tdk_iota_client.model.AwsExchangeCredentialsProjectTokenOKCredentials

## Load the model package

```dart
import 'package:affinidi_tdk_iota_client/api.dart';
```

## Properties

| Name | Type | Description | Notes |
| -------------- | ---------- | ----------- | ----- |
| **identityId** | **String** | |
| **token** | **String** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# affinidi_tdk_iota_client.model.CorsAwsExchangeCredentialsProjectTokenOK

## Load the model package

```dart
import 'package:affinidi_tdk_iota_client/api.dart';
```

## Properties

| Name | Type | Description | Notes |
| -------------------------------------------- | ---------- | ----------- | ---------- |
| **corsAwsExchangeCredentialsProjectTokenOk** | **String** | | [optional] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
54 changes: 51 additions & 3 deletions clients/dart/iota_client/doc/IotaApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import 'package:affinidi_tdk_iota_client/api.dart';

All URIs are relative to *https://apse1.api.affinidi.io/ais*

| Method | HTTP request | Description |
| --------------------------------------------------------------- | ------------------------------------- | ----------- |
| [**awsExchangeCredentials**](IotaApi.md#awsexchangecredentials) | **POST** /v1/aws-exchange-credentials |
| Method | HTTP request | Description |
| --------------------------------------------------------------------------------------- | --------------------------------------------------- | ----------- |
| [**awsExchangeCredentials**](IotaApi.md#awsexchangecredentials) | **POST** /v1/aws-exchange-credentials |
| [**awsExchangeCredentialsProjectToken**](IotaApi.md#awsexchangecredentialsprojecttoken) | **POST** /v1/aws-exchange-credentials/project-token |

# **awsExchangeCredentials**

Expand Down Expand Up @@ -54,3 +55,50 @@ No authorization required
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **awsExchangeCredentialsProjectToken**

> AwsExchangeCredentialsOK awsExchangeCredentialsProjectToken(awsExchangeCredentialsProjectToken)
It exchanges project token into cognito

### Example

```dart
import 'package:affinidi_tdk_iota_client/api.dart';
// TODO Configure API key authorization: ProjectTokenAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ProjectTokenAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ProjectTokenAuth').apiKeyPrefix = 'Bearer';
final api_instance = IotaApi();
final awsExchangeCredentialsProjectToken = AwsExchangeCredentialsProjectToken(); // AwsExchangeCredentialsProjectToken | AwsExchangeCredentialsProjectToken
try {
final result = api_instance.awsExchangeCredentialsProjectToken(awsExchangeCredentialsProjectToken);
print(result);
} catch (e) {
print('Exception when calling IotaApi->awsExchangeCredentialsProjectToken: $e\n');
}
```

### Parameters

| Name | Type | Description | Notes |
| -------------------------------------- | ------------------------------------------------------------------------------- | ---------------------------------- | ----- |
| **awsExchangeCredentialsProjectToken** | [**AwsExchangeCredentialsProjectToken**](AwsExchangeCredentialsProjectToken.md) | AwsExchangeCredentialsProjectToken |

### Return type

[**AwsExchangeCredentialsOK**](AwsExchangeCredentialsOK.md)

### Authorization

[ProjectTokenAuth](../README.md#ProjectTokenAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
5 changes: 4 additions & 1 deletion clients/dart/iota_client/lib/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ part 'api/pex_query_api.dart';
part 'model/already_exists_error.dart';
part 'model/aws_exchange_credentials.dart';
part 'model/aws_exchange_credentials_ok.dart';
part 'model/aws_exchange_credentials_ok_credentials.dart';
part 'model/aws_exchange_credentials_project_token.dart';
part 'model/aws_exchange_credentials_project_token_ok.dart';
part 'model/aws_exchange_credentials_project_token_ok_credentials.dart';
part 'model/callback_input.dart';
part 'model/consent_dto.dart';
part 'model/cors_aws_exchange_credentials_ok.dart';
part 'model/cors_aws_exchange_credentials_project_token_ok.dart';
part 'model/cors_iot_oidc4vpcallback_ok.dart';
part 'model/create_iota_configuration_input.dart';
part 'model/create_pex_query_input.dart';
Expand Down
54 changes: 54 additions & 0 deletions clients/dart/iota_client/lib/api/iota_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,58 @@ class IotaApi {
}
return null;
}

/// It exchanges project token into cognito
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [AwsExchangeCredentialsProjectToken] awsExchangeCredentialsProjectToken (required):
/// AwsExchangeCredentialsProjectToken
Future<Response> awsExchangeCredentialsProjectTokenWithHttpInfo(AwsExchangeCredentialsProjectToken awsExchangeCredentialsProjectToken,) async {
// ignore: prefer_const_declarations
final path = r'/v1/aws-exchange-credentials/project-token';

// ignore: prefer_final_locals
Object? postBody = awsExchangeCredentialsProjectToken;

final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};

const contentTypes = <String>['application/json'];


return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}

/// It exchanges project token into cognito
///
/// Parameters:
///
/// * [AwsExchangeCredentialsProjectToken] awsExchangeCredentialsProjectToken (required):
/// AwsExchangeCredentialsProjectToken
Future<AwsExchangeCredentialsOK?> awsExchangeCredentialsProjectToken(AwsExchangeCredentialsProjectToken awsExchangeCredentialsProjectToken,) async {
final response = await awsExchangeCredentialsProjectTokenWithHttpInfo(awsExchangeCredentialsProjectToken,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AwsExchangeCredentialsOK',) as AwsExchangeCredentialsOK;

}
return null;
}
}
Loading

0 comments on commit 0ea740b

Please sign in to comment.