diff --git a/clients/dart/credential_issuance_client/.openapi-generator/FILES b/clients/dart/credential_issuance_client/.openapi-generator/FILES index ee4c822a..ee0d5522 100644 --- a/clients/dart/credential_issuance_client/.openapi-generator/FILES +++ b/clients/dart/credential_issuance_client/.openapi-generator/FILES @@ -35,6 +35,7 @@ doc/InvalidParameterError.md doc/InvalidProofError.md doc/IssuanceApi.md doc/IssuanceConfigDto.md +doc/IssuanceConfigDtoCredentialSupportedInner.md doc/IssuanceConfigListResponse.md doc/IssuanceConfigMiniDto.md doc/IssuanceStateResponse.md @@ -46,6 +47,7 @@ doc/ProjectCredentialConfigNotExistError.md doc/StartIssuance400Response.md doc/StartIssuanceInput.md doc/StartIssuanceInputDataInner.md +doc/StartIssuanceInputDataInnerMetaData.md doc/StartIssuanceResponse.md doc/UpdateIssuanceConfigInput.md doc/VcClaimedError.md @@ -95,6 +97,7 @@ lib/model/invalid_jwt_token_error.dart lib/model/invalid_parameter_error.dart lib/model/invalid_proof_error.dart lib/model/issuance_config_dto.dart +lib/model/issuance_config_dto_credential_supported_inner.dart lib/model/issuance_config_list_response.dart lib/model/issuance_config_mini_dto.dart lib/model/issuance_state_response.dart @@ -105,12 +108,11 @@ lib/model/project_credential_config_not_exist_error.dart lib/model/start_issuance400_response.dart lib/model/start_issuance_input.dart lib/model/start_issuance_input_data_inner.dart +lib/model/start_issuance_input_data_inner_meta_data.dart lib/model/start_issuance_response.dart lib/model/update_issuance_config_input.dart lib/model/vc_claimed_error.dart lib/model/well_known_open_id_credential_issuer_response.dart pubspec.yaml -test/cors_generate_credentials_ok_test.dart -test/cors_get_credential_offer_ok_test.dart -test/cors_get_well_known_open_id_credential_issuer_ok_test.dart -test/vc_claimed_error_test.dart +test/issuance_config_dto_credential_supported_inner_test.dart +test/start_issuance_input_data_inner_meta_data_test.dart diff --git a/clients/dart/credential_issuance_client/README.md b/clients/dart/credential_issuance_client/README.md index f092f51d..8f552540 100644 --- a/clients/dart/credential_issuance_client/README.md +++ b/clients/dart/credential_issuance_client/README.md @@ -111,6 +111,7 @@ All URIs are relative to _http://localhost_ - [InvalidParameterError](doc//InvalidParameterError.md) - [InvalidProofError](doc//InvalidProofError.md) - [IssuanceConfigDto](doc//IssuanceConfigDto.md) +- [IssuanceConfigDtoCredentialSupportedInner](doc//IssuanceConfigDtoCredentialSupportedInner.md) - [IssuanceConfigListResponse](doc//IssuanceConfigListResponse.md) - [IssuanceConfigMiniDto](doc//IssuanceConfigMiniDto.md) - [IssuanceStateResponse](doc//IssuanceStateResponse.md) @@ -121,6 +122,7 @@ All URIs are relative to _http://localhost_ - [StartIssuance400Response](doc//StartIssuance400Response.md) - [StartIssuanceInput](doc//StartIssuanceInput.md) - [StartIssuanceInputDataInner](doc//StartIssuanceInputDataInner.md) +- [StartIssuanceInputDataInnerMetaData](doc//StartIssuanceInputDataInnerMetaData.md) - [StartIssuanceResponse](doc//StartIssuanceResponse.md) - [UpdateIssuanceConfigInput](doc//UpdateIssuanceConfigInput.md) - [VcClaimedError](doc//VcClaimedError.md) diff --git a/clients/dart/credential_issuance_client/doc/IssuanceConfigDto.md b/clients/dart/credential_issuance_client/doc/IssuanceConfigDto.md index d1331ee9..a63a2a6f 100644 --- a/clients/dart/credential_issuance_client/doc/IssuanceConfigDto.md +++ b/clients/dart/credential_issuance_client/doc/IssuanceConfigDto.md @@ -8,17 +8,17 @@ import 'package:affinidi_tdk_credential_issuance_client/api.dart'; ## Properties -| Name | Type | Description | Notes | -| --------------------------- | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -| **id** | **String** | | [optional] | -| **issuerDid** | **String** | Issuer DID | [optional] | -| **issuerWalletId** | **String** | Issuer Wallet id | [optional] | -| **credentialOfferDuration** | **int** | credential offer duration in second | [optional] | -| **cNonceDuration** | **int** | c_nonce duration in second | [optional] | -| **format** | **String** | String identifying the format of this Credential, i.e., jwt_vc_json-ld or ldp_vc. Depending on the format value, the object contains further elements defining the type | [optional] | -| **issuerUri** | **String** | Issuer URI | [optional] | -| **credentialSupported** | [**List**](CreateIssuanceConfigInputCredentialSupportedInner.md) | | [optional] [default to const []] | -| **issuerMetadata** | [**Map**](Object.md) | Issuer public information wallet may want to show to user during consent confirmation | [optional] [default to const {}] | -| **version** | **int** | | [optional] | +| Name | Type | Description | Notes | +| --------------------------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | +| **id** | **String** | | [optional] | +| **issuerDid** | **String** | Issuer DID | [optional] | +| **issuerWalletId** | **String** | Issuer Wallet id | [optional] | +| **credentialOfferDuration** | **int** | credential offer duration in second | [optional] | +| **cNonceDuration** | **int** | c_nonce duration in second | [optional] | +| **format** | **String** | String identifying the format of this Credential, i.e., jwt_vc_json-ld or ldp_vc. Depending on the format value, the object contains further elements defining the type | [optional] | +| **issuerUri** | **String** | Issuer URI | [optional] | +| **credentialSupported** | [**List**](IssuanceConfigDtoCredentialSupportedInner.md) | | [optional] [default to const []] | +| **issuerMetadata** | [**Map**](Object.md) | Issuer public information wallet may want to show to user during consent confirmation | [optional] [default to const {}] | +| **version** | **int** | | [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) diff --git a/clients/dart/credential_issuance_client/doc/IssuanceConfigDtoCredentialSupportedInner.md b/clients/dart/credential_issuance_client/doc/IssuanceConfigDtoCredentialSupportedInner.md new file mode 100644 index 00000000..8a08a255 --- /dev/null +++ b/clients/dart/credential_issuance_client/doc/IssuanceConfigDtoCredentialSupportedInner.md @@ -0,0 +1,17 @@ +# affinidi_tdk_credential_issuance_client.model.IssuanceConfigDtoCredentialSupportedInner + +## Load the model package + +```dart +import 'package:affinidi_tdk_credential_issuance_client/api.dart'; +``` + +## Properties + +| Name | Type | Description | Notes | +| -------------------- | ---------- | --------------------------------------------------------------------------------- | ----- | +| **credentialTypeId** | **String** | It is a String that identifies a Credential that is being requested to be issued. | +| **jsonSchemaUrl** | **String** | credential jsonLdContextUrl | +| **jsonLdContextUrl** | **String** | credential jsonSchemaUrl | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/dart/credential_issuance_client/doc/StartIssuanceInputDataInner.md b/clients/dart/credential_issuance_client/doc/StartIssuanceInputDataInner.md index d9d1180e..330173fd 100644 --- a/clients/dart/credential_issuance_client/doc/StartIssuanceInputDataInner.md +++ b/clients/dart/credential_issuance_client/doc/StartIssuanceInputDataInner.md @@ -8,9 +8,10 @@ import 'package:affinidi_tdk_credential_issuance_client/api.dart'; ## Properties -| Name | Type | Description | Notes | -| -------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------- | --------------------- | -| **credentialTypeId** | **String** | It is a String that identifies a Credential that is being requested to be issued. | -| **credentialData** | [**Map**](Object.md) | Object of data to be included in the issued credential ,should match the credential type | [default to const {}] | +| Name | Type | Description | Notes | +| -------------------- | --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | --------------------- | +| **credentialTypeId** | **String** | It is a String that identifies a Credential that is being requested to be issued. | +| **credentialData** | [**Map**](Object.md) | Object of data to be included in the issued credential ,should match the credential type | [default to const {}] | +| **metaData** | [**StartIssuanceInputDataInnerMetaData**](StartIssuanceInputDataInnerMetaData.md) | | [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) diff --git a/clients/dart/credential_issuance_client/doc/StartIssuanceInputDataInnerMetaData.md b/clients/dart/credential_issuance_client/doc/StartIssuanceInputDataInnerMetaData.md new file mode 100644 index 00000000..34e4dc9e --- /dev/null +++ b/clients/dart/credential_issuance_client/doc/StartIssuanceInputDataInnerMetaData.md @@ -0,0 +1,15 @@ +# affinidi_tdk_credential_issuance_client.model.StartIssuanceInputDataInnerMetaData + +## Load the model package + +```dart +import 'package:affinidi_tdk_credential_issuance_client/api.dart'; +``` + +## Properties + +| Name | Type | Description | Notes | +| ------------------ | --------------------------- | --------------------------------------------- | ----- | +| **expirationDate** | [**DateTime**](DateTime.md) | Date and time when the credential will expire | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/dart/credential_issuance_client/doc/WellKnownOpenIdCredentialIssuerResponse.md b/clients/dart/credential_issuance_client/doc/WellKnownOpenIdCredentialIssuerResponse.md index 85e9f9f8..cf88b72a 100644 --- a/clients/dart/credential_issuance_client/doc/WellKnownOpenIdCredentialIssuerResponse.md +++ b/clients/dart/credential_issuance_client/doc/WellKnownOpenIdCredentialIssuerResponse.md @@ -8,17 +8,17 @@ import 'package:affinidi_tdk_credential_issuance_client/api.dart'; ## Properties -| Name | Type | Description | Notes | -| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ----------- | -------------------------------- | -| **authorizationEndpoint** | **String** | | [optional] | -| **credentialEndpoint** | **String** | | [optional] | -| **credentialIssuer** | **String** | | [optional] | -| **credentialsSupported** | [**List**](CreateIssuanceConfigInputCredentialSupportedInner.md) | | [optional] [default to const []] | -| **deferredCredentialEndpoint** | **String** | | [optional] | -| **grantTypesSupported** | **List** | | [optional] [default to const []] | -| **jwksUri** | **String** | | [optional] | -| **scopesSupported** | **List** | | [optional] [default to const []] | -| **tokenEndpoint** | **String** | | [optional] | -| **tokenEndpointAuthMethodsSupported** | **List** | | [optional] [default to const []] | +| Name | Type | Description | Notes | +| ------------------------------------- | --------------------------------------------------------------------------------------------------- | ----------- | -------------------------------- | +| **authorizationEndpoint** | **String** | | [optional] | +| **credentialEndpoint** | **String** | | [optional] | +| **credentialIssuer** | **String** | | [optional] | +| **credentialsSupported** | [**List**](IssuanceConfigDtoCredentialSupportedInner.md) | | [optional] [default to const []] | +| **deferredCredentialEndpoint** | **String** | | [optional] | +| **grantTypesSupported** | **List** | | [optional] [default to const []] | +| **jwksUri** | **String** | | [optional] | +| **scopesSupported** | **List** | | [optional] [default to const []] | +| **tokenEndpoint** | **String** | | [optional] | +| **tokenEndpointAuthMethodsSupported** | **List** | | [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) diff --git a/clients/dart/credential_issuance_client/lib/api.dart b/clients/dart/credential_issuance_client/lib/api.dart index 1d11e5be..10347453 100644 --- a/clients/dart/credential_issuance_client/lib/api.dart +++ b/clients/dart/credential_issuance_client/lib/api.dart @@ -64,6 +64,7 @@ part 'model/invalid_jwt_token_error.dart'; part 'model/invalid_parameter_error.dart'; part 'model/invalid_proof_error.dart'; part 'model/issuance_config_dto.dart'; +part 'model/issuance_config_dto_credential_supported_inner.dart'; part 'model/issuance_config_list_response.dart'; part 'model/issuance_config_mini_dto.dart'; part 'model/issuance_state_response.dart'; @@ -74,6 +75,7 @@ part 'model/project_credential_config_not_exist_error.dart'; part 'model/start_issuance400_response.dart'; part 'model/start_issuance_input.dart'; part 'model/start_issuance_input_data_inner.dart'; +part 'model/start_issuance_input_data_inner_meta_data.dart'; part 'model/start_issuance_response.dart'; part 'model/update_issuance_config_input.dart'; part 'model/vc_claimed_error.dart'; diff --git a/clients/dart/credential_issuance_client/lib/api_client.dart b/clients/dart/credential_issuance_client/lib/api_client.dart index f2bef7ad..4eb0f29b 100644 --- a/clients/dart/credential_issuance_client/lib/api_client.dart +++ b/clients/dart/credential_issuance_client/lib/api_client.dart @@ -242,6 +242,8 @@ class ApiClient { return InvalidProofError.fromJson(value); case 'IssuanceConfigDto': return IssuanceConfigDto.fromJson(value); + case 'IssuanceConfigDtoCredentialSupportedInner': + return IssuanceConfigDtoCredentialSupportedInner.fromJson(value); case 'IssuanceConfigListResponse': return IssuanceConfigListResponse.fromJson(value); case 'IssuanceConfigMiniDto': @@ -262,6 +264,8 @@ class ApiClient { return StartIssuanceInput.fromJson(value); case 'StartIssuanceInputDataInner': return StartIssuanceInputDataInner.fromJson(value); + case 'StartIssuanceInputDataInnerMetaData': + return StartIssuanceInputDataInnerMetaData.fromJson(value); case 'StartIssuanceResponse': return StartIssuanceResponse.fromJson(value); case 'UpdateIssuanceConfigInput': diff --git a/clients/dart/credential_issuance_client/lib/model/create_issuance_config_input.dart b/clients/dart/credential_issuance_client/lib/model/create_issuance_config_input.dart index 17585711..7b1c9e8e 100644 --- a/clients/dart/credential_issuance_client/lib/model/create_issuance_config_input.dart +++ b/clients/dart/credential_issuance_client/lib/model/create_issuance_config_input.dart @@ -25,6 +25,9 @@ class CreateIssuanceConfigInput { /// credential offer duration in second /// + /// Minimum value: 1 + /// Maximum value: 604801 + /// /// 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. diff --git a/clients/dart/credential_issuance_client/lib/model/issuance_config_dto.dart b/clients/dart/credential_issuance_client/lib/model/issuance_config_dto.dart index 0368417e..c7dbc2a0 100644 --- a/clients/dart/credential_issuance_client/lib/model/issuance_config_dto.dart +++ b/clients/dart/credential_issuance_client/lib/model/issuance_config_dto.dart @@ -81,7 +81,7 @@ class IssuanceConfigDto { /// String? issuerUri; - List credentialSupported; + List credentialSupported; /// Issuer public information wallet may want to show to user during consent confirmation Map issuerMetadata; @@ -197,7 +197,7 @@ class IssuanceConfigDto { cNonceDuration: mapValueOfType(json, r'cNonceDuration'), format: IssuanceConfigDtoFormatEnum.fromJson(json[r'format']), issuerUri: mapValueOfType(json, r'issuerUri'), - credentialSupported: CreateIssuanceConfigInputCredentialSupportedInner.listFromJson(json[r'credentialSupported']), + credentialSupported: IssuanceConfigDtoCredentialSupportedInner.listFromJson(json[r'credentialSupported']), issuerMetadata: mapCastOfType(json, r'issuerMetadata') ?? const {}, version: mapValueOfType(json, r'version'), ); diff --git a/clients/dart/credential_issuance_client/lib/model/issuance_config_dto_credential_supported_inner.dart b/clients/dart/credential_issuance_client/lib/model/issuance_config_dto_credential_supported_inner.dart new file mode 100644 index 00000000..f4149a58 --- /dev/null +++ b/clients/dart/credential_issuance_client/lib/model/issuance_config_dto_credential_supported_inner.dart @@ -0,0 +1,128 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class IssuanceConfigDtoCredentialSupportedInner { + /// Returns a new [IssuanceConfigDtoCredentialSupportedInner] instance. + IssuanceConfigDtoCredentialSupportedInner({ + required this.credentialTypeId, + required this.jsonSchemaUrl, + required this.jsonLdContextUrl, + }); + + /// It is a String that identifies a Credential that is being requested to be issued. + String credentialTypeId; + + /// credential jsonLdContextUrl + String jsonSchemaUrl; + + /// credential jsonSchemaUrl + String jsonLdContextUrl; + + @override + bool operator ==(Object other) => identical(this, other) || other is IssuanceConfigDtoCredentialSupportedInner && + other.credentialTypeId == credentialTypeId && + other.jsonSchemaUrl == jsonSchemaUrl && + other.jsonLdContextUrl == jsonLdContextUrl; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (credentialTypeId.hashCode) + + (jsonSchemaUrl.hashCode) + + (jsonLdContextUrl.hashCode); + + @override + String toString() => 'IssuanceConfigDtoCredentialSupportedInner[credentialTypeId=$credentialTypeId, jsonSchemaUrl=$jsonSchemaUrl, jsonLdContextUrl=$jsonLdContextUrl]'; + + Map toJson() { + final json = {}; + json[r'credentialTypeId'] = this.credentialTypeId; + json[r'jsonSchemaUrl'] = this.jsonSchemaUrl; + json[r'jsonLdContextUrl'] = this.jsonLdContextUrl; + return json; + } + + /// Returns a new [IssuanceConfigDtoCredentialSupportedInner] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static IssuanceConfigDtoCredentialSupportedInner? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "IssuanceConfigDtoCredentialSupportedInner[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "IssuanceConfigDtoCredentialSupportedInner[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return IssuanceConfigDtoCredentialSupportedInner( + credentialTypeId: mapValueOfType(json, r'credentialTypeId')!, + jsonSchemaUrl: mapValueOfType(json, r'jsonSchemaUrl')!, + jsonLdContextUrl: mapValueOfType(json, r'jsonLdContextUrl')!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = IssuanceConfigDtoCredentialSupportedInner.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = IssuanceConfigDtoCredentialSupportedInner.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of IssuanceConfigDtoCredentialSupportedInner-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = IssuanceConfigDtoCredentialSupportedInner.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'credentialTypeId', + 'jsonSchemaUrl', + 'jsonLdContextUrl', + }; +} + diff --git a/clients/dart/credential_issuance_client/lib/model/start_issuance_input_data_inner.dart b/clients/dart/credential_issuance_client/lib/model/start_issuance_input_data_inner.dart index 590df30a..e81163a3 100644 --- a/clients/dart/credential_issuance_client/lib/model/start_issuance_input_data_inner.dart +++ b/clients/dart/credential_issuance_client/lib/model/start_issuance_input_data_inner.dart @@ -15,6 +15,7 @@ class StartIssuanceInputDataInner { StartIssuanceInputDataInner({ required this.credentialTypeId, this.credentialData = const {}, + this.metaData, }); /// It is a String that identifies a Credential that is being requested to be issued. @@ -23,24 +24,39 @@ class StartIssuanceInputDataInner { /// Object of data to be included in the issued credential ,should match the credential type Map credentialData; + /// + /// 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. + /// + StartIssuanceInputDataInnerMetaData? metaData; + @override bool operator ==(Object other) => identical(this, other) || other is StartIssuanceInputDataInner && other.credentialTypeId == credentialTypeId && - _deepEquality.equals(other.credentialData, credentialData); + _deepEquality.equals(other.credentialData, credentialData) && + other.metaData == metaData; @override int get hashCode => // ignore: unnecessary_parenthesis (credentialTypeId.hashCode) + - (credentialData.hashCode); + (credentialData.hashCode) + + (metaData == null ? 0 : metaData!.hashCode); @override - String toString() => 'StartIssuanceInputDataInner[credentialTypeId=$credentialTypeId, credentialData=$credentialData]'; + String toString() => 'StartIssuanceInputDataInner[credentialTypeId=$credentialTypeId, credentialData=$credentialData, metaData=$metaData]'; Map toJson() { final json = {}; json[r'credentialTypeId'] = this.credentialTypeId; json[r'credentialData'] = this.credentialData; + if (this.metaData != null) { + json[r'metaData'] = this.metaData; + } else { + json[r'metaData'] = null; + } return json; } @@ -65,6 +81,7 @@ class StartIssuanceInputDataInner { return StartIssuanceInputDataInner( credentialTypeId: mapValueOfType(json, r'credentialTypeId')!, credentialData: mapCastOfType(json, r'credentialData')!, + metaData: StartIssuanceInputDataInnerMetaData.fromJson(json[r'metaData']), ); } return null; diff --git a/clients/dart/credential_issuance_client/lib/model/start_issuance_input_data_inner_meta_data.dart b/clients/dart/credential_issuance_client/lib/model/start_issuance_input_data_inner_meta_data.dart new file mode 100644 index 00000000..163d9ce9 --- /dev/null +++ b/clients/dart/credential_issuance_client/lib/model/start_issuance_input_data_inner_meta_data.dart @@ -0,0 +1,110 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StartIssuanceInputDataInnerMetaData { + /// Returns a new [StartIssuanceInputDataInnerMetaData] instance. + StartIssuanceInputDataInnerMetaData({ + required this.expirationDate, + }); + + /// Date and time when the credential will expire + DateTime expirationDate; + + @override + bool operator ==(Object other) => identical(this, other) || other is StartIssuanceInputDataInnerMetaData && + other.expirationDate == expirationDate; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (expirationDate.hashCode); + + @override + String toString() => 'StartIssuanceInputDataInnerMetaData[expirationDate=$expirationDate]'; + + Map toJson() { + final json = {}; + json[r'expirationDate'] = this.expirationDate.toUtc().toIso8601String(); + return json; + } + + /// Returns a new [StartIssuanceInputDataInnerMetaData] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StartIssuanceInputDataInnerMetaData? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StartIssuanceInputDataInnerMetaData[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StartIssuanceInputDataInnerMetaData[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StartIssuanceInputDataInnerMetaData( + expirationDate: mapDateTime(json, r'expirationDate', r'')!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StartIssuanceInputDataInnerMetaData.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StartIssuanceInputDataInnerMetaData.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StartIssuanceInputDataInnerMetaData-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StartIssuanceInputDataInnerMetaData.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'expirationDate', + }; +} + diff --git a/clients/dart/credential_issuance_client/lib/model/update_issuance_config_input.dart b/clients/dart/credential_issuance_client/lib/model/update_issuance_config_input.dart index f7fdd4c1..b7638c6a 100644 --- a/clients/dart/credential_issuance_client/lib/model/update_issuance_config_input.dart +++ b/clients/dart/credential_issuance_client/lib/model/update_issuance_config_input.dart @@ -32,6 +32,9 @@ class UpdateIssuanceConfigInput { /// credential offer duration in second /// + /// Minimum value: 1 + /// Maximum value: 604801 + /// /// 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. diff --git a/clients/dart/credential_issuance_client/lib/model/well_known_open_id_credential_issuer_response.dart b/clients/dart/credential_issuance_client/lib/model/well_known_open_id_credential_issuer_response.dart index db08ec0f..8f8236e1 100644 --- a/clients/dart/credential_issuance_client/lib/model/well_known_open_id_credential_issuer_response.dart +++ b/clients/dart/credential_issuance_client/lib/model/well_known_open_id_credential_issuer_response.dart @@ -49,7 +49,7 @@ class WellKnownOpenIdCredentialIssuerResponse { /// String? credentialIssuer; - List credentialsSupported; + List credentialsSupported; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -172,7 +172,7 @@ class WellKnownOpenIdCredentialIssuerResponse { authorizationEndpoint: mapValueOfType(json, r'authorization_endpoint'), credentialEndpoint: mapValueOfType(json, r'credential_endpoint'), credentialIssuer: mapValueOfType(json, r'credential_issuer'), - credentialsSupported: CreateIssuanceConfigInputCredentialSupportedInner.listFromJson(json[r'credentials_supported']), + credentialsSupported: IssuanceConfigDtoCredentialSupportedInner.listFromJson(json[r'credentials_supported']), deferredCredentialEndpoint: mapValueOfType(json, r'deferred_credential_endpoint'), grantTypesSupported: WellKnownOpenIdCredentialIssuerResponseGrantTypesSupportedEnum.listFromJson(json[r'grant_types_supported']), jwksUri: mapValueOfType(json, r'jwks_uri'), diff --git a/clients/dart/credential_issuance_client/test/issuance_config_dto_credential_supported_inner_test.dart b/clients/dart/credential_issuance_client/test/issuance_config_dto_credential_supported_inner_test.dart new file mode 100644 index 00000000..a163117e --- /dev/null +++ b/clients/dart/credential_issuance_client/test/issuance_config_dto_credential_supported_inner_test.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:affinidi_tdk_credential_issuance_client/api.dart'; +import 'package:test/test.dart'; + +// tests for IssuanceConfigDtoCredentialSupportedInner +void main() { + // final instance = IssuanceConfigDtoCredentialSupportedInner(); + + group('test IssuanceConfigDtoCredentialSupportedInner', () { + // It is a String that identifies a Credential that is being requested to be issued. + // String credentialTypeId + test('to test the property `credentialTypeId`', () async { + // TODO + }); + + // credential jsonLdContextUrl + // String jsonSchemaUrl + test('to test the property `jsonSchemaUrl`', () async { + // TODO + }); + + // credential jsonSchemaUrl + // String jsonLdContextUrl + test('to test the property `jsonLdContextUrl`', () async { + // TODO + }); + + + }); + +} diff --git a/clients/dart/credential_issuance_client/test/start_issuance_input_data_inner_meta_data_test.dart b/clients/dart/credential_issuance_client/test/start_issuance_input_data_inner_meta_data_test.dart new file mode 100644 index 00000000..3c379ba6 --- /dev/null +++ b/clients/dart/credential_issuance_client/test/start_issuance_input_data_inner_meta_data_test.dart @@ -0,0 +1,28 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:affinidi_tdk_credential_issuance_client/api.dart'; +import 'package:test/test.dart'; + +// tests for StartIssuanceInputDataInnerMetaData +void main() { + // final instance = StartIssuanceInputDataInnerMetaData(); + + group('test StartIssuanceInputDataInnerMetaData', () { + // Date and time when the credential will expire + // DateTime expirationDate + test('to test the property `expirationDate`', () async { + // TODO + }); + + + }); + +} diff --git a/clients/dart/credential_verification_client/.openapi-generator/FILES b/clients/dart/credential_verification_client/.openapi-generator/FILES index e91c78cd..002bc63a 100644 --- a/clients/dart/credential_verification_client/.openapi-generator/FILES +++ b/clients/dart/credential_verification_client/.openapi-generator/FILES @@ -31,7 +31,6 @@ doc/PresentationSubmission.md doc/SubmissionRequirement.md doc/ValidateJwtInput.md doc/ValidateJwtOutput.md -doc/VerifierApi.md doc/VerifyCredentialInput.md doc/VerifyCredentialOutput.md doc/VerifyPresentationInput.md @@ -48,7 +47,6 @@ doc/W3cPresentationContextOneOfInner.md doc/W3cProof.md lib/api.dart lib/api/default_api.dart -lib/api/verifier_api.dart lib/api_client.dart lib/api_exception.dart lib/api_helper.dart diff --git a/clients/dart/credential_verification_client/README.md b/clients/dart/credential_verification_client/README.md index 81a6169f..61add95b 100644 --- a/clients/dart/credential_verification_client/README.md +++ b/clients/dart/credential_verification_client/README.md @@ -65,11 +65,10 @@ try { All URIs are relative to _http://localhost_ -| Class | Method | HTTP request | Description | -| ------------- | --------------------------------------------------------------- | ---------------------------------- | ------------------- | -| _DefaultApi_ | [**verifyCredentials**](doc//DefaultApi.md#verifycredentials) | **POST** /v1/verifier/verify-vcs | Verifying VC | -| _DefaultApi_ | [**verifyPresentation**](doc//DefaultApi.md#verifypresentation) | **POST** /v1/verifier/verify-vp | Verifying VP | -| _VerifierApi_ | [**validateJwt**](doc//VerifierApi.md#validatejwt) | **POST** /v1/verifier/validate-jwt | Validates JWT token | +| Class | Method | HTTP request | Description | +| ------------ | --------------------------------------------------------------- | -------------------------------- | ------------ | +| _DefaultApi_ | [**verifyCredentials**](doc//DefaultApi.md#verifycredentials) | **POST** /v1/verifier/verify-vcs | Verifying VC | +| _DefaultApi_ | [**verifyPresentation**](doc//DefaultApi.md#verifypresentation) | **POST** /v1/verifier/verify-vp | Verifying VP | ## Documentation For Models diff --git a/clients/dart/credential_verification_client/lib/api.dart b/clients/dart/credential_verification_client/lib/api.dart index 750e61fb..b96a3523 100644 --- a/clients/dart/credential_verification_client/lib/api.dart +++ b/clients/dart/credential_verification_client/lib/api.dart @@ -29,7 +29,6 @@ part 'auth/http_basic_auth.dart'; part 'auth/http_bearer_auth.dart'; part 'api/default_api.dart'; -part 'api/verifier_api.dart'; part 'model/constraints.dart'; part 'model/constraints_statuses.dart'; diff --git a/clients/dart/iam_client/.openapi-generator/FILES b/clients/dart/iam_client/.openapi-generator/FILES index b0854a5f..1e6a52fa 100644 --- a/clients/dart/iam_client/.openapi-generator/FILES +++ b/clients/dart/iam_client/.openapi-generator/FILES @@ -104,4 +104,3 @@ lib/model/user_dto.dart lib/model/user_list.dart lib/model/whoami_dto.dart pubspec.yaml -test/principal_cannot_be_deleted_error_test.dart diff --git a/clients/dart/iota_client/.openapi-generator/FILES b/clients/dart/iota_client/.openapi-generator/FILES index e13f918c..513053e3 100644 --- a/clients/dart/iota_client/.openapi-generator/FILES +++ b/clients/dart/iota_client/.openapi-generator/FILES @@ -82,4 +82,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/cors_iot_oidc4vpcallback_ok_test.dart diff --git a/clients/dart/iota_client/lib/model/create_iota_configuration_input.dart b/clients/dart/iota_client/lib/model/create_iota_configuration_input.dart index eceb19e3..594831c7 100644 --- a/clients/dart/iota_client/lib/model/create_iota_configuration_input.dart +++ b/clients/dart/iota_client/lib/model/create_iota_configuration_input.dart @@ -43,6 +43,8 @@ class CreateIotaConfigurationInput { /// token time to live in seconds /// + /// Minimum value: 1 + /// /// 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. diff --git a/clients/dart/wallets_client/.openapi-generator/FILES b/clients/dart/wallets_client/.openapi-generator/FILES index f383470c..63cb87be 100644 --- a/clients/dart/wallets_client/.openapi-generator/FILES +++ b/clients/dart/wallets_client/.openapi-generator/FILES @@ -19,11 +19,13 @@ doc/RevocationApi.md doc/RevokeCredentialInput.md doc/ServiceErrorResponse.md doc/ServiceErrorResponseDetailsInner.md +doc/SignCredential400Response.md doc/SignCredentialInputDto.md doc/SignCredentialInputDtoUnsignedCredentialParams.md doc/SignCredentialResultDto.md doc/SignJwtToken.md doc/SignJwtTokenOK.md +doc/SigningFailedError.md doc/UpdateWalletInput.md doc/WalletApi.md doc/WalletDto.md @@ -56,15 +58,17 @@ lib/model/operation_forbidden_error.dart lib/model/revoke_credential_input.dart lib/model/service_error_response.dart lib/model/service_error_response_details_inner.dart +lib/model/sign_credential400_response.dart lib/model/sign_credential_input_dto.dart lib/model/sign_credential_input_dto_unsigned_credential_params.dart lib/model/sign_credential_result_dto.dart lib/model/sign_jwt_token.dart lib/model/sign_jwt_token_ok.dart +lib/model/signing_failed_error.dart lib/model/update_wallet_input.dart lib/model/wallet_dto.dart lib/model/wallet_dto_keys_inner.dart lib/model/wallets_list_dto.dart pubspec.yaml -test/default_api_test.dart -test/get_revocation_credential_status_ok_test.dart +test/sign_credential400_response_test.dart +test/signing_failed_error_test.dart diff --git a/clients/dart/wallets_client/README.md b/clients/dart/wallets_client/README.md index aabfca81..7b12b6e6 100644 --- a/clients/dart/wallets_client/README.md +++ b/clients/dart/wallets_client/README.md @@ -97,11 +97,13 @@ All URIs are relative to _http://localhost_ - [RevokeCredentialInput](doc//RevokeCredentialInput.md) - [ServiceErrorResponse](doc//ServiceErrorResponse.md) - [ServiceErrorResponseDetailsInner](doc//ServiceErrorResponseDetailsInner.md) +- [SignCredential400Response](doc//SignCredential400Response.md) - [SignCredentialInputDto](doc//SignCredentialInputDto.md) - [SignCredentialInputDtoUnsignedCredentialParams](doc//SignCredentialInputDtoUnsignedCredentialParams.md) - [SignCredentialResultDto](doc//SignCredentialResultDto.md) - [SignJwtToken](doc//SignJwtToken.md) - [SignJwtTokenOK](doc//SignJwtTokenOK.md) +- [SigningFailedError](doc//SigningFailedError.md) - [UpdateWalletInput](doc//UpdateWalletInput.md) - [WalletDto](doc//WalletDto.md) - [WalletDtoKeysInner](doc//WalletDtoKeysInner.md) diff --git a/clients/dart/wallets_client/doc/SignCredential400Response.md b/clients/dart/wallets_client/doc/SignCredential400Response.md new file mode 100644 index 00000000..bf4810e6 --- /dev/null +++ b/clients/dart/wallets_client/doc/SignCredential400Response.md @@ -0,0 +1,19 @@ +# affinidi_tdk_wallets_client.model.SignCredential400Response + +## Load the model package + +```dart +import 'package:affinidi_tdk_wallets_client/api.dart'; +``` + +## Properties + +| Name | Type | Description | Notes | +| ------------------ | --------------------------------------------------------------------------------- | ----------- | -------------------------------- | +| **name** | **String** | | +| **message** | **String** | | +| **httpStatusCode** | **int** | | +| **traceId** | **String** | | +| **details** | [**List**](ServiceErrorResponseDetailsInner.md) | | [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) diff --git a/clients/dart/wallets_client/doc/SigningFailedError.md b/clients/dart/wallets_client/doc/SigningFailedError.md new file mode 100644 index 00000000..5ddc4e89 --- /dev/null +++ b/clients/dart/wallets_client/doc/SigningFailedError.md @@ -0,0 +1,19 @@ +# affinidi_tdk_wallets_client.model.SigningFailedError + +## Load the model package + +```dart +import 'package:affinidi_tdk_wallets_client/api.dart'; +``` + +## Properties + +| Name | Type | Description | Notes | +| ------------------ | --------------------------------------------------------------------------------- | ----------- | -------------------------------- | +| **name** | **String** | | +| **message** | **String** | | +| **httpStatusCode** | **int** | | +| **traceId** | **String** | | +| **details** | [**List**](ServiceErrorResponseDetailsInner.md) | | [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) diff --git a/clients/dart/wallets_client/lib/api.dart b/clients/dart/wallets_client/lib/api.dart index 9bdd59bf..03b6c43d 100644 --- a/clients/dart/wallets_client/lib/api.dart +++ b/clients/dart/wallets_client/lib/api.dart @@ -47,11 +47,13 @@ part 'model/operation_forbidden_error.dart'; part 'model/revoke_credential_input.dart'; part 'model/service_error_response.dart'; part 'model/service_error_response_details_inner.dart'; +part 'model/sign_credential400_response.dart'; part 'model/sign_credential_input_dto.dart'; part 'model/sign_credential_input_dto_unsigned_credential_params.dart'; part 'model/sign_credential_result_dto.dart'; part 'model/sign_jwt_token.dart'; part 'model/sign_jwt_token_ok.dart'; +part 'model/signing_failed_error.dart'; part 'model/update_wallet_input.dart'; part 'model/wallet_dto.dart'; part 'model/wallet_dto_keys_inner.dart'; diff --git a/clients/dart/wallets_client/lib/api_client.dart b/clients/dart/wallets_client/lib/api_client.dart index 384b5a40..1ae0d2ba 100644 --- a/clients/dart/wallets_client/lib/api_client.dart +++ b/clients/dart/wallets_client/lib/api_client.dart @@ -212,6 +212,8 @@ class ApiClient { return ServiceErrorResponse.fromJson(value); case 'ServiceErrorResponseDetailsInner': return ServiceErrorResponseDetailsInner.fromJson(value); + case 'SignCredential400Response': + return SignCredential400Response.fromJson(value); case 'SignCredentialInputDto': return SignCredentialInputDto.fromJson(value); case 'SignCredentialInputDtoUnsignedCredentialParams': @@ -222,6 +224,8 @@ class ApiClient { return SignJwtToken.fromJson(value); case 'SignJwtTokenOK': return SignJwtTokenOK.fromJson(value); + case 'SigningFailedError': + return SigningFailedError.fromJson(value); case 'UpdateWalletInput': return UpdateWalletInput.fromJson(value); case 'WalletDto': diff --git a/clients/dart/wallets_client/lib/model/sign_credential400_response.dart b/clients/dart/wallets_client/lib/model/sign_credential400_response.dart new file mode 100644 index 00000000..8c55d798 --- /dev/null +++ b/clients/dart/wallets_client/lib/model/sign_credential400_response.dart @@ -0,0 +1,353 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SignCredential400Response { + /// Returns a new [SignCredential400Response] instance. + SignCredential400Response({ + required this.name, + required this.message, + required this.httpStatusCode, + required this.traceId, + this.details = const [], + }); + + SignCredential400ResponseNameEnum name; + + SignCredential400ResponseMessageEnum message; + + SignCredential400ResponseHttpStatusCodeEnum httpStatusCode; + + String traceId; + + List details; + + @override + bool operator ==(Object other) => identical(this, other) || other is SignCredential400Response && + other.name == name && + other.message == message && + other.httpStatusCode == httpStatusCode && + other.traceId == traceId && + _deepEquality.equals(other.details, details); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (name.hashCode) + + (message.hashCode) + + (httpStatusCode.hashCode) + + (traceId.hashCode) + + (details.hashCode); + + @override + String toString() => 'SignCredential400Response[name=$name, message=$message, httpStatusCode=$httpStatusCode, traceId=$traceId, details=$details]'; + + Map toJson() { + final json = {}; + json[r'name'] = this.name; + json[r'message'] = this.message; + json[r'httpStatusCode'] = this.httpStatusCode; + json[r'traceId'] = this.traceId; + json[r'details'] = this.details; + return json; + } + + /// Returns a new [SignCredential400Response] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SignCredential400Response? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "SignCredential400Response[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SignCredential400Response[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SignCredential400Response( + name: SignCredential400ResponseNameEnum.fromJson(json[r'name'])!, + message: SignCredential400ResponseMessageEnum.fromJson(json[r'message'])!, + httpStatusCode: SignCredential400ResponseHttpStatusCodeEnum.fromJson(json[r'httpStatusCode'])!, + traceId: mapValueOfType(json, r'traceId')!, + details: ServiceErrorResponseDetailsInner.listFromJson(json[r'details']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SignCredential400Response.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SignCredential400Response.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SignCredential400Response-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SignCredential400Response.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'name', + 'message', + 'httpStatusCode', + 'traceId', + }; +} + + +class SignCredential400ResponseNameEnum { + /// Instantiate a new enum with the provided [value]. + const SignCredential400ResponseNameEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const signingFailedError = SignCredential400ResponseNameEnum._(r'SigningFailedError'); + + /// List of all possible values in this [enum][SignCredential400ResponseNameEnum]. + static const values = [ + signingFailedError, + ]; + + static SignCredential400ResponseNameEnum? fromJson(dynamic value) => SignCredential400ResponseNameEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SignCredential400ResponseNameEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [SignCredential400ResponseNameEnum] to String, +/// and [decode] dynamic data back to [SignCredential400ResponseNameEnum]. +class SignCredential400ResponseNameEnumTypeTransformer { + factory SignCredential400ResponseNameEnumTypeTransformer() => _instance ??= const SignCredential400ResponseNameEnumTypeTransformer._(); + + const SignCredential400ResponseNameEnumTypeTransformer._(); + + String encode(SignCredential400ResponseNameEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a SignCredential400ResponseNameEnum. + /// + /// 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. + SignCredential400ResponseNameEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'SigningFailedError': return SignCredential400ResponseNameEnum.signingFailedError; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [SignCredential400ResponseNameEnumTypeTransformer] instance. + static SignCredential400ResponseNameEnumTypeTransformer? _instance; +} + + + +class SignCredential400ResponseMessageEnum { + /// Instantiate a new enum with the provided [value]. + const SignCredential400ResponseMessageEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const signingFailedPeriod = SignCredential400ResponseMessageEnum._(r'Signing failed.'); + + /// List of all possible values in this [enum][SignCredential400ResponseMessageEnum]. + static const values = [ + signingFailedPeriod, + ]; + + static SignCredential400ResponseMessageEnum? fromJson(dynamic value) => SignCredential400ResponseMessageEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SignCredential400ResponseMessageEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [SignCredential400ResponseMessageEnum] to String, +/// and [decode] dynamic data back to [SignCredential400ResponseMessageEnum]. +class SignCredential400ResponseMessageEnumTypeTransformer { + factory SignCredential400ResponseMessageEnumTypeTransformer() => _instance ??= const SignCredential400ResponseMessageEnumTypeTransformer._(); + + const SignCredential400ResponseMessageEnumTypeTransformer._(); + + String encode(SignCredential400ResponseMessageEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a SignCredential400ResponseMessageEnum. + /// + /// 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. + SignCredential400ResponseMessageEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Signing failed.': return SignCredential400ResponseMessageEnum.signingFailedPeriod; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [SignCredential400ResponseMessageEnumTypeTransformer] instance. + static SignCredential400ResponseMessageEnumTypeTransformer? _instance; +} + + + +class SignCredential400ResponseHttpStatusCodeEnum { + /// Instantiate a new enum with the provided [value]. + const SignCredential400ResponseHttpStatusCodeEnum._(this.value); + + /// The underlying value of this enum member. + final int value; + + @override + String toString() => value.toString(); + + int toJson() => value; + + static const number400 = SignCredential400ResponseHttpStatusCodeEnum._(400); + + /// List of all possible values in this [enum][SignCredential400ResponseHttpStatusCodeEnum]. + static const values = [ + number400, + ]; + + static SignCredential400ResponseHttpStatusCodeEnum? fromJson(dynamic value) => SignCredential400ResponseHttpStatusCodeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SignCredential400ResponseHttpStatusCodeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [SignCredential400ResponseHttpStatusCodeEnum] to int, +/// and [decode] dynamic data back to [SignCredential400ResponseHttpStatusCodeEnum]. +class SignCredential400ResponseHttpStatusCodeEnumTypeTransformer { + factory SignCredential400ResponseHttpStatusCodeEnumTypeTransformer() => _instance ??= const SignCredential400ResponseHttpStatusCodeEnumTypeTransformer._(); + + const SignCredential400ResponseHttpStatusCodeEnumTypeTransformer._(); + + int encode(SignCredential400ResponseHttpStatusCodeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a SignCredential400ResponseHttpStatusCodeEnum. + /// + /// 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. + SignCredential400ResponseHttpStatusCodeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 400: return SignCredential400ResponseHttpStatusCodeEnum.number400; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [SignCredential400ResponseHttpStatusCodeEnumTypeTransformer] instance. + static SignCredential400ResponseHttpStatusCodeEnumTypeTransformer? _instance; +} + + diff --git a/clients/dart/wallets_client/lib/model/signing_failed_error.dart b/clients/dart/wallets_client/lib/model/signing_failed_error.dart new file mode 100644 index 00000000..9a242789 --- /dev/null +++ b/clients/dart/wallets_client/lib/model/signing_failed_error.dart @@ -0,0 +1,353 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SigningFailedError { + /// Returns a new [SigningFailedError] instance. + SigningFailedError({ + required this.name, + required this.message, + required this.httpStatusCode, + required this.traceId, + this.details = const [], + }); + + SigningFailedErrorNameEnum name; + + SigningFailedErrorMessageEnum message; + + SigningFailedErrorHttpStatusCodeEnum httpStatusCode; + + String traceId; + + List details; + + @override + bool operator ==(Object other) => identical(this, other) || other is SigningFailedError && + other.name == name && + other.message == message && + other.httpStatusCode == httpStatusCode && + other.traceId == traceId && + _deepEquality.equals(other.details, details); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (name.hashCode) + + (message.hashCode) + + (httpStatusCode.hashCode) + + (traceId.hashCode) + + (details.hashCode); + + @override + String toString() => 'SigningFailedError[name=$name, message=$message, httpStatusCode=$httpStatusCode, traceId=$traceId, details=$details]'; + + Map toJson() { + final json = {}; + json[r'name'] = this.name; + json[r'message'] = this.message; + json[r'httpStatusCode'] = this.httpStatusCode; + json[r'traceId'] = this.traceId; + json[r'details'] = this.details; + return json; + } + + /// Returns a new [SigningFailedError] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SigningFailedError? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "SigningFailedError[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SigningFailedError[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SigningFailedError( + name: SigningFailedErrorNameEnum.fromJson(json[r'name'])!, + message: SigningFailedErrorMessageEnum.fromJson(json[r'message'])!, + httpStatusCode: SigningFailedErrorHttpStatusCodeEnum.fromJson(json[r'httpStatusCode'])!, + traceId: mapValueOfType(json, r'traceId')!, + details: ServiceErrorResponseDetailsInner.listFromJson(json[r'details']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SigningFailedError.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SigningFailedError.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SigningFailedError-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SigningFailedError.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'name', + 'message', + 'httpStatusCode', + 'traceId', + }; +} + + +class SigningFailedErrorNameEnum { + /// Instantiate a new enum with the provided [value]. + const SigningFailedErrorNameEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const signingFailedError = SigningFailedErrorNameEnum._(r'SigningFailedError'); + + /// List of all possible values in this [enum][SigningFailedErrorNameEnum]. + static const values = [ + signingFailedError, + ]; + + static SigningFailedErrorNameEnum? fromJson(dynamic value) => SigningFailedErrorNameEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SigningFailedErrorNameEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [SigningFailedErrorNameEnum] to String, +/// and [decode] dynamic data back to [SigningFailedErrorNameEnum]. +class SigningFailedErrorNameEnumTypeTransformer { + factory SigningFailedErrorNameEnumTypeTransformer() => _instance ??= const SigningFailedErrorNameEnumTypeTransformer._(); + + const SigningFailedErrorNameEnumTypeTransformer._(); + + String encode(SigningFailedErrorNameEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a SigningFailedErrorNameEnum. + /// + /// 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. + SigningFailedErrorNameEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'SigningFailedError': return SigningFailedErrorNameEnum.signingFailedError; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [SigningFailedErrorNameEnumTypeTransformer] instance. + static SigningFailedErrorNameEnumTypeTransformer? _instance; +} + + + +class SigningFailedErrorMessageEnum { + /// Instantiate a new enum with the provided [value]. + const SigningFailedErrorMessageEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const signingFailedPeriod = SigningFailedErrorMessageEnum._(r'Signing failed.'); + + /// List of all possible values in this [enum][SigningFailedErrorMessageEnum]. + static const values = [ + signingFailedPeriod, + ]; + + static SigningFailedErrorMessageEnum? fromJson(dynamic value) => SigningFailedErrorMessageEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SigningFailedErrorMessageEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [SigningFailedErrorMessageEnum] to String, +/// and [decode] dynamic data back to [SigningFailedErrorMessageEnum]. +class SigningFailedErrorMessageEnumTypeTransformer { + factory SigningFailedErrorMessageEnumTypeTransformer() => _instance ??= const SigningFailedErrorMessageEnumTypeTransformer._(); + + const SigningFailedErrorMessageEnumTypeTransformer._(); + + String encode(SigningFailedErrorMessageEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a SigningFailedErrorMessageEnum. + /// + /// 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. + SigningFailedErrorMessageEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Signing failed.': return SigningFailedErrorMessageEnum.signingFailedPeriod; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [SigningFailedErrorMessageEnumTypeTransformer] instance. + static SigningFailedErrorMessageEnumTypeTransformer? _instance; +} + + + +class SigningFailedErrorHttpStatusCodeEnum { + /// Instantiate a new enum with the provided [value]. + const SigningFailedErrorHttpStatusCodeEnum._(this.value); + + /// The underlying value of this enum member. + final int value; + + @override + String toString() => value.toString(); + + int toJson() => value; + + static const number400 = SigningFailedErrorHttpStatusCodeEnum._(400); + + /// List of all possible values in this [enum][SigningFailedErrorHttpStatusCodeEnum]. + static const values = [ + number400, + ]; + + static SigningFailedErrorHttpStatusCodeEnum? fromJson(dynamic value) => SigningFailedErrorHttpStatusCodeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SigningFailedErrorHttpStatusCodeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [SigningFailedErrorHttpStatusCodeEnum] to int, +/// and [decode] dynamic data back to [SigningFailedErrorHttpStatusCodeEnum]. +class SigningFailedErrorHttpStatusCodeEnumTypeTransformer { + factory SigningFailedErrorHttpStatusCodeEnumTypeTransformer() => _instance ??= const SigningFailedErrorHttpStatusCodeEnumTypeTransformer._(); + + const SigningFailedErrorHttpStatusCodeEnumTypeTransformer._(); + + int encode(SigningFailedErrorHttpStatusCodeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a SigningFailedErrorHttpStatusCodeEnum. + /// + /// 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. + SigningFailedErrorHttpStatusCodeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 400: return SigningFailedErrorHttpStatusCodeEnum.number400; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [SigningFailedErrorHttpStatusCodeEnumTypeTransformer] instance. + static SigningFailedErrorHttpStatusCodeEnumTypeTransformer? _instance; +} + + diff --git a/clients/dart/wallets_client/test/sign_credential400_response_test.dart b/clients/dart/wallets_client/test/sign_credential400_response_test.dart new file mode 100644 index 00000000..98e4cb59 --- /dev/null +++ b/clients/dart/wallets_client/test/sign_credential400_response_test.dart @@ -0,0 +1,47 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:affinidi_tdk_wallets_client/api.dart'; +import 'package:test/test.dart'; + +// tests for SignCredential400Response +void main() { + // final instance = SignCredential400Response(); + + group('test SignCredential400Response', () { + // String name + test('to test the property `name`', () async { + // TODO + }); + + // String message + test('to test the property `message`', () async { + // TODO + }); + + // int httpStatusCode + test('to test the property `httpStatusCode`', () async { + // TODO + }); + + // String traceId + test('to test the property `traceId`', () async { + // TODO + }); + + // List details (default value: const []) + test('to test the property `details`', () async { + // TODO + }); + + + }); + +} diff --git a/clients/dart/wallets_client/test/signing_failed_error_test.dart b/clients/dart/wallets_client/test/signing_failed_error_test.dart new file mode 100644 index 00000000..0898f74d --- /dev/null +++ b/clients/dart/wallets_client/test/signing_failed_error_test.dart @@ -0,0 +1,47 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:affinidi_tdk_wallets_client/api.dart'; +import 'package:test/test.dart'; + +// tests for SigningFailedError +void main() { + // final instance = SigningFailedError(); + + group('test SigningFailedError', () { + // String name + test('to test the property `name`', () async { + // TODO + }); + + // String message + test('to test the property `message`', () async { + // TODO + }); + + // int httpStatusCode + test('to test the property `httpStatusCode`', () async { + // TODO + }); + + // String traceId + test('to test the property `traceId`', () async { + // TODO + }); + + // List details (default value: const []) + test('to test the property `details`', () async { + // TODO + }); + + + }); + +} diff --git a/clients/python/credential_issuance_client/.openapi-generator/FILES b/clients/python/credential_issuance_client/.openapi-generator/FILES index 6aa7722c..e7d934e8 100644 --- a/clients/python/credential_issuance_client/.openapi-generator/FILES +++ b/clients/python/credential_issuance_client/.openapi-generator/FILES @@ -44,6 +44,7 @@ affinidi_tdk_credential_issuance_client/models/invalid_jwt_token_error.py affinidi_tdk_credential_issuance_client/models/invalid_parameter_error.py affinidi_tdk_credential_issuance_client/models/invalid_proof_error.py affinidi_tdk_credential_issuance_client/models/issuance_config_dto.py +affinidi_tdk_credential_issuance_client/models/issuance_config_dto_credential_supported_inner.py affinidi_tdk_credential_issuance_client/models/issuance_config_list_response.py affinidi_tdk_credential_issuance_client/models/issuance_config_mini_dto.py affinidi_tdk_credential_issuance_client/models/issuance_state_response.py @@ -54,6 +55,7 @@ affinidi_tdk_credential_issuance_client/models/project_credential_config_not_exi affinidi_tdk_credential_issuance_client/models/start_issuance400_response.py affinidi_tdk_credential_issuance_client/models/start_issuance_input.py affinidi_tdk_credential_issuance_client/models/start_issuance_input_data_inner.py +affinidi_tdk_credential_issuance_client/models/start_issuance_input_data_inner_meta_data.py affinidi_tdk_credential_issuance_client/models/start_issuance_response.py affinidi_tdk_credential_issuance_client/models/update_issuance_config_input.py affinidi_tdk_credential_issuance_client/models/vc_claimed_error.py @@ -93,6 +95,7 @@ docs/InvalidParameterError.md docs/InvalidProofError.md docs/IssuanceApi.md docs/IssuanceConfigDto.md +docs/IssuanceConfigDtoCredentialSupportedInner.md docs/IssuanceConfigListResponse.md docs/IssuanceConfigMiniDto.md docs/IssuanceStateResponse.md @@ -104,6 +107,7 @@ docs/ProjectCredentialConfigNotExistError.md docs/StartIssuance400Response.md docs/StartIssuanceInput.md docs/StartIssuanceInputDataInner.md +docs/StartIssuanceInputDataInnerMetaData.md docs/StartIssuanceResponse.md docs/UpdateIssuanceConfigInput.md docs/VcClaimedError.md @@ -115,8 +119,6 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_cors_generate_credentials_ok.py -test/test_cors_get_credential_offer_ok.py -test/test_cors_get_well_known_open_id_credential_issuer_ok.py -test/test_vc_claimed_error.py +test/test_issuance_config_dto_credential_supported_inner.py +test/test_start_issuance_input_data_inner_meta_data.py tox.ini diff --git a/clients/python/credential_issuance_client/README.md b/clients/python/credential_issuance_client/README.md index b38db4da..dcd5c4d8 100644 --- a/clients/python/credential_issuance_client/README.md +++ b/clients/python/credential_issuance_client/README.md @@ -144,6 +144,7 @@ All URIs are relative to _http://localhost_ - [InvalidParameterError](docs/InvalidParameterError.md) - [InvalidProofError](docs/InvalidProofError.md) - [IssuanceConfigDto](docs/IssuanceConfigDto.md) +- [IssuanceConfigDtoCredentialSupportedInner](docs/IssuanceConfigDtoCredentialSupportedInner.md) - [IssuanceConfigListResponse](docs/IssuanceConfigListResponse.md) - [IssuanceConfigMiniDto](docs/IssuanceConfigMiniDto.md) - [IssuanceStateResponse](docs/IssuanceStateResponse.md) @@ -154,6 +155,7 @@ All URIs are relative to _http://localhost_ - [StartIssuance400Response](docs/StartIssuance400Response.md) - [StartIssuanceInput](docs/StartIssuanceInput.md) - [StartIssuanceInputDataInner](docs/StartIssuanceInputDataInner.md) +- [StartIssuanceInputDataInnerMetaData](docs/StartIssuanceInputDataInnerMetaData.md) - [StartIssuanceResponse](docs/StartIssuanceResponse.md) - [UpdateIssuanceConfigInput](docs/UpdateIssuanceConfigInput.md) - [VcClaimedError](docs/VcClaimedError.md) diff --git a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/__init__.py b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/__init__.py index 118835f1..61354e86 100644 --- a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/__init__.py +++ b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/__init__.py @@ -66,6 +66,7 @@ from affinidi_tdk_credential_issuance_client.models.invalid_parameter_error import InvalidParameterError from affinidi_tdk_credential_issuance_client.models.invalid_proof_error import InvalidProofError from affinidi_tdk_credential_issuance_client.models.issuance_config_dto import IssuanceConfigDto +from affinidi_tdk_credential_issuance_client.models.issuance_config_dto_credential_supported_inner import IssuanceConfigDtoCredentialSupportedInner from affinidi_tdk_credential_issuance_client.models.issuance_config_list_response import IssuanceConfigListResponse from affinidi_tdk_credential_issuance_client.models.issuance_config_mini_dto import IssuanceConfigMiniDto from affinidi_tdk_credential_issuance_client.models.issuance_state_response import IssuanceStateResponse @@ -76,6 +77,7 @@ from affinidi_tdk_credential_issuance_client.models.start_issuance400_response import StartIssuance400Response from affinidi_tdk_credential_issuance_client.models.start_issuance_input import StartIssuanceInput from affinidi_tdk_credential_issuance_client.models.start_issuance_input_data_inner import StartIssuanceInputDataInner +from affinidi_tdk_credential_issuance_client.models.start_issuance_input_data_inner_meta_data import StartIssuanceInputDataInnerMetaData from affinidi_tdk_credential_issuance_client.models.start_issuance_response import StartIssuanceResponse from affinidi_tdk_credential_issuance_client.models.update_issuance_config_input import UpdateIssuanceConfigInput from affinidi_tdk_credential_issuance_client.models.vc_claimed_error import VcClaimedError diff --git a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/__init__.py b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/__init__.py index 7b9f26d9..636c1199 100644 --- a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/__init__.py +++ b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/__init__.py @@ -45,6 +45,7 @@ from affinidi_tdk_credential_issuance_client.models.invalid_parameter_error import InvalidParameterError from affinidi_tdk_credential_issuance_client.models.invalid_proof_error import InvalidProofError from affinidi_tdk_credential_issuance_client.models.issuance_config_dto import IssuanceConfigDto +from affinidi_tdk_credential_issuance_client.models.issuance_config_dto_credential_supported_inner import IssuanceConfigDtoCredentialSupportedInner from affinidi_tdk_credential_issuance_client.models.issuance_config_list_response import IssuanceConfigListResponse from affinidi_tdk_credential_issuance_client.models.issuance_config_mini_dto import IssuanceConfigMiniDto from affinidi_tdk_credential_issuance_client.models.issuance_state_response import IssuanceStateResponse @@ -55,6 +56,7 @@ from affinidi_tdk_credential_issuance_client.models.start_issuance400_response import StartIssuance400Response from affinidi_tdk_credential_issuance_client.models.start_issuance_input import StartIssuanceInput from affinidi_tdk_credential_issuance_client.models.start_issuance_input_data_inner import StartIssuanceInputDataInner +from affinidi_tdk_credential_issuance_client.models.start_issuance_input_data_inner_meta_data import StartIssuanceInputDataInnerMetaData from affinidi_tdk_credential_issuance_client.models.start_issuance_response import StartIssuanceResponse from affinidi_tdk_credential_issuance_client.models.update_issuance_config_input import UpdateIssuanceConfigInput from affinidi_tdk_credential_issuance_client.models.vc_claimed_error import VcClaimedError diff --git a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/create_issuance_config_input.py b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/create_issuance_config_input.py index ed522656..5a182f51 100644 --- a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/create_issuance_config_input.py +++ b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/create_issuance_config_input.py @@ -20,7 +20,7 @@ from typing import Any, Dict, List, Optional, Union -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, validator +from pydantic import BaseModel, Field, StrictStr, confloat, conint, conlist, validator from affinidi_tdk_credential_issuance_client.models.create_issuance_config_input_credential_supported_inner import CreateIssuanceConfigInputCredentialSupportedInner class CreateIssuanceConfigInput(BaseModel): @@ -28,7 +28,7 @@ class CreateIssuanceConfigInput(BaseModel): CreateIssuanceConfigInput """ issuer_wallet_id: StrictStr = Field(..., alias="issuerWalletId", description="Issuer Wallet id") - credential_offer_duration: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="credentialOfferDuration", description="credential offer duration in second") + credential_offer_duration: Optional[Union[confloat(le=604801, ge=1, multiple_of=1, strict=True), conint(le=604801, ge=1, strict=True)]] = Field(None, alias="credentialOfferDuration", description="credential offer duration in second") format: Optional[StrictStr] = Field(None, description="String identifying the format of this Credential, i.e., ldp_vc. Depending on the format value, the object contains further elements defining the type") credential_supported: conlist(CreateIssuanceConfigInputCredentialSupportedInner) = Field(..., alias="credentialSupported") issuer_metadata: Optional[Dict[str, Any]] = Field(None, alias="issuerMetadata", description="Issuer public information wallet may want to show to user during consent confirmation") diff --git a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/create_issuance_config_input_credential_supported_inner.py b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/create_issuance_config_input_credential_supported_inner.py index 118ea34c..ca45e217 100644 --- a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/create_issuance_config_input_credential_supported_inner.py +++ b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/create_issuance_config_input_credential_supported_inner.py @@ -20,17 +20,31 @@ -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, Field, StrictStr, constr, validator class CreateIssuanceConfigInputCredentialSupportedInner(BaseModel): """ CreateIssuanceConfigInputCredentialSupportedInner """ credential_type_id: StrictStr = Field(..., alias="credentialTypeId", description="It is a String that identifies a Credential that is being requested to be issued.") - json_schema_url: StrictStr = Field(..., alias="jsonSchemaUrl", description="credential jsonLdContextUrl") - json_ld_context_url: StrictStr = Field(..., alias="jsonLdContextUrl", description="credential jsonSchemaUrl") + json_schema_url: constr(strict=True) = Field(..., alias="jsonSchemaUrl", description="credential jsonLdContextUrl") + json_ld_context_url: constr(strict=True) = Field(..., alias="jsonLdContextUrl", description="credential jsonSchemaUrl") __properties = ["credentialTypeId", "jsonSchemaUrl", "jsonLdContextUrl"] + @validator('json_schema_url') + def json_schema_url_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^https:\/\/(.+)\.json$", value): + raise ValueError(r"must validate the regular expression /^https:\/\/(.+)\.json$/") + return value + + @validator('json_ld_context_url') + def json_ld_context_url_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^https:\/\/(.+)\.jsonld$", value): + raise ValueError(r"must validate the regular expression /^https:\/\/(.+)\.jsonld$/") + return value + class Config: """Pydantic configuration""" allow_population_by_field_name = True diff --git a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/issuance_config_dto.py b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/issuance_config_dto.py index a913e650..ef594329 100644 --- a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/issuance_config_dto.py +++ b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/issuance_config_dto.py @@ -21,7 +21,7 @@ from typing import Any, Dict, List, Optional, Union from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, validator -from affinidi_tdk_credential_issuance_client.models.create_issuance_config_input_credential_supported_inner import CreateIssuanceConfigInputCredentialSupportedInner +from affinidi_tdk_credential_issuance_client.models.issuance_config_dto_credential_supported_inner import IssuanceConfigDtoCredentialSupportedInner class IssuanceConfigDto(BaseModel): """ @@ -34,7 +34,7 @@ class IssuanceConfigDto(BaseModel): c_nonce_duration: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="cNonceDuration", description="c_nonce duration in second") format: Optional[StrictStr] = Field(None, description="String identifying the format of this Credential, i.e., jwt_vc_json-ld or ldp_vc. Depending on the format value, the object contains further elements defining the type") issuer_uri: Optional[StrictStr] = Field(None, alias="issuerUri", description="Issuer URI") - credential_supported: Optional[conlist(CreateIssuanceConfigInputCredentialSupportedInner, min_items=1)] = Field(None, alias="credentialSupported") + credential_supported: Optional[conlist(IssuanceConfigDtoCredentialSupportedInner, min_items=1)] = Field(None, alias="credentialSupported") issuer_metadata: Optional[Dict[str, Any]] = Field(None, alias="issuerMetadata", description="Issuer public information wallet may want to show to user during consent confirmation") version: Optional[Union[StrictFloat, StrictInt]] = None __properties = ["id", "issuerDid", "issuerWalletId", "credentialOfferDuration", "cNonceDuration", "format", "issuerUri", "credentialSupported", "issuerMetadata", "version"] @@ -99,7 +99,7 @@ def from_dict(cls, obj: dict) -> IssuanceConfigDto: "c_nonce_duration": obj.get("cNonceDuration"), "format": obj.get("format"), "issuer_uri": obj.get("issuerUri"), - "credential_supported": [CreateIssuanceConfigInputCredentialSupportedInner.from_dict(_item) for _item in obj.get("credentialSupported")] if obj.get("credentialSupported") is not None else None, + "credential_supported": [IssuanceConfigDtoCredentialSupportedInner.from_dict(_item) for _item in obj.get("credentialSupported")] if obj.get("credentialSupported") is not None else None, "issuer_metadata": obj.get("issuerMetadata"), "version": obj.get("version") }) diff --git a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/issuance_config_dto_credential_supported_inner.py b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/issuance_config_dto_credential_supported_inner.py new file mode 100644 index 00000000..b04d01ab --- /dev/null +++ b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/issuance_config_dto_credential_supported_inner.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + CredentialIssuanceService + + Affinidi Credential Issuance Service Structure + + The version of the OpenAPI document: 1.0.0 + Contact: nucleus.team@affinidi.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + + +from pydantic import BaseModel, Field, StrictStr + +class IssuanceConfigDtoCredentialSupportedInner(BaseModel): + """ + IssuanceConfigDtoCredentialSupportedInner + """ + credential_type_id: StrictStr = Field(..., alias="credentialTypeId", description="It is a String that identifies a Credential that is being requested to be issued.") + json_schema_url: StrictStr = Field(..., alias="jsonSchemaUrl", description="credential jsonLdContextUrl") + json_ld_context_url: StrictStr = Field(..., alias="jsonLdContextUrl", description="credential jsonSchemaUrl") + __properties = ["credentialTypeId", "jsonSchemaUrl", "jsonLdContextUrl"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> IssuanceConfigDtoCredentialSupportedInner: + """Create an instance of IssuanceConfigDtoCredentialSupportedInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IssuanceConfigDtoCredentialSupportedInner: + """Create an instance of IssuanceConfigDtoCredentialSupportedInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return IssuanceConfigDtoCredentialSupportedInner.parse_obj(obj) + + _obj = IssuanceConfigDtoCredentialSupportedInner.parse_obj({ + "credential_type_id": obj.get("credentialTypeId"), + "json_schema_url": obj.get("jsonSchemaUrl"), + "json_ld_context_url": obj.get("jsonLdContextUrl") + }) + return _obj + + diff --git a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/start_issuance_input.py b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/start_issuance_input.py index 81b01d21..8344248d 100644 --- a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/start_issuance_input.py +++ b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/start_issuance_input.py @@ -20,7 +20,7 @@ from typing import List, Optional -from pydantic import BaseModel, Field, StrictStr, conlist, validator +from pydantic import BaseModel, Field, StrictStr, conlist, constr, validator from affinidi_tdk_credential_issuance_client.models.start_issuance_input_data_inner import StartIssuanceInputDataInner class StartIssuanceInput(BaseModel): @@ -28,7 +28,7 @@ class StartIssuanceInput(BaseModel): StartIssuanceInput """ claim_mode: Optional[StrictStr] = Field(None, alias="claimMode") - holder_did: StrictStr = Field(..., alias="holderDid", description="Holder DID") + holder_did: constr(strict=True) = Field(..., alias="holderDid", description="Holder DID") issuance_id: Optional[StrictStr] = Field(None, alias="issuanceId", description="Website's internal identifier. Website may use to get info about the status of issuance flow. If it is not provided, CIS will generate one.") data: conlist(StartIssuanceInputDataInner) = Field(...) __properties = ["claimMode", "holderDid", "issuanceId", "data"] @@ -43,6 +43,13 @@ def claim_mode_validate_enum(cls, value): raise ValueError("must be one of enum values ('NORMAL', 'TX_CODE')") return value + @validator('holder_did') + def holder_did_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^did:.+$", value): + raise ValueError(r"must validate the regular expression /^did:.+$/") + return value + class Config: """Pydantic configuration""" allow_population_by_field_name = True diff --git a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/start_issuance_input_data_inner.py b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/start_issuance_input_data_inner.py index 9fde9826..518ef4b7 100644 --- a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/start_issuance_input_data_inner.py +++ b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/start_issuance_input_data_inner.py @@ -19,8 +19,9 @@ import json -from typing import Any, Dict +from typing import Any, Dict, Optional from pydantic import BaseModel, Field, StrictStr +from affinidi_tdk_credential_issuance_client.models.start_issuance_input_data_inner_meta_data import StartIssuanceInputDataInnerMetaData class StartIssuanceInputDataInner(BaseModel): """ @@ -28,7 +29,8 @@ class StartIssuanceInputDataInner(BaseModel): """ credential_type_id: StrictStr = Field(..., alias="credentialTypeId", description="It is a String that identifies a Credential that is being requested to be issued.") credential_data: Dict[str, Any] = Field(..., alias="credentialData", description="Object of data to be included in the issued credential ,should match the credential type") - __properties = ["credentialTypeId", "credentialData"] + meta_data: Optional[StartIssuanceInputDataInnerMetaData] = Field(None, alias="metaData") + __properties = ["credentialTypeId", "credentialData", "metaData"] class Config: """Pydantic configuration""" @@ -54,6 +56,9 @@ def to_dict(self): exclude={ }, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of meta_data + if self.meta_data: + _dict['metaData'] = self.meta_data.to_dict() return _dict @classmethod @@ -67,7 +72,8 @@ def from_dict(cls, obj: dict) -> StartIssuanceInputDataInner: _obj = StartIssuanceInputDataInner.parse_obj({ "credential_type_id": obj.get("credentialTypeId"), - "credential_data": obj.get("credentialData") + "credential_data": obj.get("credentialData"), + "meta_data": StartIssuanceInputDataInnerMetaData.from_dict(obj.get("metaData")) if obj.get("metaData") is not None else None }) return _obj diff --git a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/start_issuance_input_data_inner_meta_data.py b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/start_issuance_input_data_inner_meta_data.py new file mode 100644 index 00000000..89cf2db8 --- /dev/null +++ b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/start_issuance_input_data_inner_meta_data.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + CredentialIssuanceService + + Affinidi Credential Issuance Service Structure + + The version of the OpenAPI document: 1.0.0 + Contact: nucleus.team@affinidi.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime + +from pydantic import BaseModel, Field + +class StartIssuanceInputDataInnerMetaData(BaseModel): + """ + Object of metadata to be included in the additionalProperties related to vc # noqa: E501 + """ + expiration_date: datetime = Field(..., alias="expirationDate", description="Date and time when the credential will expire") + __properties = ["expirationDate"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> StartIssuanceInputDataInnerMetaData: + """Create an instance of StartIssuanceInputDataInnerMetaData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> StartIssuanceInputDataInnerMetaData: + """Create an instance of StartIssuanceInputDataInnerMetaData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return StartIssuanceInputDataInnerMetaData.parse_obj(obj) + + _obj = StartIssuanceInputDataInnerMetaData.parse_obj({ + "expiration_date": obj.get("expirationDate") + }) + return _obj + + diff --git a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/update_issuance_config_input.py b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/update_issuance_config_input.py index feb4cef2..5d82ff52 100644 --- a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/update_issuance_config_input.py +++ b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/update_issuance_config_input.py @@ -20,7 +20,7 @@ from typing import Any, Dict, List, Optional, Union -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, validator +from pydantic import BaseModel, Field, StrictStr, confloat, conint, conlist, validator from affinidi_tdk_credential_issuance_client.models.create_issuance_config_input_credential_supported_inner import CreateIssuanceConfigInputCredentialSupportedInner class UpdateIssuanceConfigInput(BaseModel): @@ -28,7 +28,7 @@ class UpdateIssuanceConfigInput(BaseModel): UpdateIssuanceConfigInput """ issuer_wallet_id: Optional[StrictStr] = Field(None, alias="issuerWalletId", description="Issuer Wallet id") - credential_offer_duration: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="credentialOfferDuration", description="credential offer duration in second") + credential_offer_duration: Optional[Union[confloat(le=604801, ge=1, multiple_of=1, strict=True), conint(le=604801, ge=1, strict=True)]] = Field(None, alias="credentialOfferDuration", description="credential offer duration in second") format: Optional[StrictStr] = Field(None, description="String identifying the format of this Credential, i.e., ldp_vc. Depending on the format value, the object contains further elements defining the type") issuer_uri: Optional[StrictStr] = Field(None, alias="issuerUri", description="Issuer URI") credential_supported: Optional[conlist(CreateIssuanceConfigInputCredentialSupportedInner)] = Field(None, alias="credentialSupported") diff --git a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/well_known_open_id_credential_issuer_response.py b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/well_known_open_id_credential_issuer_response.py index 11075904..9a444ee2 100644 --- a/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/well_known_open_id_credential_issuer_response.py +++ b/clients/python/credential_issuance_client/affinidi_tdk_credential_issuance_client/models/well_known_open_id_credential_issuer_response.py @@ -21,7 +21,7 @@ from typing import List, Optional from pydantic import BaseModel, StrictStr, conlist, validator -from affinidi_tdk_credential_issuance_client.models.create_issuance_config_input_credential_supported_inner import CreateIssuanceConfigInputCredentialSupportedInner +from affinidi_tdk_credential_issuance_client.models.issuance_config_dto_credential_supported_inner import IssuanceConfigDtoCredentialSupportedInner class WellKnownOpenIdCredentialIssuerResponse(BaseModel): """ @@ -30,7 +30,7 @@ class WellKnownOpenIdCredentialIssuerResponse(BaseModel): authorization_endpoint: Optional[StrictStr] = None credential_endpoint: Optional[StrictStr] = None credential_issuer: Optional[StrictStr] = None - credentials_supported: Optional[conlist(CreateIssuanceConfigInputCredentialSupportedInner)] = None + credentials_supported: Optional[conlist(IssuanceConfigDtoCredentialSupportedInner)] = None deferred_credential_endpoint: Optional[StrictStr] = None grant_types_supported: Optional[conlist(StrictStr)] = None jwks_uri: Optional[StrictStr] = None @@ -125,7 +125,7 @@ def from_dict(cls, obj: dict) -> WellKnownOpenIdCredentialIssuerResponse: "authorization_endpoint": obj.get("authorization_endpoint"), "credential_endpoint": obj.get("credential_endpoint"), "credential_issuer": obj.get("credential_issuer"), - "credentials_supported": [CreateIssuanceConfigInputCredentialSupportedInner.from_dict(_item) for _item in obj.get("credentials_supported")] if obj.get("credentials_supported") is not None else None, + "credentials_supported": [IssuanceConfigDtoCredentialSupportedInner.from_dict(_item) for _item in obj.get("credentials_supported")] if obj.get("credentials_supported") is not None else None, "deferred_credential_endpoint": obj.get("deferred_credential_endpoint"), "grant_types_supported": obj.get("grant_types_supported"), "jwks_uri": obj.get("jwks_uri"), diff --git a/clients/python/credential_issuance_client/docs/IssuanceConfigDto.md b/clients/python/credential_issuance_client/docs/IssuanceConfigDto.md index b92d6dc9..87fa7587 100644 --- a/clients/python/credential_issuance_client/docs/IssuanceConfigDto.md +++ b/clients/python/credential_issuance_client/docs/IssuanceConfigDto.md @@ -2,18 +2,18 @@ ## Properties -| Name | Type | Description | Notes | -| ----------------------------- | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **id** | **str** | | [optional] | -| **issuer_did** | **str** | Issuer DID | [optional] | -| **issuer_wallet_id** | **str** | Issuer Wallet id | [optional] | -| **credential_offer_duration** | **float** | credential offer duration in second | [optional] | -| **c_nonce_duration** | **float** | c_nonce duration in second | [optional] | -| **format** | **str** | String identifying the format of this Credential, i.e., jwt_vc_json-ld or ldp_vc. Depending on the format value, the object contains further elements defining the type | [optional] | -| **issuer_uri** | **str** | Issuer URI | [optional] | -| **credential_supported** | [**List[CreateIssuanceConfigInputCredentialSupportedInner]**](CreateIssuanceConfigInputCredentialSupportedInner.md) | | [optional] | -| **issuer_metadata** | **Dict[str, object]** | Issuer public information wallet may want to show to user during consent confirmation | [optional] | -| **version** | **float** | | [optional] | +| Name | Type | Description | Notes | +| ----------------------------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | +| **id** | **str** | | [optional] | +| **issuer_did** | **str** | Issuer DID | [optional] | +| **issuer_wallet_id** | **str** | Issuer Wallet id | [optional] | +| **credential_offer_duration** | **float** | credential offer duration in second | [optional] | +| **c_nonce_duration** | **float** | c_nonce duration in second | [optional] | +| **format** | **str** | String identifying the format of this Credential, i.e., jwt_vc_json-ld or ldp_vc. Depending on the format value, the object contains further elements defining the type | [optional] | +| **issuer_uri** | **str** | Issuer URI | [optional] | +| **credential_supported** | [**List[IssuanceConfigDtoCredentialSupportedInner]**](IssuanceConfigDtoCredentialSupportedInner.md) | | [optional] | +| **issuer_metadata** | **Dict[str, object]** | Issuer public information wallet may want to show to user during consent confirmation | [optional] | +| **version** | **float** | | [optional] | ## Example diff --git a/clients/python/credential_issuance_client/docs/IssuanceConfigDtoCredentialSupportedInner.md b/clients/python/credential_issuance_client/docs/IssuanceConfigDtoCredentialSupportedInner.md new file mode 100644 index 00000000..c633fc1b --- /dev/null +++ b/clients/python/credential_issuance_client/docs/IssuanceConfigDtoCredentialSupportedInner.md @@ -0,0 +1,29 @@ +# IssuanceConfigDtoCredentialSupportedInner + +## Properties + +| Name | Type | Description | Notes | +| ----------------------- | ------- | --------------------------------------------------------------------------------- | ----- | +| **credential_type_id** | **str** | It is a String that identifies a Credential that is being requested to be issued. | +| **json_schema_url** | **str** | credential jsonLdContextUrl | +| **json_ld_context_url** | **str** | credential jsonSchemaUrl | + +## Example + +```python +from affinidi_tdk_credential_issuance_client.models.issuance_config_dto_credential_supported_inner import IssuanceConfigDtoCredentialSupportedInner + +# TODO update the JSON string below +json = "{}" +# create an instance of IssuanceConfigDtoCredentialSupportedInner from a JSON string +issuance_config_dto_credential_supported_inner_instance = IssuanceConfigDtoCredentialSupportedInner.from_json(json) +# print the JSON string representation of the object +print IssuanceConfigDtoCredentialSupportedInner.to_json() + +# convert the object into a dict +issuance_config_dto_credential_supported_inner_dict = issuance_config_dto_credential_supported_inner_instance.to_dict() +# create an instance of IssuanceConfigDtoCredentialSupportedInner from a dict +issuance_config_dto_credential_supported_inner_form_dict = issuance_config_dto_credential_supported_inner.from_dict(issuance_config_dto_credential_supported_inner_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/python/credential_issuance_client/docs/StartIssuanceInputDataInner.md b/clients/python/credential_issuance_client/docs/StartIssuanceInputDataInner.md index 20339c3e..e1fbc1e8 100644 --- a/clients/python/credential_issuance_client/docs/StartIssuanceInputDataInner.md +++ b/clients/python/credential_issuance_client/docs/StartIssuanceInputDataInner.md @@ -4,10 +4,11 @@ Data to be included in issued credential ## Properties -| Name | Type | Description | Notes | -| ---------------------- | --------------------- | ---------------------------------------------------------------------------------------- | ----- | -| **credential_type_id** | **str** | It is a String that identifies a Credential that is being requested to be issued. | -| **credential_data** | **Dict[str, object]** | Object of data to be included in the issued credential ,should match the credential type | +| Name | Type | Description | Notes | +| ---------------------- | --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------- | +| **credential_type_id** | **str** | It is a String that identifies a Credential that is being requested to be issued. | +| **credential_data** | **Dict[str, object]** | Object of data to be included in the issued credential ,should match the credential type | +| **meta_data** | [**StartIssuanceInputDataInnerMetaData**](StartIssuanceInputDataInnerMetaData.md) | | [optional] | ## Example diff --git a/clients/python/credential_issuance_client/docs/StartIssuanceInputDataInnerMetaData.md b/clients/python/credential_issuance_client/docs/StartIssuanceInputDataInnerMetaData.md new file mode 100644 index 00000000..eae25838 --- /dev/null +++ b/clients/python/credential_issuance_client/docs/StartIssuanceInputDataInnerMetaData.md @@ -0,0 +1,29 @@ +# StartIssuanceInputDataInnerMetaData + +Object of metadata to be included in the additionalProperties related to vc + +## Properties + +| Name | Type | Description | Notes | +| ------------------- | ------------ | --------------------------------------------- | ----- | +| **expiration_date** | **datetime** | Date and time when the credential will expire | + +## Example + +```python +from affinidi_tdk_credential_issuance_client.models.start_issuance_input_data_inner_meta_data import StartIssuanceInputDataInnerMetaData + +# TODO update the JSON string below +json = "{}" +# create an instance of StartIssuanceInputDataInnerMetaData from a JSON string +start_issuance_input_data_inner_meta_data_instance = StartIssuanceInputDataInnerMetaData.from_json(json) +# print the JSON string representation of the object +print StartIssuanceInputDataInnerMetaData.to_json() + +# convert the object into a dict +start_issuance_input_data_inner_meta_data_dict = start_issuance_input_data_inner_meta_data_instance.to_dict() +# create an instance of StartIssuanceInputDataInnerMetaData from a dict +start_issuance_input_data_inner_meta_data_form_dict = start_issuance_input_data_inner_meta_data.from_dict(start_issuance_input_data_inner_meta_data_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/python/credential_issuance_client/docs/WellKnownOpenIdCredentialIssuerResponse.md b/clients/python/credential_issuance_client/docs/WellKnownOpenIdCredentialIssuerResponse.md index 54a3c0c2..4c377142 100644 --- a/clients/python/credential_issuance_client/docs/WellKnownOpenIdCredentialIssuerResponse.md +++ b/clients/python/credential_issuance_client/docs/WellKnownOpenIdCredentialIssuerResponse.md @@ -2,18 +2,18 @@ ## Properties -| Name | Type | Description | Notes | -| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ----------- | ---------- | -| **authorization_endpoint** | **str** | | [optional] | -| **credential_endpoint** | **str** | | [optional] | -| **credential_issuer** | **str** | | [optional] | -| **credentials_supported** | [**List[CreateIssuanceConfigInputCredentialSupportedInner]**](CreateIssuanceConfigInputCredentialSupportedInner.md) | | [optional] | -| **deferred_credential_endpoint** | **str** | | [optional] | -| **grant_types_supported** | **List[str]** | | [optional] | -| **jwks_uri** | **str** | | [optional] | -| **scopes_supported** | **List[str]** | | [optional] | -| **token_endpoint** | **str** | | [optional] | -| **token_endpoint_auth_methods_supported** | **List[str]** | | [optional] | +| Name | Type | Description | Notes | +| ----------------------------------------- | --------------------------------------------------------------------------------------------------- | ----------- | ---------- | +| **authorization_endpoint** | **str** | | [optional] | +| **credential_endpoint** | **str** | | [optional] | +| **credential_issuer** | **str** | | [optional] | +| **credentials_supported** | [**List[IssuanceConfigDtoCredentialSupportedInner]**](IssuanceConfigDtoCredentialSupportedInner.md) | | [optional] | +| **deferred_credential_endpoint** | **str** | | [optional] | +| **grant_types_supported** | **List[str]** | | [optional] | +| **jwks_uri** | **str** | | [optional] | +| **scopes_supported** | **List[str]** | | [optional] | +| **token_endpoint** | **str** | | [optional] | +| **token_endpoint_auth_methods_supported** | **List[str]** | | [optional] | ## Example diff --git a/clients/python/credential_issuance_client/test/test_issuance_config_dto_credential_supported_inner.py b/clients/python/credential_issuance_client/test/test_issuance_config_dto_credential_supported_inner.py new file mode 100644 index 00000000..a9be8904 --- /dev/null +++ b/clients/python/credential_issuance_client/test/test_issuance_config_dto_credential_supported_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + CredentialIssuanceService + + Affinidi Credential Issuance Service Structure + + The version of the OpenAPI document: 1.0.0 + Contact: nucleus.team@affinidi.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from affinidi_tdk_credential_issuance_client.models.issuance_config_dto_credential_supported_inner import IssuanceConfigDtoCredentialSupportedInner # noqa: E501 + +class TestIssuanceConfigDtoCredentialSupportedInner(unittest.TestCase): + """IssuanceConfigDtoCredentialSupportedInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IssuanceConfigDtoCredentialSupportedInner: + """Test IssuanceConfigDtoCredentialSupportedInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IssuanceConfigDtoCredentialSupportedInner` + """ + model = IssuanceConfigDtoCredentialSupportedInner() # noqa: E501 + if include_optional: + return IssuanceConfigDtoCredentialSupportedInner( + credential_type_id = '', + json_schema_url = '', + json_ld_context_url = '' + ) + else: + return IssuanceConfigDtoCredentialSupportedInner( + credential_type_id = '', + json_schema_url = '', + json_ld_context_url = '', + ) + """ + + def testIssuanceConfigDtoCredentialSupportedInner(self): + """Test IssuanceConfigDtoCredentialSupportedInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/credential_issuance_client/test/test_start_issuance_input_data_inner_meta_data.py b/clients/python/credential_issuance_client/test/test_start_issuance_input_data_inner_meta_data.py new file mode 100644 index 00000000..7842731b --- /dev/null +++ b/clients/python/credential_issuance_client/test/test_start_issuance_input_data_inner_meta_data.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + CredentialIssuanceService + + Affinidi Credential Issuance Service Structure + + The version of the OpenAPI document: 1.0.0 + Contact: nucleus.team@affinidi.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from affinidi_tdk_credential_issuance_client.models.start_issuance_input_data_inner_meta_data import StartIssuanceInputDataInnerMetaData # noqa: E501 + +class TestStartIssuanceInputDataInnerMetaData(unittest.TestCase): + """StartIssuanceInputDataInnerMetaData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StartIssuanceInputDataInnerMetaData: + """Test StartIssuanceInputDataInnerMetaData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StartIssuanceInputDataInnerMetaData` + """ + model = StartIssuanceInputDataInnerMetaData() # noqa: E501 + if include_optional: + return StartIssuanceInputDataInnerMetaData( + expiration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return StartIssuanceInputDataInnerMetaData( + expiration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testStartIssuanceInputDataInnerMetaData(self): + """Test StartIssuanceInputDataInnerMetaData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/credential_verification_client/.openapi-generator/FILES b/clients/python/credential_verification_client/.openapi-generator/FILES index 86ba9c0e..b46cd172 100644 --- a/clients/python/credential_verification_client/.openapi-generator/FILES +++ b/clients/python/credential_verification_client/.openapi-generator/FILES @@ -5,7 +5,6 @@ README.md affinidi_tdk_credential_verification_client/__init__.py affinidi_tdk_credential_verification_client/api/__init__.py affinidi_tdk_credential_verification_client/api/default_api.py -affinidi_tdk_credential_verification_client/api/verifier_api.py affinidi_tdk_credential_verification_client/api_client.py affinidi_tdk_credential_verification_client/api_response.py affinidi_tdk_credential_verification_client/configuration.py @@ -84,7 +83,6 @@ docs/PresentationSubmission.md docs/SubmissionRequirement.md docs/ValidateJwtInput.md docs/ValidateJwtOutput.md -docs/VerifierApi.md docs/VerifyCredentialInput.md docs/VerifyCredentialOutput.md docs/VerifyPresentationInput.md diff --git a/clients/python/credential_verification_client/README.md b/clients/python/credential_verification_client/README.md index 7fb4f409..6fe5abb6 100644 --- a/clients/python/credential_verification_client/README.md +++ b/clients/python/credential_verification_client/README.md @@ -99,11 +99,10 @@ with affinidi_tdk_credential_verification_client.ApiClient(configuration) as api All URIs are relative to _http://localhost_ -| Class | Method | HTTP request | Description | -| ------------- | ----------------------------------------------------------------- | ---------------------------------- | ------------------- | -| _DefaultApi_ | [**verify_credentials**](docs/DefaultApi.md#verify_credentials) | **POST** /v1/verifier/verify-vcs | Verifying VC | -| _DefaultApi_ | [**verify_presentation**](docs/DefaultApi.md#verify_presentation) | **POST** /v1/verifier/verify-vp | Verifying VP | -| _VerifierApi_ | [**validate_jwt**](docs/VerifierApi.md#validate_jwt) | **POST** /v1/verifier/validate-jwt | Validates JWT token | +| Class | Method | HTTP request | Description | +| ------------ | ----------------------------------------------------------------- | -------------------------------- | ------------ | +| _DefaultApi_ | [**verify_credentials**](docs/DefaultApi.md#verify_credentials) | **POST** /v1/verifier/verify-vcs | Verifying VC | +| _DefaultApi_ | [**verify_presentation**](docs/DefaultApi.md#verify_presentation) | **POST** /v1/verifier/verify-vp | Verifying VP | ## Documentation For Models diff --git a/clients/python/credential_verification_client/affinidi_tdk_credential_verification_client/__init__.py b/clients/python/credential_verification_client/affinidi_tdk_credential_verification_client/__init__.py index 5811e7f7..c3c5d579 100644 --- a/clients/python/credential_verification_client/affinidi_tdk_credential_verification_client/__init__.py +++ b/clients/python/credential_verification_client/affinidi_tdk_credential_verification_client/__init__.py @@ -19,7 +19,6 @@ # import apis into sdk package from affinidi_tdk_credential_verification_client.api.default_api import DefaultApi -from affinidi_tdk_credential_verification_client.api.verifier_api import VerifierApi # import ApiClient from affinidi_tdk_credential_verification_client.api_response import ApiResponse diff --git a/clients/python/credential_verification_client/affinidi_tdk_credential_verification_client/api/__init__.py b/clients/python/credential_verification_client/affinidi_tdk_credential_verification_client/api/__init__.py index 22520f18..e3ac548b 100644 --- a/clients/python/credential_verification_client/affinidi_tdk_credential_verification_client/api/__init__.py +++ b/clients/python/credential_verification_client/affinidi_tdk_credential_verification_client/api/__init__.py @@ -2,5 +2,4 @@ # import apis into api package from affinidi_tdk_credential_verification_client.api.default_api import DefaultApi -from affinidi_tdk_credential_verification_client.api.verifier_api import VerifierApi diff --git a/clients/python/iam_client/.openapi-generator/FILES b/clients/python/iam_client/.openapi-generator/FILES index a414e5a3..82c8db29 100644 --- a/clients/python/iam_client/.openapi-generator/FILES +++ b/clients/python/iam_client/.openapi-generator/FILES @@ -109,5 +109,4 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_principal_cannot_be_deleted_error.py tox.ini diff --git a/clients/python/iota_client/.openapi-generator/FILES b/clients/python/iota_client/.openapi-generator/FILES index 30179ef5..fb6342f2 100644 --- a/clients/python/iota_client/.openapi-generator/FILES +++ b/clients/python/iota_client/.openapi-generator/FILES @@ -87,5 +87,4 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_cors_iot_oidc4vpcallback_ok.py tox.ini diff --git a/clients/python/iota_client/affinidi_tdk_iota_client/models/create_iota_configuration_input.py b/clients/python/iota_client/affinidi_tdk_iota_client/models/create_iota_configuration_input.py index f79b683f..9d175671 100644 --- a/clients/python/iota_client/affinidi_tdk_iota_client/models/create_iota_configuration_input.py +++ b/clients/python/iota_client/affinidi_tdk_iota_client/models/create_iota_configuration_input.py @@ -20,7 +20,7 @@ from typing import Optional, Union -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, Field, StrictBool, StrictStr, confloat, conint from affinidi_tdk_iota_client.models.iota_configuration_dto_client_metadata import IotaConfigurationDtoClientMetadata class CreateIotaConfigurationInput(BaseModel): @@ -32,7 +32,7 @@ class CreateIotaConfigurationInput(BaseModel): iota_response_webhook_url: Optional[StrictStr] = Field(None, alias="iotaResponseWebhookURL", description="webhook to call when data is ready") enable_verification: StrictBool = Field(..., alias="enableVerification") enable_consent_audit_log: StrictBool = Field(..., alias="enableConsentAuditLog") - token_max_age: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tokenMaxAge", description="token time to live in seconds") + token_max_age: Optional[Union[confloat(ge=1, strict=True), conint(ge=1, strict=True)]] = Field(None, alias="tokenMaxAge", description="token time to live in seconds") client_metadata: IotaConfigurationDtoClientMetadata = Field(..., alias="clientMetadata") __properties = ["name", "walletAri", "iotaResponseWebhookURL", "enableVerification", "enableConsentAuditLog", "tokenMaxAge", "clientMetadata"] diff --git a/clients/python/wallets_client/.openapi-generator/FILES b/clients/python/wallets_client/.openapi-generator/FILES index 27e41dde..3b54348a 100644 --- a/clients/python/wallets_client/.openapi-generator/FILES +++ b/clients/python/wallets_client/.openapi-generator/FILES @@ -27,11 +27,13 @@ affinidi_tdk_wallets_client/models/operation_forbidden_error.py affinidi_tdk_wallets_client/models/revoke_credential_input.py affinidi_tdk_wallets_client/models/service_error_response.py affinidi_tdk_wallets_client/models/service_error_response_details_inner.py +affinidi_tdk_wallets_client/models/sign_credential400_response.py affinidi_tdk_wallets_client/models/sign_credential_input_dto.py affinidi_tdk_wallets_client/models/sign_credential_input_dto_unsigned_credential_params.py affinidi_tdk_wallets_client/models/sign_credential_result_dto.py affinidi_tdk_wallets_client/models/sign_jwt_token.py affinidi_tdk_wallets_client/models/sign_jwt_token_ok.py +affinidi_tdk_wallets_client/models/signing_failed_error.py affinidi_tdk_wallets_client/models/update_wallet_input.py affinidi_tdk_wallets_client/models/wallet_dto.py affinidi_tdk_wallets_client/models/wallet_dto_keys_inner.py @@ -55,11 +57,13 @@ docs/RevocationApi.md docs/RevokeCredentialInput.md docs/ServiceErrorResponse.md docs/ServiceErrorResponseDetailsInner.md +docs/SignCredential400Response.md docs/SignCredentialInputDto.md docs/SignCredentialInputDtoUnsignedCredentialParams.md docs/SignCredentialResultDto.md docs/SignJwtToken.md docs/SignJwtTokenOK.md +docs/SigningFailedError.md docs/UpdateWalletInput.md docs/WalletApi.md docs/WalletDto.md @@ -71,6 +75,6 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_default_api.py -test/test_get_revocation_credential_status_ok.py +test/test_sign_credential400_response.py +test/test_signing_failed_error.py tox.ini diff --git a/clients/python/wallets_client/README.md b/clients/python/wallets_client/README.md index 35ad27c9..616ae543 100644 --- a/clients/python/wallets_client/README.md +++ b/clients/python/wallets_client/README.md @@ -130,11 +130,13 @@ All URIs are relative to _http://localhost_ - [RevokeCredentialInput](docs/RevokeCredentialInput.md) - [ServiceErrorResponse](docs/ServiceErrorResponse.md) - [ServiceErrorResponseDetailsInner](docs/ServiceErrorResponseDetailsInner.md) +- [SignCredential400Response](docs/SignCredential400Response.md) - [SignCredentialInputDto](docs/SignCredentialInputDto.md) - [SignCredentialInputDtoUnsignedCredentialParams](docs/SignCredentialInputDtoUnsignedCredentialParams.md) - [SignCredentialResultDto](docs/SignCredentialResultDto.md) - [SignJwtToken](docs/SignJwtToken.md) - [SignJwtTokenOK](docs/SignJwtTokenOK.md) +- [SigningFailedError](docs/SigningFailedError.md) - [UpdateWalletInput](docs/UpdateWalletInput.md) - [WalletDto](docs/WalletDto.md) - [WalletDtoKeysInner](docs/WalletDtoKeysInner.md) diff --git a/clients/python/wallets_client/affinidi_tdk_wallets_client/__init__.py b/clients/python/wallets_client/affinidi_tdk_wallets_client/__init__.py index fb626a17..c9391441 100644 --- a/clients/python/wallets_client/affinidi_tdk_wallets_client/__init__.py +++ b/clients/python/wallets_client/affinidi_tdk_wallets_client/__init__.py @@ -49,11 +49,13 @@ from affinidi_tdk_wallets_client.models.revoke_credential_input import RevokeCredentialInput from affinidi_tdk_wallets_client.models.service_error_response import ServiceErrorResponse from affinidi_tdk_wallets_client.models.service_error_response_details_inner import ServiceErrorResponseDetailsInner +from affinidi_tdk_wallets_client.models.sign_credential400_response import SignCredential400Response from affinidi_tdk_wallets_client.models.sign_credential_input_dto import SignCredentialInputDto from affinidi_tdk_wallets_client.models.sign_credential_input_dto_unsigned_credential_params import SignCredentialInputDtoUnsignedCredentialParams from affinidi_tdk_wallets_client.models.sign_credential_result_dto import SignCredentialResultDto from affinidi_tdk_wallets_client.models.sign_jwt_token import SignJwtToken from affinidi_tdk_wallets_client.models.sign_jwt_token_ok import SignJwtTokenOK +from affinidi_tdk_wallets_client.models.signing_failed_error import SigningFailedError from affinidi_tdk_wallets_client.models.update_wallet_input import UpdateWalletInput from affinidi_tdk_wallets_client.models.wallet_dto import WalletDto from affinidi_tdk_wallets_client.models.wallet_dto_keys_inner import WalletDtoKeysInner diff --git a/clients/python/wallets_client/affinidi_tdk_wallets_client/api/wallet_api.py b/clients/python/wallets_client/affinidi_tdk_wallets_client/api/wallet_api.py index 769a02c1..6ae95f03 100644 --- a/clients/python/wallets_client/affinidi_tdk_wallets_client/api/wallet_api.py +++ b/clients/python/wallets_client/affinidi_tdk_wallets_client/api/wallet_api.py @@ -749,7 +749,7 @@ def sign_credential_with_http_info(self, wallet_id : Annotated[StrictStr, Field( _response_types_map = { '200': "SignCredentialResultDto", - '400': "InvalidParameterError", + '400': "SignCredential400Response", '403': "OperationForbiddenError", '404': "NotFoundError", } diff --git a/clients/python/wallets_client/affinidi_tdk_wallets_client/models/__init__.py b/clients/python/wallets_client/affinidi_tdk_wallets_client/models/__init__.py index 086f24d9..42844921 100644 --- a/clients/python/wallets_client/affinidi_tdk_wallets_client/models/__init__.py +++ b/clients/python/wallets_client/affinidi_tdk_wallets_client/models/__init__.py @@ -30,11 +30,13 @@ from affinidi_tdk_wallets_client.models.revoke_credential_input import RevokeCredentialInput from affinidi_tdk_wallets_client.models.service_error_response import ServiceErrorResponse from affinidi_tdk_wallets_client.models.service_error_response_details_inner import ServiceErrorResponseDetailsInner +from affinidi_tdk_wallets_client.models.sign_credential400_response import SignCredential400Response from affinidi_tdk_wallets_client.models.sign_credential_input_dto import SignCredentialInputDto from affinidi_tdk_wallets_client.models.sign_credential_input_dto_unsigned_credential_params import SignCredentialInputDtoUnsignedCredentialParams from affinidi_tdk_wallets_client.models.sign_credential_result_dto import SignCredentialResultDto from affinidi_tdk_wallets_client.models.sign_jwt_token import SignJwtToken from affinidi_tdk_wallets_client.models.sign_jwt_token_ok import SignJwtTokenOK +from affinidi_tdk_wallets_client.models.signing_failed_error import SigningFailedError from affinidi_tdk_wallets_client.models.update_wallet_input import UpdateWalletInput from affinidi_tdk_wallets_client.models.wallet_dto import WalletDto from affinidi_tdk_wallets_client.models.wallet_dto_keys_inner import WalletDtoKeysInner diff --git a/clients/python/wallets_client/affinidi_tdk_wallets_client/models/sign_credential400_response.py b/clients/python/wallets_client/affinidi_tdk_wallets_client/models/sign_credential400_response.py new file mode 100644 index 00000000..58e23955 --- /dev/null +++ b/clients/python/wallets_client/affinidi_tdk_wallets_client/models/sign_credential400_response.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + CloudWalletEssentials + + Cloud Wallet For Enterprise Structure + + The version of the OpenAPI document: 1.0.0 + Contact: nucleus.team@affinidi.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 + +from typing import Any, List, Optional +from pydantic import BaseModel, Field, StrictStr, ValidationError, validator +from affinidi_tdk_wallets_client.models.invalid_parameter_error import InvalidParameterError +from affinidi_tdk_wallets_client.models.signing_failed_error import SigningFailedError +from typing import Union, Any, List, TYPE_CHECKING +from pydantic import StrictStr, Field + +SIGNCREDENTIAL400RESPONSE_ONE_OF_SCHEMAS = ["InvalidParameterError", "SigningFailedError"] + +class SignCredential400Response(BaseModel): + """ + SignCredential400Response + """ + # data type: InvalidParameterError + oneof_schema_1_validator: Optional[InvalidParameterError] = None + # data type: SigningFailedError + oneof_schema_2_validator: Optional[SigningFailedError] = None + if TYPE_CHECKING: + actual_instance: Union[InvalidParameterError, SigningFailedError] + else: + actual_instance: Any + one_of_schemas: List[str] = Field(SIGNCREDENTIAL400RESPONSE_ONE_OF_SCHEMAS, const=True) + + class Config: + validate_assignment = True + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SignCredential400Response.construct() + error_messages = [] + match = 0 + # validate data type: InvalidParameterError + if not isinstance(v, InvalidParameterError): + error_messages.append(f"Error! Input type `{type(v)}` is not `InvalidParameterError`") + else: + match += 1 + # validate data type: SigningFailedError + if not isinstance(v, SigningFailedError): + error_messages.append(f"Error! Input type `{type(v)}` is not `SigningFailedError`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SignCredential400Response with oneOf schemas: InvalidParameterError, SigningFailedError. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SignCredential400Response with oneOf schemas: InvalidParameterError, SigningFailedError. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: dict) -> SignCredential400Response: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> SignCredential400Response: + """Returns the object represented by the json string""" + instance = SignCredential400Response.construct() + error_messages = [] + match = 0 + + # deserialize data into InvalidParameterError + try: + instance.actual_instance = InvalidParameterError.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SigningFailedError + try: + instance.actual_instance = SigningFailedError.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SignCredential400Response with oneOf schemas: InvalidParameterError, SigningFailedError. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SignCredential400Response with oneOf schemas: InvalidParameterError, SigningFailedError. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + to_json = getattr(self.actual_instance, "to_json", None) + if callable(to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + to_dict = getattr(self.actual_instance, "to_dict", None) + if callable(to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.dict()) + + diff --git a/clients/python/wallets_client/affinidi_tdk_wallets_client/models/signing_failed_error.py b/clients/python/wallets_client/affinidi_tdk_wallets_client/models/signing_failed_error.py new file mode 100644 index 00000000..09dddf04 --- /dev/null +++ b/clients/python/wallets_client/affinidi_tdk_wallets_client/models/signing_failed_error.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + CloudWalletEssentials + + Cloud Wallet For Enterprise Structure + + The version of the OpenAPI document: 1.0.0 + Contact: nucleus.team@affinidi.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import List, Optional, Union +from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, validator +from affinidi_tdk_wallets_client.models.service_error_response_details_inner import ServiceErrorResponseDetailsInner + +class SigningFailedError(BaseModel): + """ + SigningFailedError + """ + name: StrictStr = Field(...) + message: StrictStr = Field(...) + http_status_code: Union[StrictFloat, StrictInt] = Field(..., alias="httpStatusCode") + trace_id: StrictStr = Field(..., alias="traceId") + details: Optional[conlist(ServiceErrorResponseDetailsInner)] = None + __properties = ["name", "message", "httpStatusCode", "traceId", "details"] + + @validator('name') + def name_validate_enum(cls, value): + """Validates the enum""" + if value not in ('SigningFailedError'): + raise ValueError("must be one of enum values ('SigningFailedError')") + return value + + @validator('message') + def message_validate_enum(cls, value): + """Validates the enum""" + if value not in ('Signing failed.'): + raise ValueError("must be one of enum values ('Signing failed.')") + return value + + @validator('http_status_code') + def http_status_code_validate_enum(cls, value): + """Validates the enum""" + if value not in (400): + raise ValueError("must be one of enum values (400)") + return value + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SigningFailedError: + """Create an instance of SigningFailedError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in details (list) + _items = [] + if self.details: + for _item in self.details: + if _item: + _items.append(_item.to_dict()) + _dict['details'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SigningFailedError: + """Create an instance of SigningFailedError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SigningFailedError.parse_obj(obj) + + _obj = SigningFailedError.parse_obj({ + "name": obj.get("name"), + "message": obj.get("message"), + "http_status_code": obj.get("httpStatusCode"), + "trace_id": obj.get("traceId"), + "details": [ServiceErrorResponseDetailsInner.from_dict(_item) for _item in obj.get("details")] if obj.get("details") is not None else None + }) + return _obj + + diff --git a/clients/python/wallets_client/docs/SignCredential400Response.md b/clients/python/wallets_client/docs/SignCredential400Response.md new file mode 100644 index 00000000..68a79ad0 --- /dev/null +++ b/clients/python/wallets_client/docs/SignCredential400Response.md @@ -0,0 +1,31 @@ +# SignCredential400Response + +## Properties + +| Name | Type | Description | Notes | +| -------------------- | --------------------------------------------------------------------------------- | ----------- | ---------- | +| **name** | **str** | | +| **message** | **str** | | +| **http_status_code** | **float** | | +| **trace_id** | **str** | | +| **details** | [**List[ServiceErrorResponseDetailsInner]**](ServiceErrorResponseDetailsInner.md) | | [optional] | + +## Example + +```python +from affinidi_tdk_wallets_client.models.sign_credential400_response import SignCredential400Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SignCredential400Response from a JSON string +sign_credential400_response_instance = SignCredential400Response.from_json(json) +# print the JSON string representation of the object +print SignCredential400Response.to_json() + +# convert the object into a dict +sign_credential400_response_dict = sign_credential400_response_instance.to_dict() +# create an instance of SignCredential400Response from a dict +sign_credential400_response_form_dict = sign_credential400_response.from_dict(sign_credential400_response_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/python/wallets_client/docs/SigningFailedError.md b/clients/python/wallets_client/docs/SigningFailedError.md new file mode 100644 index 00000000..1fe35a9c --- /dev/null +++ b/clients/python/wallets_client/docs/SigningFailedError.md @@ -0,0 +1,31 @@ +# SigningFailedError + +## Properties + +| Name | Type | Description | Notes | +| -------------------- | --------------------------------------------------------------------------------- | ----------- | ---------- | +| **name** | **str** | | +| **message** | **str** | | +| **http_status_code** | **float** | | +| **trace_id** | **str** | | +| **details** | [**List[ServiceErrorResponseDetailsInner]**](ServiceErrorResponseDetailsInner.md) | | [optional] | + +## Example + +```python +from affinidi_tdk_wallets_client.models.signing_failed_error import SigningFailedError + +# TODO update the JSON string below +json = "{}" +# create an instance of SigningFailedError from a JSON string +signing_failed_error_instance = SigningFailedError.from_json(json) +# print the JSON string representation of the object +print SigningFailedError.to_json() + +# convert the object into a dict +signing_failed_error_dict = signing_failed_error_instance.to_dict() +# create an instance of SigningFailedError from a dict +signing_failed_error_form_dict = signing_failed_error.from_dict(signing_failed_error_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/python/wallets_client/test/test_sign_credential400_response.py b/clients/python/wallets_client/test/test_sign_credential400_response.py new file mode 100644 index 00000000..b6f10240 --- /dev/null +++ b/clients/python/wallets_client/test/test_sign_credential400_response.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + CloudWalletEssentials + + Cloud Wallet For Enterprise Structure + + The version of the OpenAPI document: 1.0.0 + Contact: nucleus.team@affinidi.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from affinidi_tdk_wallets_client.models.sign_credential400_response import SignCredential400Response # noqa: E501 + +class TestSignCredential400Response(unittest.TestCase): + """SignCredential400Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SignCredential400Response: + """Test SignCredential400Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SignCredential400Response` + """ + model = SignCredential400Response() # noqa: E501 + if include_optional: + return SignCredential400Response( + name = 'SigningFailedError', + message = 'Signing failed.', + http_status_code = 400, + trace_id = '', + details = [ + affinidi_tdk_wallets_client.models.service_error_response_details_inner.ServiceErrorResponse_details_inner( + issue = '', + field = '', + value = '', + location = '', ) + ] + ) + else: + return SignCredential400Response( + name = 'SigningFailedError', + message = 'Signing failed.', + http_status_code = 400, + trace_id = '', + ) + """ + + def testSignCredential400Response(self): + """Test SignCredential400Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/wallets_client/test/test_signing_failed_error.py b/clients/python/wallets_client/test/test_signing_failed_error.py new file mode 100644 index 00000000..d3c59b91 --- /dev/null +++ b/clients/python/wallets_client/test/test_signing_failed_error.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + CloudWalletEssentials + + Cloud Wallet For Enterprise Structure + + The version of the OpenAPI document: 1.0.0 + Contact: nucleus.team@affinidi.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from affinidi_tdk_wallets_client.models.signing_failed_error import SigningFailedError # noqa: E501 + +class TestSigningFailedError(unittest.TestCase): + """SigningFailedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SigningFailedError: + """Test SigningFailedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SigningFailedError` + """ + model = SigningFailedError() # noqa: E501 + if include_optional: + return SigningFailedError( + name = 'SigningFailedError', + message = 'Signing failed.', + http_status_code = 400, + trace_id = '', + details = [ + affinidi_tdk_wallets_client.models.service_error_response_details_inner.ServiceErrorResponse_details_inner( + issue = '', + field = '', + value = '', + location = '', ) + ] + ) + else: + return SigningFailedError( + name = 'SigningFailedError', + message = 'Signing failed.', + http_status_code = 400, + trace_id = '', + ) + """ + + def testSigningFailedError(self): + """Test SigningFailedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/clients/typescript/credential-issuance-client/api.ts b/clients/typescript/credential-issuance-client/api.ts index eae492ed..34cb8a3b 100644 --- a/clients/typescript/credential-issuance-client/api.ts +++ b/clients/typescript/credential-issuance-client/api.ts @@ -1030,10 +1030,10 @@ export interface IssuanceConfigDto { issuerUri?: string /** * - * @type {Array} + * @type {Array} * @memberof IssuanceConfigDto */ - credentialSupported?: Array + credentialSupported?: Array /** * Issuer public information wallet may want to show to user during consent confirmation * @type {{ [key: string]: any; }} @@ -1055,6 +1055,31 @@ export const IssuanceConfigDtoFormatEnum = { export type IssuanceConfigDtoFormatEnum = (typeof IssuanceConfigDtoFormatEnum)[keyof typeof IssuanceConfigDtoFormatEnum] +/** + * + * @export + * @interface IssuanceConfigDtoCredentialSupportedInner + */ +export interface IssuanceConfigDtoCredentialSupportedInner { + /** + * It is a String that identifies a Credential that is being requested to be issued. + * @type {string} + * @memberof IssuanceConfigDtoCredentialSupportedInner + */ + credentialTypeId: string + /** + * credential jsonLdContextUrl + * @type {string} + * @memberof IssuanceConfigDtoCredentialSupportedInner + */ + jsonSchemaUrl: string + /** + * credential jsonSchemaUrl + * @type {string} + * @memberof IssuanceConfigDtoCredentialSupportedInner + */ + jsonLdContextUrl: string +} /** * * @export @@ -1422,6 +1447,25 @@ export interface StartIssuanceInputDataInner { * @memberof StartIssuanceInputDataInner */ credentialData: { [key: string]: any } + /** + * + * @type {StartIssuanceInputDataInnerMetaData} + * @memberof StartIssuanceInputDataInner + */ + metaData?: StartIssuanceInputDataInnerMetaData +} +/** + * Object of metadata to be included in the additionalProperties related to vc + * @export + * @interface StartIssuanceInputDataInnerMetaData + */ +export interface StartIssuanceInputDataInnerMetaData { + /** + * Date and time when the credential will expire + * @type {string} + * @memberof StartIssuanceInputDataInnerMetaData + */ + expirationDate: string } /** * @@ -1591,10 +1635,10 @@ export interface WellKnownOpenIdCredentialIssuerResponse { credential_issuer?: string /** * - * @type {Array} + * @type {Array} * @memberof WellKnownOpenIdCredentialIssuerResponse */ - credentials_supported?: Array + credentials_supported?: Array /** * * @type {string} diff --git a/clients/typescript/credential-issuance-client/docs/.openapi-generator/FILES b/clients/typescript/credential-issuance-client/docs/.openapi-generator/FILES index 3689ecf7..1dce6864 100644 --- a/clients/typescript/credential-issuance-client/docs/.openapi-generator/FILES +++ b/clients/typescript/credential-issuance-client/docs/.openapi-generator/FILES @@ -30,6 +30,7 @@ Models/InvalidJwtTokenError.md Models/InvalidParameterError.md Models/InvalidProofError.md Models/IssuanceConfigDto.md +Models/IssuanceConfigDto_credentialSupported_inner.md Models/IssuanceConfigListResponse.md Models/IssuanceConfigMiniDto.md Models/IssuanceStateResponse.md @@ -39,6 +40,7 @@ Models/ProjectCredentialConfigExistError.md Models/ProjectCredentialConfigNotExistError.md Models/StartIssuanceInput.md Models/StartIssuanceInput_data_inner.md +Models/StartIssuanceInput_data_inner_metaData.md Models/StartIssuanceResponse.md Models/UpdateIssuanceConfigInput.md Models/VcClaimedError.md diff --git a/clients/typescript/credential-issuance-client/docs/Models/IssuanceConfigDto.md b/clients/typescript/credential-issuance-client/docs/Models/IssuanceConfigDto.md index f845f4a3..fc05070b 100644 --- a/clients/typescript/credential-issuance-client/docs/Models/IssuanceConfigDto.md +++ b/clients/typescript/credential-issuance-client/docs/Models/IssuanceConfigDto.md @@ -2,17 +2,17 @@ ## Properties -| Name | Type | Description | Notes | -| --------------------------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | -| **id** | **String** | | [optional] [default to null] | -| **issuerDid** | **String** | Issuer DID | [optional] [default to null] | -| **issuerWalletId** | **String** | Issuer Wallet id | [optional] [default to null] | -| **credentialOfferDuration** | **BigDecimal** | credential offer duration in second | [optional] [default to null] | -| **cNonceDuration** | **BigDecimal** | c_nonce duration in second | [optional] [default to null] | -| **format** | **String** | String identifying the format of this Credential, i.e., jwt_vc_json-ld or ldp_vc. Depending on the format value, the object contains further elements defining the type | [optional] [default to null] | -| **issuerUri** | **String** | Issuer URI | [optional] [default to null] | -| **credentialSupported** | [**List**](CreateIssuanceConfigInput_credentialSupported_inner.md) | | [optional] [default to null] | -| **issuerMetadata** | [**Map**](AnyType.md) | Issuer public information wallet may want to show to user during consent confirmation | [optional] [default to null] | -| **version** | **BigDecimal** | | [optional] [default to null] | +| Name | Type | Description | Notes | +| --------------------------- | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | +| **id** | **String** | | [optional] [default to null] | +| **issuerDid** | **String** | Issuer DID | [optional] [default to null] | +| **issuerWalletId** | **String** | Issuer Wallet id | [optional] [default to null] | +| **credentialOfferDuration** | **BigDecimal** | credential offer duration in second | [optional] [default to null] | +| **cNonceDuration** | **BigDecimal** | c_nonce duration in second | [optional] [default to null] | +| **format** | **String** | String identifying the format of this Credential, i.e., jwt_vc_json-ld or ldp_vc. Depending on the format value, the object contains further elements defining the type | [optional] [default to null] | +| **issuerUri** | **String** | Issuer URI | [optional] [default to null] | +| **credentialSupported** | [**List**](IssuanceConfigDto_credentialSupported_inner.md) | | [optional] [default to null] | +| **issuerMetadata** | [**Map**](AnyType.md) | Issuer public information wallet may want to show to user during consent confirmation | [optional] [default to null] | +| **version** | **BigDecimal** | | [optional] [default to null] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/typescript/credential-issuance-client/docs/Models/IssuanceConfigDto_credentialSupported_inner.md b/clients/typescript/credential-issuance-client/docs/Models/IssuanceConfigDto_credentialSupported_inner.md new file mode 100644 index 00000000..3244926e --- /dev/null +++ b/clients/typescript/credential-issuance-client/docs/Models/IssuanceConfigDto_credentialSupported_inner.md @@ -0,0 +1,11 @@ +# IssuanceConfigDto_credentialSupported_inner + +## Properties + +| Name | Type | Description | Notes | +| -------------------- | ---------- | --------------------------------------------------------------------------------- | ----------------- | +| **credentialTypeId** | **String** | It is a String that identifies a Credential that is being requested to be issued. | [default to null] | +| **jsonSchemaUrl** | **String** | credential jsonLdContextUrl | [default to null] | +| **jsonLdContextUrl** | **String** | credential jsonSchemaUrl | [default to null] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/typescript/credential-issuance-client/docs/Models/StartIssuanceInput_data_inner.md b/clients/typescript/credential-issuance-client/docs/Models/StartIssuanceInput_data_inner.md index 9decd2c9..e955778d 100644 --- a/clients/typescript/credential-issuance-client/docs/Models/StartIssuanceInput_data_inner.md +++ b/clients/typescript/credential-issuance-client/docs/Models/StartIssuanceInput_data_inner.md @@ -2,9 +2,10 @@ ## Properties -| Name | Type | Description | Notes | -| -------------------- | --------------------- | ---------------------------------------------------------------------------------------- | ----------------- | -| **credentialTypeId** | **String** | It is a String that identifies a Credential that is being requested to be issued. | [default to null] | -| **credentialData** | [**Map**](AnyType.md) | Object of data to be included in the issued credential ,should match the credential type | [default to null] | +| Name | Type | Description | Notes | +| -------------------- | --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------- | +| **credentialTypeId** | **String** | It is a String that identifies a Credential that is being requested to be issued. | [default to null] | +| **credentialData** | [**Map**](AnyType.md) | Object of data to be included in the issued credential ,should match the credential type | [default to null] | +| **metaData** | [**StartIssuanceInput_data_inner_metaData**](StartIssuanceInput_data_inner_metaData.md) | | [optional] [default to null] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/typescript/credential-issuance-client/docs/Models/StartIssuanceInput_data_inner_metaData.md b/clients/typescript/credential-issuance-client/docs/Models/StartIssuanceInput_data_inner_metaData.md new file mode 100644 index 00000000..4eef9704 --- /dev/null +++ b/clients/typescript/credential-issuance-client/docs/Models/StartIssuanceInput_data_inner_metaData.md @@ -0,0 +1,9 @@ +# StartIssuanceInput_data_inner_metaData + +## Properties + +| Name | Type | Description | Notes | +| ------------------ | -------- | --------------------------------------------- | ----------------- | +| **expirationDate** | **Date** | Date and time when the credential will expire | [default to null] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/typescript/credential-issuance-client/docs/Models/WellKnownOpenIdCredentialIssuerResponse.md b/clients/typescript/credential-issuance-client/docs/Models/WellKnownOpenIdCredentialIssuerResponse.md index aecf226c..7d2d46d0 100644 --- a/clients/typescript/credential-issuance-client/docs/Models/WellKnownOpenIdCredentialIssuerResponse.md +++ b/clients/typescript/credential-issuance-client/docs/Models/WellKnownOpenIdCredentialIssuerResponse.md @@ -2,17 +2,17 @@ ## Properties -| Name | Type | Description | Notes | -| ----------------------------------------- | ------------------------------------------------------------------ | ----------- | ---------------------------- | -| **authorization_endpoint** | **String** | | [optional] [default to null] | -| **credential_endpoint** | **String** | | [optional] [default to null] | -| **credential_issuer** | **String** | | [optional] [default to null] | -| **credentials_supported** | [**List**](CreateIssuanceConfigInput_credentialSupported_inner.md) | | [optional] [default to null] | -| **deferred_credential_endpoint** | **String** | | [optional] [default to null] | -| **grant_types_supported** | **List** | | [optional] [default to null] | -| **jwks_uri** | **String** | | [optional] [default to null] | -| **scopes_supported** | **List** | | [optional] [default to null] | -| **token_endpoint** | **String** | | [optional] [default to null] | -| **token_endpoint_auth_methods_supported** | **List** | | [optional] [default to null] | +| Name | Type | Description | Notes | +| ----------------------------------------- | ---------------------------------------------------------- | ----------- | ---------------------------- | +| **authorization_endpoint** | **String** | | [optional] [default to null] | +| **credential_endpoint** | **String** | | [optional] [default to null] | +| **credential_issuer** | **String** | | [optional] [default to null] | +| **credentials_supported** | [**List**](IssuanceConfigDto_credentialSupported_inner.md) | | [optional] [default to null] | +| **deferred_credential_endpoint** | **String** | | [optional] [default to null] | +| **grant_types_supported** | **List** | | [optional] [default to null] | +| **jwks_uri** | **String** | | [optional] [default to null] | +| **scopes_supported** | **List** | | [optional] [default to null] | +| **token_endpoint** | **String** | | [optional] [default to null] | +| **token_endpoint_auth_methods_supported** | **List** | | [optional] [default to null] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/typescript/credential-issuance-client/docs/README.md b/clients/typescript/credential-issuance-client/docs/README.md index 8b34831a..75aa8564 100644 --- a/clients/typescript/credential-issuance-client/docs/README.md +++ b/clients/typescript/credential-issuance-client/docs/README.md @@ -51,6 +51,7 @@ All URIs are relative to _http://localhost_ - [InvalidParameterError](./Models/InvalidParameterError.md) - [InvalidProofError](./Models/InvalidProofError.md) - [IssuanceConfigDto](./Models/IssuanceConfigDto.md) +- [IssuanceConfigDto_credentialSupported_inner](./Models/IssuanceConfigDto_credentialSupported_inner.md) - [IssuanceConfigListResponse](./Models/IssuanceConfigListResponse.md) - [IssuanceConfigMiniDto](./Models/IssuanceConfigMiniDto.md) - [IssuanceStateResponse](./Models/IssuanceStateResponse.md) @@ -60,6 +61,7 @@ All URIs are relative to _http://localhost_ - [ProjectCredentialConfigNotExistError](./Models/ProjectCredentialConfigNotExistError.md) - [StartIssuanceInput](./Models/StartIssuanceInput.md) - [StartIssuanceInput_data_inner](./Models/StartIssuanceInput_data_inner.md) +- [StartIssuanceInput_data_inner_metaData](./Models/StartIssuanceInput_data_inner_metaData.md) - [StartIssuanceResponse](./Models/StartIssuanceResponse.md) - [UpdateIssuanceConfigInput](./Models/UpdateIssuanceConfigInput.md) - [VcClaimedError](./Models/VcClaimedError.md) diff --git a/clients/typescript/credential-issuance-client/package.json b/clients/typescript/credential-issuance-client/package.json index df9f781c..25331adc 100644 --- a/clients/typescript/credential-issuance-client/package.json +++ b/clients/typescript/credential-issuance-client/package.json @@ -1,6 +1,6 @@ { "name": "@affinidi-tdk/credential-issuance-client", - "version": "1.5.0", + "version": "1.0.0", "description": "Affinidi TDK typescript client for Affinidi CREDENTIAL ISSUANCE", "author": "Affinidi", "repository": { diff --git a/clients/typescript/credential-verification-client/api.ts b/clients/typescript/credential-verification-client/api.ts index 8460d1ab..3e2f7443 100644 --- a/clients/typescript/credential-verification-client/api.ts +++ b/clients/typescript/credential-verification-client/api.ts @@ -1585,166 +1585,3 @@ export class DefaultApi extends BaseAPI { .then((request) => request(this.axios, this.basePath)) } } - -/** - * VerifierApi - axios parameter creator - * @export - */ -export const VerifierApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Validates JWT object. returns isValid: boolean payload: payload from JWT - * @summary Validates JWT token - * @param {ValidateJwtInput} validateJwtInput ValidateJwt - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - validateJwt: async ( - validateJwtInput: ValidateJwtInput, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'validateJwtInput' is not null or undefined - assertParamExists('validateJwt', 'validateJwtInput', validateJwtInput) - const localVarPath = `/v1/verifier/validate-jwt` - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: 'POST', - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - // authentication ProjectTokenAuth required - await setApiKeyToObject( - localVarHeaderParameter, - 'authorization', - configuration, - ) - - localVarHeaderParameter['Content-Type'] = 'application/json' - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - localVarRequestOptions.data = serializeDataIfNeeded( - validateJwtInput, - localVarRequestOptions, - configuration, - ) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - } -} - -/** - * VerifierApi - functional programming interface - * @export - */ -export const VerifierApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = VerifierApiAxiosParamCreator(configuration) - return { - /** - * Validates JWT object. returns isValid: boolean payload: payload from JWT - * @summary Validates JWT token - * @param {ValidateJwtInput} validateJwtInput ValidateJwt - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async validateJwt( - validateJwtInput: ValidateJwtInput, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.validateJwt( - validateJwtInput, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap['VerifierApi.validateJwt']?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, - } -} - -/** - * VerifierApi - factory interface - * @export - */ -export const VerifierApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = VerifierApiFp(configuration) - return { - /** - * Validates JWT object. returns isValid: boolean payload: payload from JWT - * @summary Validates JWT token - * @param {ValidateJwtInput} validateJwtInput ValidateJwt - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - validateJwt( - validateJwtInput: ValidateJwtInput, - options?: any, - ): AxiosPromise { - return localVarFp - .validateJwt(validateJwtInput, options) - .then((request) => request(axios, basePath)) - }, - } -} - -/** - * VerifierApi - object-oriented interface - * @export - * @class VerifierApi - * @extends {BaseAPI} - */ -export class VerifierApi extends BaseAPI { - /** - * Validates JWT object. returns isValid: boolean payload: payload from JWT - * @summary Validates JWT token - * @param {ValidateJwtInput} validateJwtInput ValidateJwt - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof VerifierApi - */ - public validateJwt( - validateJwtInput: ValidateJwtInput, - options?: RawAxiosRequestConfig, - ) { - return VerifierApiFp(this.configuration) - .validateJwt(validateJwtInput, options) - .then((request) => request(this.axios, this.basePath)) - } -} diff --git a/clients/typescript/credential-verification-client/docs/.openapi-generator/FILES b/clients/typescript/credential-verification-client/docs/.openapi-generator/FILES index 30091191..1b61261c 100644 --- a/clients/typescript/credential-verification-client/docs/.openapi-generator/FILES +++ b/clients/typescript/credential-verification-client/docs/.openapi-generator/FILES @@ -1,5 +1,4 @@ Apis/DefaultApi.md -Apis/VerifierApi.md Models/Constraints.md Models/Constraints_statuses.md Models/CredentialRequirements.md diff --git a/clients/typescript/credential-verification-client/docs/README.md b/clients/typescript/credential-verification-client/docs/README.md index e90763d5..17b4bea8 100644 --- a/clients/typescript/credential-verification-client/docs/README.md +++ b/clients/typescript/credential-verification-client/docs/README.md @@ -6,11 +6,10 @@ All URIs are relative to _http://localhost_ -| Class | Method | HTTP request | Description | -| ------------- | --------------------------------------------------------------- | ---------------------------------- | ------------------- | -| _DefaultApi_ | [**verifyCredentials**](Apis/DefaultApi.md#verifycredentials) | **POST** /v1/verifier/verify-vcs | Verifying VC | -| _DefaultApi_ | [**verifyPresentation**](Apis/DefaultApi.md#verifypresentation) | **POST** /v1/verifier/verify-vp | Verifying VP | -| _VerifierApi_ | [**validateJwt**](Apis/VerifierApi.md#validatejwt) | **POST** /v1/verifier/validate-jwt | Validates JWT token | +| Class | Method | HTTP request | Description | +| ------------ | --------------------------------------------------------------- | -------------------------------- | ------------ | +| _DefaultApi_ | [**verifyCredentials**](Apis/DefaultApi.md#verifycredentials) | **POST** /v1/verifier/verify-vcs | Verifying VC | +| _DefaultApi_ | [**verifyPresentation**](Apis/DefaultApi.md#verifypresentation) | **POST** /v1/verifier/verify-vp | Verifying VP | diff --git a/clients/typescript/credential-verification-client/package.json b/clients/typescript/credential-verification-client/package.json index 84273a5f..7694b648 100644 --- a/clients/typescript/credential-verification-client/package.json +++ b/clients/typescript/credential-verification-client/package.json @@ -1,6 +1,6 @@ { "name": "@affinidi-tdk/credential-verification-client", - "version": "1.5.0", + "version": "1.0.0", "description": "Affinidi TDK typescript client for Affinidi CREDENTIAL VERIFICATION", "author": "Affinidi", "repository": { diff --git a/clients/typescript/iam-client/package.json b/clients/typescript/iam-client/package.json index 03178cb2..a001edb5 100644 --- a/clients/typescript/iam-client/package.json +++ b/clients/typescript/iam-client/package.json @@ -1,6 +1,6 @@ { "name": "@affinidi-tdk/iam-client", - "version": "1.5.0", + "version": "1.0.0", "description": "Affinidi TDK typescript client for Affinidi IAM", "author": "Affinidi", "repository": { diff --git a/clients/typescript/iota-client/package.json b/clients/typescript/iota-client/package.json index 0e61ceba..b23283a3 100644 --- a/clients/typescript/iota-client/package.json +++ b/clients/typescript/iota-client/package.json @@ -1,6 +1,6 @@ { "name": "@affinidi-tdk/iota-client", - "version": "1.1.0", + "version": "1.0.0", "description": "Affinidi TDK typescript client for Affinidi IOTA", "author": "Affinidi", "repository": { diff --git a/clients/typescript/login-configuration-client/package.json b/clients/typescript/login-configuration-client/package.json index 220a2767..5db82c1f 100644 --- a/clients/typescript/login-configuration-client/package.json +++ b/clients/typescript/login-configuration-client/package.json @@ -1,6 +1,6 @@ { "name": "@affinidi-tdk/login-configuration-client", - "version": "1.7.0", + "version": "1.0.0", "description": "Affinidi TDK typescript client for Affinidi LOGIN CONFIGURATION", "author": "Affinidi", "repository": { diff --git a/clients/typescript/wallets-client/api.ts b/clients/typescript/wallets-client/api.ts index 46392963..add4262b 100644 --- a/clients/typescript/wallets-client/api.ts +++ b/clients/typescript/wallets-client/api.ts @@ -580,6 +580,14 @@ export interface ServiceErrorResponseDetailsInner { */ location?: string } +/** + * @type SignCredential400Response + * @export + */ +export type SignCredential400Response = + | InvalidParameterError + | SigningFailedError + /** * DTO contains params to sign credential * @export @@ -693,6 +701,63 @@ export interface SignJwtTokenOK { */ signedJwt?: string } +/** + * + * @export + * @interface SigningFailedError + */ +export interface SigningFailedError { + /** + * + * @type {string} + * @memberof SigningFailedError + */ + name: SigningFailedErrorNameEnum + /** + * + * @type {string} + * @memberof SigningFailedError + */ + message: SigningFailedErrorMessageEnum + /** + * + * @type {number} + * @memberof SigningFailedError + */ + httpStatusCode: SigningFailedErrorHttpStatusCodeEnum + /** + * + * @type {string} + * @memberof SigningFailedError + */ + traceId: string + /** + * + * @type {Array} + * @memberof SigningFailedError + */ + details?: Array +} + +export const SigningFailedErrorNameEnum = { + SigningFailedError: 'SigningFailedError', +} as const + +export type SigningFailedErrorNameEnum = + (typeof SigningFailedErrorNameEnum)[keyof typeof SigningFailedErrorNameEnum] +export const SigningFailedErrorMessageEnum = { + SigningFailed: 'Signing failed.', +} as const + +export type SigningFailedErrorMessageEnum = + (typeof SigningFailedErrorMessageEnum)[keyof typeof SigningFailedErrorMessageEnum] +export const SigningFailedErrorHttpStatusCodeEnum = { + NUMBER_400: 400, +} as const + +export type SigningFailedErrorHttpStatusCodeEnum = + (typeof SigningFailedErrorHttpStatusCodeEnum)[keyof typeof SigningFailedErrorHttpStatusCodeEnum] + /** * Update wallet input params * @export diff --git a/clients/typescript/wallets-client/docs/.openapi-generator/FILES b/clients/typescript/wallets-client/docs/.openapi-generator/FILES index 9771d3db..5757a9c9 100644 --- a/clients/typescript/wallets-client/docs/.openapi-generator/FILES +++ b/clients/typescript/wallets-client/docs/.openapi-generator/FILES @@ -21,8 +21,10 @@ Models/SignCredentialInputDto_unsignedCredentialParams.md Models/SignCredentialResultDto.md Models/SignJwtToken.md Models/SignJwtTokenOK.md +Models/SigningFailedError.md Models/UpdateWalletInput.md Models/WalletDto.md Models/WalletDto_keys_inner.md Models/WalletsListDto.md +Models/signCredential_400_response.md README.md diff --git a/clients/typescript/wallets-client/docs/Models/SigningFailedError.md b/clients/typescript/wallets-client/docs/Models/SigningFailedError.md new file mode 100644 index 00000000..d39077d0 --- /dev/null +++ b/clients/typescript/wallets-client/docs/Models/SigningFailedError.md @@ -0,0 +1,13 @@ +# SigningFailedError + +## Properties + +| Name | Type | Description | Notes | +| ------------------ | ------------------------------------------------- | ----------- | ---------------------------- | +| **name** | **String** | | [default to null] | +| **message** | **String** | | [default to null] | +| **httpStatusCode** | **BigDecimal** | | [default to null] | +| **traceId** | **String** | | [default to null] | +| **details** | [**List**](ServiceErrorResponse_details_inner.md) | | [optional] [default to null] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/typescript/wallets-client/docs/Models/signCredential_400_response.md b/clients/typescript/wallets-client/docs/Models/signCredential_400_response.md new file mode 100644 index 00000000..5b557f6a --- /dev/null +++ b/clients/typescript/wallets-client/docs/Models/signCredential_400_response.md @@ -0,0 +1,13 @@ +# signCredential_400_response + +## Properties + +| Name | Type | Description | Notes | +| ------------------ | ------------------------------------------------- | ----------- | ---------------------------- | +| **name** | **String** | | [default to null] | +| **message** | **String** | | [default to null] | +| **httpStatusCode** | **BigDecimal** | | [default to null] | +| **traceId** | **String** | | [default to null] | +| **details** | [**List**](ServiceErrorResponse_details_inner.md) | | [optional] [default to null] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/typescript/wallets-client/docs/README.md b/clients/typescript/wallets-client/docs/README.md index 56bd8f02..b59b640b 100644 --- a/clients/typescript/wallets-client/docs/README.md +++ b/clients/typescript/wallets-client/docs/README.md @@ -43,10 +43,12 @@ All URIs are relative to _http://localhost_ - [SignCredentialResultDto](./Models/SignCredentialResultDto.md) - [SignJwtToken](./Models/SignJwtToken.md) - [SignJwtTokenOK](./Models/SignJwtTokenOK.md) +- [SigningFailedError](./Models/SigningFailedError.md) - [UpdateWalletInput](./Models/UpdateWalletInput.md) - [WalletDto](./Models/WalletDto.md) - [WalletDto_keys_inner](./Models/WalletDto_keys_inner.md) - [WalletsListDto](./Models/WalletsListDto.md) +- [signCredential_400_response](./Models/signCredential_400_response.md) diff --git a/clients/typescript/wallets-client/package.json b/clients/typescript/wallets-client/package.json index 0e591b70..760767a2 100644 --- a/clients/typescript/wallets-client/package.json +++ b/clients/typescript/wallets-client/package.json @@ -1,6 +1,6 @@ { "name": "@affinidi-tdk/wallets-client", - "version": "1.4.0", + "version": "1.0.0", "description": "Affinidi TDK typescript client for Affinidi WALLETS", "author": "Affinidi", "repository": { diff --git a/package-lock.json b/package-lock.json index efe7277c..9d8e539c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18331,7 +18331,7 @@ }, "packages/auth-provider": { "name": "@affinidi-tdk/auth-provider", - "version": "1.1.0", + "version": "1.2.0", "bundleDependencies": [ "axios", "jsonwebtoken",