Skip to content

Commit

Permalink
feat: update client cis
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Kumar committed Feb 10, 2025
1 parent c7d0154 commit 5675bce
Show file tree
Hide file tree
Showing 22 changed files with 193 additions and 142 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import 'package:affinidi_tdk_credential_issuance_client/api.dart';

## Properties

| Name | Type | Description | Notes |
| --------------- | ---------------------------------------------------------------------- | ------------------------------------------- | ---------- |
| **credentials** | [**BuiltList<BuiltMap<String, JsonObject>>**](BuiltMap.md) | list of credentials | [optional] |
| **next** | **String** | for pagination to fetch next set of records | [optional] |
| Name | Type | Description | Notes |
| -------------------- | ---------------------------------------------------------------------- | ------------------------------------------- | ---------- |
| **credentials** | [**BuiltList<BuiltMap<String, JsonObject>>**](BuiltMap.md) | list of credentials | [optional] |
| **lastEvaluatedKey** | **String** | for pagination to fetch next set of records | [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)
22 changes: 12 additions & 10 deletions clients/dart/credential_issuance_client/doc/CredentialsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ try {

# **getClaimedCredentials**

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

Expand All @@ -81,10 +81,11 @@ final String projectId = projectId_example; // String | project id
final String configurationId = configurationId_example; // String | configuration id
final String rangeStartTime = rangeStartTime_example; // String |
final String rangeEndTime = rangeEndTime_example; // String |
final String next = next_example; // String |
final String exclusiveStartKey = exclusiveStartKey_example; // String | exclusiveStartKey for retrieving the next batch of data.
final int limit = 56; // int |
try {
final response = api.getClaimedCredentials(projectId, configurationId, rangeStartTime, rangeEndTime, next);
final response = api.getClaimedCredentials(projectId, configurationId, rangeStartTime, rangeEndTime, exclusiveStartKey, limit);
print(response);
} catch on DioException (e) {
print('Exception when calling CredentialsApi->getClaimedCredentials: $e\n');
Expand All @@ -93,13 +94,14 @@ try {

### 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** | **int** | | [optional] [default to 20] |

### Return type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ class CredentialsApi {
/// * [configurationId] - configuration id
/// * [rangeStartTime]
/// * [rangeEndTime]
/// * [next]
/// * [exclusiveStartKey] - exclusiveStartKey for retrieving the next batch of data.
/// * [limit]
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request
Expand All @@ -152,7 +153,8 @@ class CredentialsApi {
required String configurationId,
required String rangeStartTime,
String? rangeEndTime,
String? next,
String? exclusiveStartKey,
int? limit = 20,
CancelToken? cancelToken,
Map<String, dynamic>? headers,
Map<String, dynamic>? extra,
Expand Down Expand Up @@ -183,7 +185,8 @@ class CredentialsApi {
final _queryParameters = <String, dynamic>{
r'rangeStartTime': encodeQueryParameter(_serializers, rangeStartTime, const FullType(String)),
if (rangeEndTime != null) r'rangeEndTime': encodeQueryParameter(_serializers, rangeEndTime, const FullType(String)),
if (next != null) r'next': encodeQueryParameter(_serializers, next, const FullType(String)),
if (exclusiveStartKey != null) r'exclusiveStartKey': encodeQueryParameter(_serializers, exclusiveStartKey, const FullType(String)),
if (limit != null) r'limit': encodeQueryParameter(_serializers, limit, const FullType(int)),
};

final _response = await _dio.request<Object>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ part 'claimed_credential_list_response.g.dart';
///
/// Properties:
/// * [credentials] - list of credentials
/// * [next] - for pagination to fetch next set of records
/// * [lastEvaluatedKey] - for pagination to fetch next set of records
@BuiltValue()
abstract class ClaimedCredentialListResponse implements Built<ClaimedCredentialListResponse, ClaimedCredentialListResponseBuilder> {
/// list of credentials
@BuiltValueField(wireName: r'credentials')
BuiltList<BuiltMap<String, JsonObject?>>? get credentials;

/// for pagination to fetch next set of records
@BuiltValueField(wireName: r'next')
String? get next;
@BuiltValueField(wireName: r'lastEvaluatedKey')
String? get lastEvaluatedKey;

ClaimedCredentialListResponse._();

Expand Down Expand Up @@ -55,10 +55,10 @@ class _$ClaimedCredentialListResponseSerializer implements PrimitiveSerializer<C
specifiedType: const FullType(BuiltList, [FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)])]),
);
}
if (object.next != null) {
yield r'next';
if (object.lastEvaluatedKey != null) {
yield r'lastEvaluatedKey';
yield serializers.serialize(
object.next,
object.lastEvaluatedKey,
specifiedType: const FullType(String),
);
}
Expand Down Expand Up @@ -92,12 +92,12 @@ class _$ClaimedCredentialListResponseSerializer implements PrimitiveSerializer<C
) as BuiltList<BuiltMap<String, JsonObject?>>;
result.credentials.replace(valueDes);
break;
case r'next':
case r'lastEvaluatedKey':
final valueDes = serializers.deserialize(
value,
specifiedType: const FullType(String),
) as String;
result.next = valueDes;
result.lastEvaluatedKey = valueDes;
break;
default:
unhandled.add(key);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ void main() {
});

// for pagination to fetch next set of records
// String next
test('to test the property `next`', () async {
// String lastEvaluatedKey
test('to test the property `lastEvaluatedKey`', () async {
// TODO
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void main() {
//
// Get claimed credential in the specified range
//
//Future<ClaimedCredentialListResponse> getClaimedCredentials(String projectId, String configurationId, String rangeStartTime, { String rangeEndTime, String next }) async
//Future<ClaimedCredentialListResponse> getClaimedCredentials(String projectId, String configurationId, String rangeStartTime, { String rangeEndTime, String exclusiveStartKey, int limit }) async
test('test getClaimedCredentials', () async {
// TODO
});
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
Loading

0 comments on commit 5675bce

Please sign in to comment.