Skip to content

Commit

Permalink
feat: update all clients (#598)
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Rincon <carlos.r@affinidi.com>
  • Loading branch information
github-actions[bot] and carlos-affinidi authored Feb 27, 2025
1 parent 415bf48 commit e96811b
Show file tree
Hide file tree
Showing 22 changed files with 155 additions and 111 deletions.
2 changes: 1 addition & 1 deletion clients/dart/credential_issuance_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Affinidi TDK dart client for Affinidi CREDENTIAL ISSUANCE

## Requirements

- Dart 2.15.0+ or Flutter 2.8.0+
- Dart 2.15.0+
- Dio 5.0.0+ (https://pub.dev/packages/dio)

## Installation & Usage
Expand Down
2 changes: 1 addition & 1 deletion clients/dart/credential_verification_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Affinidi TDK dart client for Affinidi CREDENTIAL VERIFICATION

## Requirements

- Dart 2.15.0+ or Flutter 2.8.0+
- Dart 2.15.0+
- Dio 5.0.0+ (https://pub.dev/packages/dio)

## Installation & Usage
Expand Down
2 changes: 1 addition & 1 deletion clients/dart/iam_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Affinidi TDK dart client for Affinidi IAM

## Requirements

- Dart 2.15.0+ or Flutter 2.8.0+
- Dart 2.15.0+
- Dio 5.0.0+ (https://pub.dev/packages/dio)

## Installation & Usage
Expand Down
2 changes: 1 addition & 1 deletion clients/dart/iota_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Affinidi TDK dart client for Affinidi IOTA

## Requirements

- Dart 2.15.0+ or Flutter 2.8.0+
- Dart 2.15.0+
- Dio 5.0.0+ (https://pub.dev/packages/dio)

## Installation & Usage
Expand Down
2 changes: 1 addition & 1 deletion clients/dart/login_configuration_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Affinidi TDK dart client for Affinidi LOGIN CONFIGURATION

## Requirements

- Dart 2.15.0+ or Flutter 2.8.0+
- Dart 2.15.0+
- Dio 5.0.0+ (https://pub.dev/packages/dio)

## Installation & Usage
Expand Down
2 changes: 1 addition & 1 deletion clients/dart/vault_data_manager_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Affinidi TDK dart client for Affinidi VAULT DATA MANAGER

## Requirements

- Dart 2.15.0+ or Flutter 2.8.0+
- Dart 2.15.0+
- Dio 5.0.0+ (https://pub.dev/packages/dio)

## Installation & Usage
Expand Down
2 changes: 1 addition & 1 deletion clients/dart/wallets_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Affinidi TDK dart client for Affinidi WALLETS

## Requirements

- Dart 2.15.0+ or Flutter 2.8.0+
- Dart 2.15.0+
- Dio 5.0.0+ (https://pub.dev/packages/dio)

## Installation & Usage
Expand Down
20 changes: 16 additions & 4 deletions clients/java/credential.issuance.client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -728,13 +728,25 @@ paths:
schema:
type: string
style: form
- explode: true
- description: exclusiveStartKey for retrieving the next batch of data.
explode: true
in: query
name: next
name: exclusiveStartKey
required: false
schema:
maxLength: 3000
type: string
style: form
- explode: true
in: query
name: limit
required: false
schema:
default: 20
maximum: 20
minimum: 1
type: integer
style: form
responses:
'200':
content:
Expand Down Expand Up @@ -1576,10 +1588,10 @@ components:
additionalProperties: false
description: List of claimed credential
example:
next: next
credentials:
- key: ''
- key: ''
lastEvaluatedKey: lastEvaluatedKey
properties:
credentials:
description: list of credentials
Expand All @@ -1588,7 +1600,7 @@ components:
description: claimed credential
type: object
type: array
next:
lastEvaluatedKey:
description: for pagination to fetch next set of records
type: string
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ List of claimed credential

## Properties

| Name | Type | Description | Notes |
| --------------- | ----------------------------------------- | ------------------------------------------- | ---------- |
| **credentials** | **List&lt;Map&lt;String, Object&gt;&gt;** | list of credentials | [optional] |
| **next** | **String** | for pagination to fetch next set of records | [optional] |
| Name | Type | Description | Notes |
| -------------------- | ----------------------------------------- | ------------------------------------------- | ---------- |
| **credentials** | **List&lt;Map&lt;String, Object&gt;&gt;** | list of credentials | [optional] |
| **lastEvaluatedKey** | **String** | for pagination to fetch next set of records | [optional] |
22 changes: 12 additions & 10 deletions clients/java/credential.issuance.client/docs/CredentialsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class Example {

## getClaimedCredentials

> ClaimedCredentialListResponse getClaimedCredentials(projectId, configurationId, rangeStartTime, rangeEndTime, next)
> ClaimedCredentialListResponse getClaimedCredentials(projectId, configurationId, rangeStartTime, rangeEndTime, exclusiveStartKey, limit)
Get claimed credential in the specified range

Expand Down Expand Up @@ -114,9 +114,10 @@ public class Example {
String configurationId = "configurationId_example"; // String | configuration id
String rangeStartTime = "rangeStartTime_example"; // String |
String rangeEndTime = "rangeEndTime_example"; // String |
String next = "next_example"; // String |
String exclusiveStartKey = "exclusiveStartKey_example"; // String | exclusiveStartKey for retrieving the next batch of data.
Integer limit = 20; // Integer |
try {
ClaimedCredentialListResponse result = apiInstance.getClaimedCredentials(projectId, configurationId, rangeStartTime, rangeEndTime, next);
ClaimedCredentialListResponse result = apiInstance.getClaimedCredentials(projectId, configurationId, rangeStartTime, rangeEndTime, exclusiveStartKey, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CredentialsApi#getClaimedCredentials");
Expand All @@ -131,13 +132,14 @@ public class Example {

### Parameters

| Name | Type | Description | Notes |
| ------------------- | ---------- | ---------------- | ---------- |
| **projectId** | **String** | project id | |
| **configurationId** | **String** | configuration id | |
| **rangeStartTime** | **String** | | |
| **rangeEndTime** | **String** | | [optional] |
| **next** | **String** | | [optional] |
| Name | Type | Description | Notes |
| --------------------- | ----------- | -------------------------------------------------------- | -------------------------- |
| **projectId** | **String** | project id | |
| **configurationId** | **String** | configuration id | |
| **rangeStartTime** | **String** | | |
| **rangeEndTime** | **String** | | [optional] |
| **exclusiveStartKey** | **String** | exclusiveStartKey for retrieving the next batch of data. | [optional] |
| **limit** | **Integer** | | [optional] [default to 20] |

### Return type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,13 @@ public CredentialResponse generateCredentials(String projectId, CreateCredential
* @param configurationId configuration id (required)
* @param rangeStartTime (required)
* @param rangeEndTime (optional)
* @param next (optional)
* @param exclusiveStartKey exclusiveStartKey for retrieving the next batch of data. (optional)
* @param limit (optional, default to 20)
* @return ClaimedCredentialListResponse
* @throws ApiException if fails to make API call
*/
public ClaimedCredentialListResponse getClaimedCredentials(String projectId, String configurationId, String rangeStartTime, String rangeEndTime, String next) throws ApiException {
return this.getClaimedCredentials(projectId, configurationId, rangeStartTime, rangeEndTime, next, Collections.emptyMap());
public ClaimedCredentialListResponse getClaimedCredentials(String projectId, String configurationId, String rangeStartTime, String rangeEndTime, String exclusiveStartKey, Integer limit) throws ApiException {
return this.getClaimedCredentials(projectId, configurationId, rangeStartTime, rangeEndTime, exclusiveStartKey, limit, Collections.emptyMap());
}


Expand All @@ -153,12 +154,13 @@ public ClaimedCredentialListResponse getClaimedCredentials(String projectId, Str
* @param configurationId configuration id (required)
* @param rangeStartTime (required)
* @param rangeEndTime (optional)
* @param next (optional)
* @param exclusiveStartKey exclusiveStartKey for retrieving the next batch of data. (optional)
* @param limit (optional, default to 20)
* @param additionalHeaders additionalHeaders for this call
* @return ClaimedCredentialListResponse
* @throws ApiException if fails to make API call
*/
public ClaimedCredentialListResponse getClaimedCredentials(String projectId, String configurationId, String rangeStartTime, String rangeEndTime, String next, Map<String, String> additionalHeaders) throws ApiException {
public ClaimedCredentialListResponse getClaimedCredentials(String projectId, String configurationId, String rangeStartTime, String rangeEndTime, String exclusiveStartKey, Integer limit, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null;

// verify the required parameter 'projectId' is set
Expand Down Expand Up @@ -191,7 +193,8 @@ public ClaimedCredentialListResponse getClaimedCredentials(String projectId, Str

localVarQueryParams.addAll(apiClient.parameterToPair("rangeStartTime", rangeStartTime));
localVarQueryParams.addAll(apiClient.parameterToPair("rangeEndTime", rangeEndTime));
localVarQueryParams.addAll(apiClient.parameterToPair("next", next));
localVarQueryParams.addAll(apiClient.parameterToPair("exclusiveStartKey", exclusiveStartKey));
localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit));

localVarHeaderParams.putAll(additionalHeaders);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
*/
@JsonPropertyOrder({
ClaimedCredentialListResponse.JSON_PROPERTY_CREDENTIALS,
ClaimedCredentialListResponse.JSON_PROPERTY_NEXT
ClaimedCredentialListResponse.JSON_PROPERTY_LAST_EVALUATED_KEY
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.9.0")
public class ClaimedCredentialListResponse {
public static final String JSON_PROPERTY_CREDENTIALS = "credentials";
private List<Map<String, Object>> credentials = new ArrayList<>();

public static final String JSON_PROPERTY_NEXT = "next";
private String next;
public static final String JSON_PROPERTY_LAST_EVALUATED_KEY = "lastEvaluatedKey";
private String lastEvaluatedKey;

public ClaimedCredentialListResponse() {
}
Expand Down Expand Up @@ -81,29 +81,29 @@ public void setCredentials(List<Map<String, Object>> credentials) {
this.credentials = credentials;
}

public ClaimedCredentialListResponse next(String next) {
public ClaimedCredentialListResponse lastEvaluatedKey(String lastEvaluatedKey) {

this.next = next;
this.lastEvaluatedKey = lastEvaluatedKey;
return this;
}

/**
* for pagination to fetch next set of records
* @return next
* @return lastEvaluatedKey
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NEXT)
@JsonProperty(JSON_PROPERTY_LAST_EVALUATED_KEY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public String getNext() {
return next;
public String getLastEvaluatedKey() {
return lastEvaluatedKey;
}


@JsonProperty(JSON_PROPERTY_NEXT)
@JsonProperty(JSON_PROPERTY_LAST_EVALUATED_KEY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setNext(String next) {
this.next = next;
public void setLastEvaluatedKey(String lastEvaluatedKey) {
this.lastEvaluatedKey = lastEvaluatedKey;
}

@Override
Expand All @@ -116,20 +116,20 @@ public boolean equals(Object o) {
}
ClaimedCredentialListResponse claimedCredentialListResponse = (ClaimedCredentialListResponse) o;
return Objects.equals(this.credentials, claimedCredentialListResponse.credentials) &&
Objects.equals(this.next, claimedCredentialListResponse.next);
Objects.equals(this.lastEvaluatedKey, claimedCredentialListResponse.lastEvaluatedKey);
}

@Override
public int hashCode() {
return Objects.hash(credentials, next);
return Objects.hash(credentials, lastEvaluatedKey);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ClaimedCredentialListResponse {\n");
sb.append(" credentials: ").append(toIndentedString(credentials)).append("\n");
sb.append(" next: ").append(toIndentedString(next)).append("\n");
sb.append(" lastEvaluatedKey: ").append(toIndentedString(lastEvaluatedKey)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down Expand Up @@ -191,10 +191,10 @@ public String toUrlQueryString(String prefix) {
}
}

// add `next` to the URL query string
if (getNext() != null) {
// add `lastEvaluatedKey` to the URL query string
if (getLastEvaluatedKey() != null) {
try {
joiner.add(String.format("%snext%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNext()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format("%slastEvaluatedKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLastEvaluatedKey()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ public void getClaimedCredentialsTest() throws ApiException {
String configurationId = null;
String rangeStartTime = null;
String rangeEndTime = null;
String next = null;
ClaimedCredentialListResponse response = api.getClaimedCredentials(projectId, configurationId, rangeStartTime, rangeEndTime, next);
String exclusiveStartKey = null;
Integer limit = null;
ClaimedCredentialListResponse response = api.getClaimedCredentials(projectId, configurationId, rangeStartTime, rangeEndTime, exclusiveStartKey, limit);

// TODO: test validations
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ void credentialsTest() {
}

/**
* Test the property 'next'
* Test the property 'lastEvaluatedKey'
*/
@Test
void nextTest() {
// TODO: test next
void lastEvaluatedKeyTest() {
// TODO: test lastEvaluatedKey
}

}
Loading

0 comments on commit e96811b

Please sign in to comment.