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 #254

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
9 changes: 0 additions & 9 deletions clients/dart/iota_client/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,3 @@ 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/callback_response_ok_redirect_response_test.dart
test/callback_response_ok_test.dart
test/cors_fetch_iota_vp_response_ok_test.dart
test/cors_initiate_data_sharing_request_ok_test.dart
test/fetch_iotavp_response_input_test.dart
test/fetch_iotavp_response_ok_test.dart
test/initiate_data_sharing_request_input_test.dart
test/initiate_data_sharing_request_ok_data_test.dart
test/initiate_data_sharing_request_ok_test.dart
23 changes: 11 additions & 12 deletions clients/dart/iota_client/doc/UpdateConfigurationByIdInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ import 'package:affinidi_tdk_iota_client/api.dart';

## Properties

| Name | Type | Description | Notes |
| -------------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| **name** | **String** | The name of the config | [optional] |
| **walletAri** | **String** | The wallet Ari that will be used to sign | [optional] |
| **iotaResponseWebhookURL** | **String** | webhook to call when data is ready | [optional] |
| **enableVerification** | **bool** | | [optional] |
| **enableConsentAuditLog** | **bool** | | [optional] |
| **tokenMaxAge** | **int** | token time to live in seconds | [optional] |
| **description** | **String** | The description of the config | [optional] |
| **clientMetadata** | [**IotaConfigurationDtoClientMetadata**](IotaConfigurationDtoClientMetadata.md) | | [optional] |
| **mode** | **String** | indicates whether the flow is a WebSocket flow or a Redirect flow. This value is used in Vault to determine how to process the data flow request. | [optional] |
| **redirectUri** | **String** | the URL that the user will be redirected to after the request has been processed; should be provided by the developer of the client application. Required only if mode is Redirect. | [optional] |
| Name | Type | Description | Notes |
| -------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| **name** | **String** | The name of the config | [optional] |
| **walletAri** | **String** | The wallet Ari that will be used to sign | [optional] |
| **iotaResponseWebhookURL** | **String** | webhook to call when data is ready | [optional] |
| **enableVerification** | **bool** | | [optional] |
| **enableConsentAuditLog** | **bool** | | [optional] |
| **tokenMaxAge** | **int** | token time to live in seconds | [optional] |
| **description** | **String** | The description of the config | [optional] |
| **clientMetadata** | [**IotaConfigurationDtoClientMetadata**](IotaConfigurationDtoClientMetadata.md) | | [optional] |
| **redirectUris** | **List<String>** | the URL that the user will be redirected to after the request has been processed; should be provided by the developer of the client application.Required only if mode is Redirect. | [optional] [default to const []] |

[[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
Expand Up @@ -21,8 +21,7 @@ class UpdateConfigurationByIdInput {
this.tokenMaxAge,
this.description,
this.clientMetadata,
this.mode,
this.redirectUri,
this.redirectUris = const [],
});

/// The name of the config
Expand Down Expand Up @@ -94,17 +93,8 @@ class UpdateConfigurationByIdInput {
///
IotaConfigurationDtoClientMetadata? clientMetadata;

/// indicates whether the flow is a WebSocket flow or a Redirect flow. This value is used in Vault to determine how to process the data flow request.
UpdateConfigurationByIdInputModeEnum? mode;

/// the URL that the user will be redirected to after the request has been processed; should be provided by the developer of the client application. Required only if mode is Redirect.
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? redirectUri;
/// the URL that the user will be redirected to after the request has been processed; should be provided by the developer of the client application.Required only if mode is Redirect.
List<String> redirectUris;

@override
bool operator ==(Object other) => identical(this, other) || other is UpdateConfigurationByIdInput &&
Expand All @@ -116,8 +106,7 @@ class UpdateConfigurationByIdInput {
other.tokenMaxAge == tokenMaxAge &&
other.description == description &&
other.clientMetadata == clientMetadata &&
other.mode == mode &&
other.redirectUri == redirectUri;
_deepEquality.equals(other.redirectUris, redirectUris);

@override
int get hashCode =>
Expand All @@ -130,11 +119,10 @@ class UpdateConfigurationByIdInput {
(tokenMaxAge == null ? 0 : tokenMaxAge!.hashCode) +
(description == null ? 0 : description!.hashCode) +
(clientMetadata == null ? 0 : clientMetadata!.hashCode) +
(mode == null ? 0 : mode!.hashCode) +
(redirectUri == null ? 0 : redirectUri!.hashCode);
(redirectUris.hashCode);

@override
String toString() => 'UpdateConfigurationByIdInput[name=$name, walletAri=$walletAri, iotaResponseWebhookURL=$iotaResponseWebhookURL, enableVerification=$enableVerification, enableConsentAuditLog=$enableConsentAuditLog, tokenMaxAge=$tokenMaxAge, description=$description, clientMetadata=$clientMetadata, mode=$mode, redirectUri=$redirectUri]';
String toString() => 'UpdateConfigurationByIdInput[name=$name, walletAri=$walletAri, iotaResponseWebhookURL=$iotaResponseWebhookURL, enableVerification=$enableVerification, enableConsentAuditLog=$enableConsentAuditLog, tokenMaxAge=$tokenMaxAge, description=$description, clientMetadata=$clientMetadata, redirectUris=$redirectUris]';

Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
Expand Down Expand Up @@ -178,16 +166,7 @@ class UpdateConfigurationByIdInput {
} else {
json[r'clientMetadata'] = null;
}
if (this.mode != null) {
json[r'mode'] = this.mode;
} else {
json[r'mode'] = null;
}
if (this.redirectUri != null) {
json[r'redirectUri'] = this.redirectUri;
} else {
json[r'redirectUri'] = null;
}
json[r'redirectUris'] = this.redirectUris;
return json;
}

Expand Down Expand Up @@ -218,8 +197,9 @@ class UpdateConfigurationByIdInput {
tokenMaxAge: mapValueOfType<int>(json, r'tokenMaxAge'),
description: mapValueOfType<String>(json, r'description'),
clientMetadata: IotaConfigurationDtoClientMetadata.fromJson(json[r'clientMetadata']),
mode: UpdateConfigurationByIdInputModeEnum.fromJson(json[r'mode']),
redirectUri: mapValueOfType<String>(json, r'redirectUri'),
redirectUris: json[r'redirectUris'] is Iterable
? (json[r'redirectUris'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
Expand Down Expand Up @@ -270,77 +250,3 @@ class UpdateConfigurationByIdInput {
};
}

/// indicates whether the flow is a WebSocket flow or a Redirect flow. This value is used in Vault to determine how to process the data flow request.
class UpdateConfigurationByIdInputModeEnum {
/// Instantiate a new enum with the provided [value].
const UpdateConfigurationByIdInputModeEnum._(this.value);

/// The underlying value of this enum member.
final String value;

@override
String toString() => value;

String toJson() => value;

static const redirect = UpdateConfigurationByIdInputModeEnum._(r'redirect');
static const websocket = UpdateConfigurationByIdInputModeEnum._(r'websocket');

/// List of all possible values in this [enum][UpdateConfigurationByIdInputModeEnum].
static const values = <UpdateConfigurationByIdInputModeEnum>[
redirect,
websocket,
];

static UpdateConfigurationByIdInputModeEnum? fromJson(dynamic value) => UpdateConfigurationByIdInputModeEnumTypeTransformer().decode(value);

static List<UpdateConfigurationByIdInputModeEnum> listFromJson(dynamic json, {bool growable = false,}) {
final result = <UpdateConfigurationByIdInputModeEnum>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = UpdateConfigurationByIdInputModeEnum.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}

/// Transformation class that can [encode] an instance of [UpdateConfigurationByIdInputModeEnum] to String,
/// and [decode] dynamic data back to [UpdateConfigurationByIdInputModeEnum].
class UpdateConfigurationByIdInputModeEnumTypeTransformer {
factory UpdateConfigurationByIdInputModeEnumTypeTransformer() => _instance ??= const UpdateConfigurationByIdInputModeEnumTypeTransformer._();

const UpdateConfigurationByIdInputModeEnumTypeTransformer._();

String encode(UpdateConfigurationByIdInputModeEnum data) => data.value;

/// Decodes a [dynamic value][data] to a UpdateConfigurationByIdInputModeEnum.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
UpdateConfigurationByIdInputModeEnum? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'redirect': return UpdateConfigurationByIdInputModeEnum.redirect;
case r'websocket': return UpdateConfigurationByIdInputModeEnum.websocket;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}

/// Singleton [UpdateConfigurationByIdInputModeEnumTypeTransformer] instance.
static UpdateConfigurationByIdInputModeEnumTypeTransformer? _instance;
}


9 changes: 0 additions & 9 deletions clients/python/iota_client/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,4 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_callback_response_ok.py
test/test_callback_response_ok_redirect_response.py
test/test_cors_fetch_iota_vp_response_ok.py
test/test_cors_initiate_data_sharing_request_ok.py
test/test_fetch_iotavp_response_input.py
test/test_fetch_iotavp_response_ok.py
test/test_initiate_data_sharing_request_input.py
test/test_initiate_data_sharing_request_ok.py
test/test_initiate_data_sharing_request_ok_data.py
tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import json


from typing import Optional, Union
from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, validator
from typing import List, Optional, Union
from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, conlist
from affinidi_tdk_iota_client.models.iota_configuration_dto_client_metadata import IotaConfigurationDtoClientMetadata

class UpdateConfigurationByIdInput(BaseModel):
Expand All @@ -35,19 +35,8 @@ class UpdateConfigurationByIdInput(BaseModel):
token_max_age: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="tokenMaxAge", description="token time to live in seconds")
description: Optional[StrictStr] = Field(default=None, description="The description of the config")
client_metadata: Optional[IotaConfigurationDtoClientMetadata] = Field(default=None, alias="clientMetadata")
mode: Optional[StrictStr] = Field(default=None, description="indicates whether the flow is a WebSocket flow or a Redirect flow. This value is used in Vault to determine how to process the data flow request.")
redirect_uri: Optional[StrictStr] = Field(default=None, alias="redirectUri", description="the URL that the user will be redirected to after the request has been processed; should be provided by the developer of the client application. Required only if mode is Redirect.")
__properties = ["name", "walletAri", "iotaResponseWebhookURL", "enableVerification", "enableConsentAuditLog", "tokenMaxAge", "description", "clientMetadata", "mode", "redirectUri"]

@validator('mode')
def mode_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value

if value not in ('redirect', 'websocket'):
raise ValueError("must be one of enum values ('redirect', 'websocket')")
return value
redirect_uris: Optional[conlist(StrictStr)] = Field(default=None, alias="redirectUris", description="the URL that the user will be redirected to after the request has been processed; should be provided by the developer of the client application.Required only if mode is Redirect.")
__properties = ["name", "walletAri", "iotaResponseWebhookURL", "enableVerification", "enableConsentAuditLog", "tokenMaxAge", "description", "clientMetadata", "redirectUris"]

class Config:
"""Pydantic configuration"""
Expand Down Expand Up @@ -96,8 +85,7 @@ def from_dict(cls, obj: dict) -> UpdateConfigurationByIdInput:
"token_max_age": obj.get("tokenMaxAge"),
"description": obj.get("description"),
"client_metadata": IotaConfigurationDtoClientMetadata.from_dict(obj.get("clientMetadata")) if obj.get("clientMetadata") is not None else None,
"mode": obj.get("mode"),
"redirect_uri": obj.get("redirectUri")
"redirect_uris": obj.get("redirectUris")
})
return _obj

Expand Down
Loading
Loading