Skip to content

Commit

Permalink
Update Connect Swagger (#1706)
Browse files Browse the repository at this point in the history
Co-authored-by: geel9 <[email protected]>
Co-authored-by: mewmba <[email protected]>
  • Loading branch information
3 people authored Jul 5, 2024
1 parent 0a7eb06 commit f44d38f
Show file tree
Hide file tree
Showing 30 changed files with 341 additions and 789 deletions.
3 changes: 0 additions & 3 deletions connect/dart/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ doc/GetSessionResponseV1.md
doc/GovernmentIDOptions.md
doc/GovernmentIDOptionsRequest.md
doc/IDVSessionState.md
doc/ListSessionsRequest.md
doc/ListSessionsResponse.md
doc/NormalizedIdentityData.md
doc/OrderDirection.md
Expand Down Expand Up @@ -42,7 +41,6 @@ lib/model/get_session_response_v1.dart
lib/model/government_id_options.dart
lib/model/government_id_options_request.dart
lib/model/idv_session_state.dart
lib/model/list_sessions_request.dart
lib/model/list_sessions_response.dart
lib/model/normalized_identity_data.dart
lib/model/order_direction.dart
Expand All @@ -62,7 +60,6 @@ test/get_session_response_v1_test.dart
test/government_id_options_request_test.dart
test/government_id_options_test.dart
test/idv_session_state_test.dart
test/list_sessions_request_test.dart
test/list_sessions_response_test.dart
test/normalized_identity_data_test.dart
test/order_direction_test.dart
Expand Down
3 changes: 1 addition & 2 deletions connect/dart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Class | Method | HTTP request | Description
*SessionsApi* | [**createSession**](doc//SessionsApi.md#createsession) | **POST** /api/v1/sessions |
*SessionsApi* | [**getSession**](doc//SessionsApi.md#getsession) | **GET** /api/v1/sessions/{sessionId} |
*SessionsApi* | [**listSessions**](doc//SessionsApi.md#listsessions) | **GET** /api/v1/sessions |
*SessionsApi* | [**redactSession**](doc//SessionsApi.md#redactsession) | **POST** /api/v1/sessions/redact |
*SessionsApi* | [**redactSession**](doc//SessionsApi.md#redactsession) | **POST** /api/v1/sessions/{sessionId}/redact |


## Documentation For Models
Expand All @@ -82,7 +82,6 @@ Class | Method | HTTP request | Description
- [GovernmentIDOptions](doc//GovernmentIDOptions.md)
- [GovernmentIDOptionsRequest](doc//GovernmentIDOptionsRequest.md)
- [IDVSessionState](doc//IDVSessionState.md)
- [ListSessionsRequest](doc//ListSessionsRequest.md)
- [ListSessionsResponse](doc//ListSessionsResponse.md)
- [NormalizedIdentityData](doc//NormalizedIdentityData.md)
- [OrderDirection](doc//OrderDirection.md)
Expand Down
18 changes: 0 additions & 18 deletions connect/dart/doc/ListSessionsRequest.md

This file was deleted.

20 changes: 13 additions & 7 deletions connect/dart/doc/SessionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Method | HTTP request | Description
[**createSession**](SessionsApi.md#createsession) | **POST** /api/v1/sessions |
[**getSession**](SessionsApi.md#getsession) | **GET** /api/v1/sessions/{sessionId} |
[**listSessions**](SessionsApi.md#listsessions) | **GET** /api/v1/sessions |
[**redactSession**](SessionsApi.md#redactsession) | **POST** /api/v1/sessions/redact |
[**redactSession**](SessionsApi.md#redactsession) | **POST** /api/v1/sessions/{sessionId}/redact |


# **cancelSession**
Expand Down Expand Up @@ -158,7 +158,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **listSessions**
> ListSessionsResponse listSessions(listSessionsRequest)
> ListSessionsResponse listSessions(orderBy, orderDirection, pageSize, page)


Expand All @@ -173,10 +173,13 @@ import 'package:TrinsicConnect/api.dart';
//defaultApiClient.getAuthentication<HttpBearerAuth>('Bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = SessionsApi();
final listSessionsRequest = ListSessionsRequest(); // ListSessionsRequest |
final orderBy = ; // SessionOrdering |
final orderDirection = ; // OrderDirection |
final pageSize = 56; // int |
final page = 56; // int |
try {
final result = api_instance.listSessions(listSessionsRequest);
final result = api_instance.listSessions(orderBy, orderDirection, pageSize, page);
print(result);
} catch (e) {
print('Exception when calling SessionsApi->listSessions: $e\n');
Expand All @@ -187,7 +190,10 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**listSessionsRequest** | [**ListSessionsRequest**](ListSessionsRequest.md)| | [optional]
**orderBy** | [**SessionOrdering**](.md)| | [optional]
**orderDirection** | [**OrderDirection**](.md)| | [optional]
**pageSize** | **int**| | [optional]
**page** | **int**| | [optional]

### Return type

Expand All @@ -199,7 +205,7 @@ Name | Type | Description | Notes

### HTTP request headers

- **Content-Type**: application/json, text/json, application/*+json
- **Content-Type**: Not defined
- **Accept**: text/plain, application/json, text/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
Expand Down Expand Up @@ -233,7 +239,7 @@ try {

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

### Return type

Expand Down
1 change: 0 additions & 1 deletion connect/dart/lib/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ part 'model/get_session_response_v1.dart';
part 'model/government_id_options.dart';
part 'model/government_id_options_request.dart';
part 'model/idv_session_state.dart';
part 'model/list_sessions_request.dart';
part 'model/list_sessions_response.dart';
part 'model/normalized_identity_data.dart';
part 'model/order_direction.dart';
Expand Down
79 changes: 53 additions & 26 deletions connect/dart/lib/api/sessions_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,25 +190,43 @@ class SessionsApi {
/// Performs an HTTP 'GET /api/v1/sessions' operation and returns the [Response].
/// Parameters:
///
/// * [ListSessionsRequest] listSessionsRequest:
/// * [SessionOrdering] orderBy:
///
/// * [OrderDirection] orderDirection:
///
/// * [int] pageSize:
///
/// * [int] page:
Future<Response> listSessionsWithHttpInfo({
ListSessionsRequest? listSessionsRequest,
SessionOrdering? orderBy,
OrderDirection? orderDirection,
int? pageSize,
int? page,
}) async {
// ignore: prefer_const_declarations
final path = r'/api/v1/sessions';

// ignore: prefer_final_locals
Object? postBody = listSessionsRequest;
Object? postBody;

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

const contentTypes = <String>[
'application/json',
'text/json',
'application/*+json'
];
if (orderBy != null) {
queryParams.addAll(_queryParams('', 'OrderBy', orderBy));
}
if (orderDirection != null) {
queryParams.addAll(_queryParams('', 'OrderDirection', orderDirection));
}
if (pageSize != null) {
queryParams.addAll(_queryParams('', 'PageSize', pageSize));
}
if (page != null) {
queryParams.addAll(_queryParams('', 'Page', page));
}

const contentTypes = <String>[];

return apiClient.invokeAPI(
path,
Expand All @@ -223,12 +241,24 @@ class SessionsApi {

/// Parameters:
///
/// * [ListSessionsRequest] listSessionsRequest:
/// * [SessionOrdering] orderBy:
///
/// * [OrderDirection] orderDirection:
///
/// * [int] pageSize:
///
/// * [int] page:
Future<ListSessionsResponse?> listSessions({
ListSessionsRequest? listSessionsRequest,
SessionOrdering? orderBy,
OrderDirection? orderDirection,
int? pageSize,
int? page,
}) async {
final response = await listSessionsWithHttpInfo(
listSessionsRequest: listSessionsRequest,
orderBy: orderBy,
orderDirection: orderDirection,
pageSize: pageSize,
page: page,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
Expand All @@ -246,15 +276,16 @@ class SessionsApi {
return null;
}

/// Performs an HTTP 'POST /api/v1/sessions/redact' operation and returns the [Response].
/// Performs an HTTP 'POST /api/v1/sessions/{sessionId}/redact' operation and returns the [Response].
/// Parameters:
///
/// * [String] sessionId:
Future<Response> redactSessionWithHttpInfo({
String? sessionId,
}) async {
/// * [String] sessionId (required):
Future<Response> redactSessionWithHttpInfo(
String sessionId,
) async {
// ignore: prefer_const_declarations
final path = r'/api/v1/sessions/redact';
final path = r'/api/v1/sessions/{sessionId}/redact'
.replaceAll('{sessionId}', sessionId);

// ignore: prefer_final_locals
Object? postBody;
Expand All @@ -263,10 +294,6 @@ class SessionsApi {
final headerParams = <String, String>{};
final formParams = <String, String>{};

if (sessionId != null) {
queryParams.addAll(_queryParams('', 'sessionId', sessionId));
}

const contentTypes = <String>[];

return apiClient.invokeAPI(
Expand All @@ -282,12 +309,12 @@ class SessionsApi {

/// Parameters:
///
/// * [String] sessionId:
Future<void> redactSession({
String? sessionId,
}) async {
/// * [String] sessionId (required):
Future<void> redactSession(
String sessionId,
) async {
final response = await redactSessionWithHttpInfo(
sessionId: sessionId,
sessionId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
Expand Down
2 changes: 0 additions & 2 deletions connect/dart/lib/api_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ class ApiClient {
return GovernmentIDOptionsRequest.fromJson(value);
case 'IDVSessionState':
return IDVSessionStateTypeTransformer().decode(value);
case 'ListSessionsRequest':
return ListSessionsRequest.fromJson(value);
case 'ListSessionsResponse':
return ListSessionsResponse.fromJson(value);
case 'NormalizedIdentityData':
Expand Down
Loading

0 comments on commit f44d38f

Please sign in to comment.